Skip to contentSkip to conversation

linux-next: manual merge of the fuse tree with Linus' tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Oct 12, 2020 – Oct 13, 2020 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

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

fs/fuse/file.c

between commit:

933a3752babc ("fuse: fix the ->direct_IO() treatment of iov_iter")

from Linus' tree and commit:

fcee216beb9c ("fuse: split fuse_mount off of fuse_conn")

from the fuse 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 · 29 lines
Cheers,
Stephen Rothwell

diff --cc fs/fuse/file.c
index 43c165e796da,53d4dd1ab992..000000000000
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@@ -3120,17 -3156,10 +3146,18 @@@ fuse_direct_IO(struct kiocb *iocb, stru
  	 * By default, we want to optimize all I/Os with async request
  	 * submission to the client filesystem if supported.
  	 */
- 	io->async = ff->fc->async_dio;
 -	io->async = async_dio;
++	io->async = ff->fm->fc->async_dio;
  	io->iocb = iocb;
  	io->blocking = is_sync_kiocb(iocb);
  
 +	/* optimization for short read */
 +	if (io->async && !io->write && offset + count > i_size) {
- 		iov_iter_truncate(iter, fuse_round_up(ff->fc, i_size - offset));
++		iov_iter_truncate(iter, fuse_round_up(ff->fm->fc,
++				  i_size - offset));
 +		shortened = count - iov_iter_count(iter);
 +		count -= shortened;
 +	}
 +
  	/*
  	 * We cannot asynchronously extend the size of a file.
  	 * In such case the aio will behave exactly like sync io.
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

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

fs/fuse/file.c

between commit:

933a3752babc ("fuse: fix the ->direct_IO() treatment of iov_iter")

from Linus' tree and commit:

fcee216beb9c ("fuse: split fuse_mount off of fuse_conn")

Quoted 8 lines

from the fuse 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.

Thanks! Semantically, the change looks good to me, I just noticed something about the indentation:

Quoted 9 lines
fs/fuse/file.c +0 -1
diff --cc fs/fuse/file.c
index 43c165e796da,53d4dd1ab992..000000000000
@@@ -3120,17 -3156,10 +3146,18 @@@ fuse_direct_IO(struct kiocb *iocb, stru
  	 * By default, we want to optimize all I/Os with async request
  	 * submission to the client filesystem if supported.
  	 */
- 	io->async = ff->fc->async_dio;

fs/fuse/file.c

Quoted 10 lines
fs/fuse/file.c +3 -1
 -	io->async = async_dio;
++	io->async = ff->fm->fc->async_dio;
  	io->iocb = iocb;
  	io->blocking = is_sync_kiocb(iocb);
 
 +	/* optimization for short read */
 +	if (io->async && !io->write && offset + count > i_size) {
- 		iov_iter_truncate(iter, fuse_round_up(ff->fc, i_size - offset));
++		iov_iter_truncate(iter, fuse_round_up(ff->fm->fc,
++				  i_size - offset));

Personally, I’d align this second line to the opening parenthesis of fuse_round_up() (as it is done in fcee216beb9c, in a hunk not shown here, probably because it’s been dropped in the merge.).

Max

Quoted 7 lines

+ shortened = count - iov_iter_count(iter);
+ count -= shortened;
+ }
+
/*
* We cannot asynchronously extend the size of a file.
* In such case the aio will behave exactly like sync io.