All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Al Viro <viro@ZenIV.linux.org.uk>, Gao Xiang <xiang@kernel.org>
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>,
	Jingbo Xu <jefflexu@linux.alibaba.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the vfs tree with the erofs tree
Date: Mon, 28 Nov 2022 09:13:23 +1100	[thread overview]
Message-ID: <20221128091323.246f8ce1@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2910 bytes --]

Hi all,

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

  fs/erofs/fscache.c

between commit:

  313e9413d512 ("erofs: switch to prepare_ondemand_read() in fscache mode")

from the erofs tree and commit:

  de4eda9de2d9 ("use less confusing names for iov_iter direction initializers")

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

diff --cc fs/erofs/fscache.c
index 3e794891cd91,4c837be3b6e3..000000000000
--- a/fs/erofs/fscache.c
+++ b/fs/erofs/fscache.c
@@@ -99,28 -159,47 +99,28 @@@ static int erofs_fscache_read_folios_as
  
  	ret = fscache_begin_read_operation(cres, cookie);
  	if (ret)
 -		goto out;
 +		return ret;
  
  	while (done < len) {
 -		subreq = kzalloc(sizeof(struct netfs_io_subrequest),
 -				 GFP_KERNEL);
 -		if (subreq) {
 -			INIT_LIST_HEAD(&subreq->rreq_link);
 -			refcount_set(&subreq->ref, 2);
 -			subreq->rreq = rreq;
 -			refcount_inc(&rreq->ref);
 -		} else {
 -			ret = -ENOMEM;
 -			goto out;
 -		}
 -
 -		subreq->start = pstart + done;
 -		subreq->len	=  len - done;
 -		subreq->flags = 1 << NETFS_SREQ_ONDEMAND;
 +		loff_t sstart = pstart + done;
 +		size_t slen = len - done;
 +		unsigned long flags = 1 << NETFS_SREQ_ONDEMAND;
  
 -		list_add_tail(&subreq->rreq_link, &rreq->subrequests);
 -
 -		source = cres->ops->prepare_read(subreq, LLONG_MAX);
 -		if (WARN_ON(subreq->len == 0))
 +		source = cres->ops->prepare_ondemand_read(cres,
 +				sstart, &slen, LLONG_MAX, &flags, 0);
 +		if (WARN_ON(slen == 0))
  			source = NETFS_INVALID_READ;
  		if (source != NETFS_READ_FROM_CACHE) {
 -			erofs_err(sb, "failed to fscache prepare_read (source %d)",
 -				  source);
 -			ret = -EIO;
 -			subreq->error = ret;
 -			erofs_fscache_put_subrequest(subreq);
 -			goto out;
 +			erofs_err(sb, "failed to fscache prepare_read (source %d)", source);
 +			return -EIO;
  		}
  
 -		atomic_inc(&rreq->nr_outstanding);
 +		refcount_inc(&req->ref);
- 		iov_iter_xarray(&iter, READ, &req->mapping->i_pages,
++		iov_iter_xarray(&iter, ITER_DEST, &req->mapping->i_pages,
 +				lstart + done, slen);
  
 -		iov_iter_xarray(&iter, ITER_DEST, &rreq->mapping->i_pages,
 -				start + done, subreq->len);
 -
 -		ret = fscache_read(cres, subreq->start, &iter,
 -				   NETFS_READ_HOLE_FAIL,
 -				   erofc_fscache_subreq_complete, subreq);
 +		ret = fscache_read(cres, sstart, &iter, NETFS_READ_HOLE_FAIL,
 +				   erofs_fscache_subreq_complete, req);
  		if (ret == -EIOCBQUEUED)
  			ret = 0;
  		if (ret) {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2022-11-27 22:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-27 22:13 Stephen Rothwell [this message]
2022-11-28  2:12 ` linux-next: manual merge of the vfs tree with the erofs tree Jingbo Xu
  -- strict thread matches above, loose matches on Subject: below --
2022-12-04 22:24 Stephen Rothwell
2022-12-05  3:13 ` Gao Xiang
2022-12-05  4:11   ` Stephen Rothwell
2022-12-05  4:43     ` Gao Xiang
2020-05-29  1:45 Stephen Rothwell
2020-05-29  1:51 ` Al Viro
2020-05-29  3:40   ` Gao Xiang
2020-05-29 14:36     ` Al Viro
2020-05-29 14:50       ` Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221128091323.246f8ce1@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=xiang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.