linux-next: manual merge of the folio tree with the btrfs tree
Hi all,
Today's linux-next merge of the folio tree got a conflict in:
fs/btrfs/send.c
between commit:
d1a1a97304b4 ("btrfs: send: keep the current inode open while processing it")
from the btrfs tree and commit:
2ebdd1df3166 ("mm/readahead: Convert page_cache_async_readahead to take a folio")
from the folio tree.
I fixed it up (I think - see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 29 lines
Cheers,
Stephen Rothwell
diff --cc fs/btrfs/send.c
index 8e8e4ab59930,8985d115559d..000000000000
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@@ -4905,13 -4984,14 +4905,14 @@@ static int put_file_data(struct send_ct
}
}
- if (PageReadahead(page)) {
- page_cache_async_readahead(inode->i_mapping, &sctx->ra,
- NULL, page_folio(page), index,
- last_index + 1 - index);
- }
+ if (PageReadahead(page))
+ page_cache_async_readahead(sctx->cur_inode->i_mapping,
- &sctx->ra, NULL, page, index,
++ &sctx->ra, NULL,
++ page_folio(page), index,
+ last_index + 1 - index);
if (!PageUptodate(page)) {
- btrfs_readpage(NULL, page);
+ btrfs_read_folio(NULL, page_folio(page));
lock_page(page);
if (!PageUptodate(page)) {
unlock_page(page);Quoted 10 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the folio tree got a conflict in:
fs/btrfs/send.cbetween commit:
d1a1a97304b4("btrfs: send: keep the current inode open while processing it")
Quoted 7 lines
from the btrfs tree and commit:
2ebdd1df3166("mm/readahead: Convertpage_cache_async_readaheadto take a folio")from the folio tree.
I fixed it up (I think - see below) and can carry the fix as
Looks correct to me.
Thanks.
Quoted 6 lines
necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Quoted 13 lines · Filipe Manana
Quoted 12 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the folio tree got a conflict in:
fs/btrfs/send.cbetween commit:
d1a1a97304b4("btrfs: send: keep the current inode open while processing it")from the btrfs tree and commit:
Quoted 7 lines
Quoted 5 lines
2ebdd1df3166("mm/readahead: Convertpage_cache_async_readaheadto take a folio")from the folio tree.
I fixed it up (I think - see below) and can carry the fix as
Looks correct to me.
Me too. The patch this one enables is rather sad. It's yet another reminder that we suck at streaming workloads. But until we fix that, don't you want to use invalidate_inode_pages2_range() rather than truncate_inode_pages_range()? If your send conflicts with someone else's write(), you'll erase their write to the page cache.
Quoted 20 lines · Matthew Wilcox
Quoted 19 lines · Filipe Manana
Quoted 17 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the folio tree got a conflict in:
fs/btrfs/send.cbetween commit:
d1a1a97304b4("btrfs: send: keep the current inode open while processing it")from the btrfs tree and commit:
2ebdd1df3166("mm/readahead: Convertpage_cache_async_readaheadto take a folio")from the folio tree.
I fixed it up (I think - see below) and can carry the fix as
Quoted 7 lines
Quoted 1 line
Looks correct to me.
Me too. The patch this one enables is rather sad. It's yet another reminder that we suck at streaming workloads. But until we fix that, don't you want to use
invalidate_inode_pages2_range()rather thantruncate_inode_pages_range()? If your send conflicts with someone else'swrite(), you'll erase their write to the page cache.
Send operates only on readonly trees, so it can't happen. Thanks.