Skip to contentSkip to conversation

linux-next: manual merge of the folio tree with the fscache tree

DISCUSSION Stephen Rothwell 1 participant 2 messages Mar 15, 2022 – Mar 23, 2022 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the folio tree got a conflict in:

fs/afs/file.c

between commit:

0c31679cf2c0 ("netfs: Add a netfs inode context")

from the fscache tree and commits:

7d165ab9d0a0 ("afs: Convert from launder_page to launder_folio") 09f7fc259e5d ("fscache: Convert fscache_set_page_dirty() to fscache_dirty_folio()")

from the folio tree.

I fixed it up (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 · 41 lines
Cheers,
Stephen Rothwell

diff --cc fs/afs/file.c
index 2b68b2070248,0f9fdb284a20..000000000000
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@@ -19,11 -19,13 +19,11 @@@
  #include "internal.h"
  
  static int afs_file_mmap(struct file *file, struct vm_area_struct *vma);
 -static int afs_readpage(struct file *file, struct page *page);
  static int afs_symlink_readpage(struct file *file, struct page *page);
- static void afs_invalidatepage(struct page *page, unsigned int offset,
- 			       unsigned int length);
+ static void afs_invalidate_folio(struct folio *folio, size_t offset,
+ 			       size_t length);
  static int afs_releasepage(struct page *page, gfp_t gfp_flags);
  
 -static void afs_readahead(struct readahead_control *ractl);
  static ssize_t afs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter);
  static void afs_vm_open(struct vm_area_struct *area);
  static void afs_vm_close(struct vm_area_struct *area);
@@@ -50,12 -52,12 +50,12 @@@ const struct inode_operations afs_file_
  };
  
  const struct address_space_operations afs_file_aops = {
 -	.readpage	= afs_readpage,
 -	.readahead	= afs_readahead,
 +	.readpage	= netfs_readpage,
 +	.readahead	= netfs_readahead,
- 	.set_page_dirty	= afs_set_page_dirty,
- 	.launder_page	= afs_launder_page,
+ 	.dirty_folio	= afs_dirty_folio,
+ 	.launder_folio	= afs_launder_folio,
  	.releasepage	= afs_releasepage,
- 	.invalidatepage	= afs_invalidatepage,
+ 	.invalidate_folio = afs_invalidate_folio,
  	.write_begin	= afs_write_begin,
  	.write_end	= afs_write_end,
  	.writepage	= afs_writepage,
#1 lore raw

Hi all,

Quoted 52 lines · On Tue, 15 Mar 2022 20:28:16 +1100 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the folio tree got a conflict in:

fs/afs/file.c

between commit:

0c31679cf2c0 ("netfs: Add a netfs inode context")

from the fscache tree and commits:

7d165ab9d0a0 ("afs: Convert from launder_page to launder_folio") 09f7fc259e5d ("fscache: Convert fscache_set_page_dirty() to fscache_dirty_folio()")

from the folio tree.

I fixed it up (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.

fs/afs/file.c +2 -2
diff --cc fs/afs/file.c
index 2b68b2070248,0f9fdb284a20..000000000000
@@@ -19,11 -19,13 +19,11 @@@
  #include "internal.h"
 
  static int afs_file_mmap(struct file *file, struct vm_area_struct *vma);
 -static int afs_readpage(struct file *file, struct page *page);
  static int afs_symlink_readpage(struct file *file, struct page *page);
- static void afs_invalidatepage(struct page *page, unsigned int offset,
- 			       unsigned int length);
+ static void afs_invalidate_folio(struct folio *folio, size_t offset,
+ 			       size_t length);
  static int afs_releasepage(struct page *page, gfp_t gfp_flags);
 
 -static void afs_readahead(struct readahead_control *ractl);
  static ssize_t afs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter);
  static void afs_vm_open(struct vm_area_struct *area);
  static void afs_vm_close(struct vm_area_struct *area);
@@@ -50,12 -52,12 +50,12 @@@ const struct inode_operations afs_file_
  };
 
  const struct address_space_operations afs_file_aops = {
 -	.readpage	= afs_readpage,
 -	.readahead	= afs_readahead,
 +	.readpage	= netfs_readpage,
 +	.readahead	= netfs_readahead,

fs/afs/file.c

Quoted 10 lines
fs/afs/file.c +3 -3
- 	.set_page_dirty	= afs_set_page_dirty,
- 	.launder_page	= afs_launder_page,
+ 	.dirty_folio	= afs_dirty_folio,
+ 	.launder_folio	= afs_launder_folio,
  	.releasepage	= afs_releasepage,
- 	.invalidatepage	= afs_invalidatepage,
+ 	.invalidate_folio = afs_invalidate_folio,
  	.write_begin	= afs_write_begin,
  	.write_end	= afs_write_end,
  	.writepage	= afs_writepage,

This is now a conflict between the fscache tree and Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell