Skip to contentSkip to conversation

linux-next: manual merge of the vfs-brauner tree with the overlayfs tree

DISCUSSION Stephen Rothwell 2 participants 3 messages Sep 26, 2023 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

fs/overlayfs/file.c

between commit:

f8f29a49ec21 ("ovl: move ovl_file_accessed() to aio completion") e57757c5d874 ("ovl: use simpler function to convert iocb to rw flags")

from the overlayfs tree and commit:

2d1b3bbc3dd5 ("ovl: disable IOCB_DIO_CALLER_COMP")

from the vfs-brauner 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 · 36 lines
Cheers,
Stephen Rothwell

diff --cc fs/overlayfs/file.c
index 05ec614f7054,693971d20280..000000000000
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@@ -398,16 -389,22 +398,22 @@@ static ssize_t ovl_write_iter(struct ki
  		goto out_fdput;
  
  	if (!ovl_should_sync(OVL_FS(inode->i_sb)))
 -		ifl &= ~(IOCB_DSYNC | IOCB_SYNC);
 +		flags &= ~(IOCB_DSYNC | IOCB_SYNC);
  
+ 	/*
+ 	 * Overlayfs doesn't support deferred completions, don't copy
+ 	 * this property in case it is set by the issuer.
+ 	 */
 -	ifl &= ~IOCB_DIO_CALLER_COMP;
++	flags &= ~IOCB_DIO_CALLER_COMP;
+ 
 -	old_cred = ovl_override_creds(file_inode(file)->i_sb);
 +	old_cred = ovl_override_creds(inode->i_sb);
  	if (is_sync_kiocb(iocb)) {
 +		rwf_t rwf = iocb_to_rw_flags(flags);
 +
  		file_start_write(real.file);
 -		ret = vfs_iter_write(real.file, iter, &iocb->ki_pos,
 -				     ovl_iocb_to_rwf(ifl));
 +		ret = vfs_iter_write(real.file, iter, &iocb->ki_pos, rwf);
  		file_end_write(real.file);
 -		/* Update size */
 -		ovl_copyattr(inode);
 +		ovl_rw_complete(iocb);
  	} else {
  		struct ovl_aio_req *aio_req;
#1 lore raw
Quoted 53 lines · Stephen Rothwell

Hi all,

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

fs/overlayfs/file.c

between commit:

f8f29a49ec21 ("ovl: move ovl_file_accessed() to aio completion") e57757c5d874 ("ovl: use simpler function to convert iocb to rw flags")

from the overlayfs tree and commit:

2d1b3bbc3dd5 ("ovl: disable IOCB_DIO_CALLER_COMP")

from the vfs-brauner 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.

--
Cheers,
Stephen Rothwell

fs/overlayfs/file.c +6 -0
diff --cc fs/overlayfs/file.c
index 05ec614f7054,693971d20280..000000000000
@@@ -398,16 -389,22 +398,22 @@@ static ssize_t ovl_write_iter(struct ki
                goto out_fdput;
 
        if (!ovl_should_sync(OVL_FS(inode->i_sb)))
 -              ifl &= ~(IOCB_DSYNC | IOCB_SYNC);
 +              flags &= ~(IOCB_DSYNC | IOCB_SYNC);
 
+       /*
+        * Overlayfs doesn't support deferred completions, don't copy
+        * this property in case it is set by the issuer.
+        */
 -      ifl &= ~IOCB_DIO_CALLER_COMP;
++      flags &= ~IOCB_DIO_CALLER_COMP;
+
 -      old_cred = ovl_override_creds(file_inode(file)->i_sb);
 +      old_cred = ovl_override_creds(inode->i_sb);
        if (is_sync_kiocb(iocb)) {
 +              rwf_t rwf = iocb_to_rw_flags(flags);
 +

fs/overlayfs/file.c

Quoted 10 lines
fs/overlayfs/file.c +0 -0
                file_start_write(real.file);
 -              ret = vfs_iter_write(real.file, iter, &iocb->ki_pos,
 -                                   ovl_iocb_to_rwf(ifl));
 +              ret = vfs_iter_write(real.file, iter, &iocb->ki_pos, rwf);
                file_end_write(real.file);
 -              /* Update size */
 -              ovl_copyattr(inode);
 +              ovl_rw_complete(iocb);
        } else {
                struct ovl_aio_req *aio_req;

Thanks Stephen, your fix is correct.
Serves me right for doing an unnecessary var name change... Anyway, the conflict is with vfs.fixes branch destined for 6.6, so I will rebase overlayfs-next (for 6.7) as soon as vfs.fixes is merged.

At this opportunity, I would like to ask you to add branch ovl-fixes from ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git to linux-next, because I will need to send some ovl fixes for 6.6 in the near future.

Thanks,
Amir.

#2 lore raw

Hi Amir,

Quoted 5 lines · On Tue, 26 Sep 2023 08:09:51 +0300 Amir Goldstein <[email protected]> wrote:

At this opportunity, I would like to ask you to add branch ovl-fixes from ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git to linux-next, because I will need to send some ovl fixes for 6.6 in the near future.

Added from tomorrow.

Thanks for adding your subsystem tree as a participant of linux-next. As you may know, this is not a judgement of your code. The purpose of linux-next is for integration testing and to lower the impact of conflicts between subsystems in the next merge window.

You will need to ensure that the patches/commits in your tree/series have been:
* submitted under GPL v2 (or later) and include the Contributor's Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.

Basically, this should be just what you would send to Linus (or ask him to fetch). It is allowed to be rebased if you deem it necessary.

Signature · 7 lines
Cheers,
Stephen Rothwell 
[email protected]

-- 
Cheers,
Stephen Rothwell