Message ID | 1fcafac62544b937e537f7cfe576b4beb3d8bc0a.1689143655.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: preparation patches for the incoming metadata folio conversion | expand |
For the subject, please try to describe it in more human readable way, not just saying what the code does. Sometimes the function names explain it best but here it's moving page copying out of the loop and does it in one go, so I've changed the changelog like that. On Wed, Jul 12, 2023 at 02:37:46PM +0800, Qu Wenruo wrote: > Function btrfs_clone_extent_buffer() is calling of copy_page() directly. > > To make later migration for folio easier, just call > copy_extent_buffer_full() instead. > > Signed-off-by: Qu Wenruo <wqu@suse.com> > --- > fs/btrfs/extent_io.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c > index c84e64181acb..7f0a532de645 100644 > --- a/fs/btrfs/extent_io.c > +++ b/fs/btrfs/extent_io.c > @@ -3285,8 +3285,8 @@ struct extent_buffer *btrfs_clone_extent_buffer(const struct extent_buffer *src) > return NULL; > } > WARN_ON(PageDirty(p)); > - copy_page(page_address(p), page_address(src->pages[i])); > } > + copy_extent_buffer_full(new, src); > set_extent_buffer_uptodate(new); > > return new; > -- > 2.41.0
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c84e64181acb..7f0a532de645 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3285,8 +3285,8 @@ struct extent_buffer *btrfs_clone_extent_buffer(const struct extent_buffer *src) return NULL; } WARN_ON(PageDirty(p)); - copy_page(page_address(p), page_address(src->pages[i])); } + copy_extent_buffer_full(new, src); set_extent_buffer_uptodate(new); return new;
Function btrfs_clone_extent_buffer() is calling of copy_page() directly. To make later migration for folio easier, just call copy_extent_buffer_full() instead. Signed-off-by: Qu Wenruo <wqu@suse.com> --- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)