|
@@ -110,8 +110,8 @@ static void __endio_write_update_ordered(struct inode *inode,
|
|
|
* extent_clear_unlock_delalloc() to clear both the bits EXTENT_DO_ACCOUNTING
|
|
* extent_clear_unlock_delalloc() to clear both the bits EXTENT_DO_ACCOUNTING
|
|
|
* and EXTENT_DELALLOC simultaneously, because that causes the reserved metadata
|
|
* and EXTENT_DELALLOC simultaneously, because that causes the reserved metadata
|
|
|
* to be released, which we want to happen only when finishing the ordered
|
|
* to be released, which we want to happen only when finishing the ordered
|
|
|
- * extent (btrfs_finish_ordered_io()). Also note that the caller of the
|
|
|
|
|
- * fill_delalloc() callback already does proper cleanup for the first page of
|
|
|
|
|
|
|
+ * extent (btrfs_finish_ordered_io()). Also note that the caller of
|
|
|
|
|
+ * btrfs_run_delalloc_range already does proper cleanup for the first page of
|
|
|
* the range, that is, it invokes the callback writepage_end_io_hook() for the
|
|
* the range, that is, it invokes the callback writepage_end_io_hook() for the
|
|
|
* range of the first page.
|
|
* range of the first page.
|
|
|
*/
|
|
*/
|
|
@@ -1599,12 +1599,12 @@ static inline int need_force_cow(struct inode *inode, u64 start, u64 end)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
- * extent_io.c call back to do delayed allocation processing
|
|
|
|
|
|
|
+ * Function to process delayed allocation (create CoW) for ranges which are
|
|
|
|
|
+ * being touched for the first time.
|
|
|
*/
|
|
*/
|
|
|
-static int run_delalloc_range(void *private_data, struct page *locked_page,
|
|
|
|
|
- u64 start, u64 end, int *page_started,
|
|
|
|
|
- unsigned long *nr_written,
|
|
|
|
|
- struct writeback_control *wbc)
|
|
|
|
|
|
|
+int btrfs_run_delalloc_range(void *private_data, struct page *locked_page,
|
|
|
|
|
+ u64 start, u64 end, int *page_started, unsigned long *nr_written,
|
|
|
|
|
+ struct writeback_control *wbc)
|
|
|
{
|
|
{
|
|
|
struct inode *inode = private_data;
|
|
struct inode *inode = private_data;
|
|
|
int ret;
|
|
int ret;
|
|
@@ -10598,7 +10598,6 @@ static const struct extent_io_ops btrfs_extent_io_ops = {
|
|
|
.readpage_io_failed_hook = btrfs_readpage_io_failed_hook,
|
|
.readpage_io_failed_hook = btrfs_readpage_io_failed_hook,
|
|
|
|
|
|
|
|
/* optional callbacks */
|
|
/* optional callbacks */
|
|
|
- .fill_delalloc = run_delalloc_range,
|
|
|
|
|
.writepage_end_io_hook = btrfs_writepage_end_io_hook,
|
|
.writepage_end_io_hook = btrfs_writepage_end_io_hook,
|
|
|
.writepage_start_hook = btrfs_writepage_start_hook,
|
|
.writepage_start_hook = btrfs_writepage_start_hook,
|
|
|
.set_bit_hook = btrfs_set_bit_hook,
|
|
.set_bit_hook = btrfs_set_bit_hook,
|