Commit c0fab480 authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba

btrfs: update comment for btrfs_dirty_pages

The original comment is from the initial merge, which has several
problems:

- No holes check any more
- No inline decision is made

Update the out-of-date comment with more correct one.
Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 6bc5636a
...@@ -453,12 +453,11 @@ static void btrfs_drop_pages(struct page **pages, size_t num_pages) ...@@ -453,12 +453,11 @@ static void btrfs_drop_pages(struct page **pages, size_t num_pages)
} }
/* /*
* after copy_from_user, pages need to be dirtied and we need to make * After btrfs_copy_from_user(), update the following things for delalloc:
* sure holes are created between the current EOF and the start of * - Mark newly dirtied pages as DELALLOC in the io tree.
* any next extents (if required). * Used to advise which range is to be written back.
* * - Mark modified pages as Uptodate/Dirty and not needing COW fixup
* this also makes the decision about creating an inline extent vs * - Update inode size for past EOF write
* doing real data extents, marking pages dirty and delalloc as required.
*/ */
int btrfs_dirty_pages(struct btrfs_inode *inode, struct page **pages, int btrfs_dirty_pages(struct btrfs_inode *inode, struct page **pages,
size_t num_pages, loff_t pos, size_t write_bytes, size_t num_pages, loff_t pos, size_t write_bytes,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment