On 13.10.20 01:47, Stephen Rothwell wrote:
> 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.

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

> 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));

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

>  +            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.


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to