]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: send: prepare put_file_data() for large data folios
authorQu Wenruo <wqu@suse.com>
Mon, 17 Mar 2025 07:10:47 +0000 (17:40 +1030)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:42 +0000 (14:30 +0200)
commita4a636a43741c2706868fb97dff9a83d398ac9e3
tree10e0889e74c1e914e5a63413ebd980fe3a5525f0
parent70a376475d68c9c4fb6d98cdf78f0912950293d3
btrfs: send: prepare put_file_data() for large data folios

Currently put_file_data() can only accept a page sized folio.  However
the function itself is not that complex, it's just copying data from
filemap folio into the send buffer.

Make it support large data folios:

- Change the loop to use file offset instead of page index

- Calculate @pg_offset and @cur_len after getting the folio

- Remove the "WARN_ON(folio_order(folio));" line

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c