All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the vfs tree with the erofs tree
@ 2022-11-27 22:13 Stephen Rothwell
  2022-11-28  2:12 ` Jingbo Xu
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2022-11-27 22:13 UTC (permalink / raw)
  To: Al Viro, Gao Xiang
  Cc: Gao Xiang, Jingbo Xu, Linux Kernel Mailing List, Linux Next Mailing List

[-- 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 --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* linux-next: manual merge of the vfs tree with the erofs tree
@ 2022-12-04 22:24 Stephen Rothwell
  2022-12-05  3:13 ` Gao Xiang
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2022-12-04 22:24 UTC (permalink / raw)
  To: Al Viro, Gao Xiang
  Cc: Gao Xiang, Jingbo Xu, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

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

  fs/erofs/fscache.c

between commits:

  89175ef1262d ("erofs: switch to prepare_ondemand_read() in fscache mode")
  89175ef1262d ("erofs: switch to prepare_ondemand_read() in fscache mode")

from the erofs tree and commit:

  89175ef1262d ("erofs: switch to prepare_ondemand_read() in fscache mode")

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 f14886c479bd,4c837be3b6e3..000000000000
--- a/fs/erofs/fscache.c
+++ b/fs/erofs/fscache.c
@@@ -126,28 -159,47 +126,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) {
@@@ -233,19 -297,17 +233,19 @@@ static int erofs_fscache_data_read_slic
  		}
  		iov_iter_zero(PAGE_SIZE - size, &iter);
  		erofs_put_metabuf(&buf);
 -		return PAGE_SIZE;
 +		primary->submitted += PAGE_SIZE;
 +		return 0;
  	}
  
 +	count = primary->len - primary->submitted;
  	if (!(map.m_flags & EROFS_MAP_MAPPED)) {
- 		iov_iter_xarray(&iter, READ, &mapping->i_pages, pos, count);
 -		count = len;
+ 		iov_iter_xarray(&iter, ITER_DEST, &mapping->i_pages, pos, count);
  		iov_iter_zero(count, &iter);
 -		return count;
 +		primary->submitted += count;
 +		return 0;
  	}
  
 -	count = min_t(size_t, map.m_llen - (pos - map.m_la), len);
 +	count = min_t(size_t, map.m_llen - (pos - map.m_la), count);
  	DBG_BUGON(!count || count % PAGE_SIZE);
  
  	mdev = (struct erofs_map_dev) {

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

^ permalink raw reply	[flat|nested] 11+ messages in thread
* linux-next: manual merge of the vfs tree with the erofs tree
@ 2020-05-29  1:45 Stephen Rothwell
  2020-05-29  1:51 ` Al Viro
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Rothwell @ 2020-05-29  1:45 UTC (permalink / raw)
  To: Al Viro, Gao Xiang
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Chengguang Xu, Chao Yu

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

Hi all,

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

  fs/erofs/super.c

between commit:

  e7cda1ee94f4 ("erofs: code cleanup by removing ifdef macro surrounding")

from the erofs tree and commit:

  91a7c5e1d30e ("erofs: convert to use the new mount fs_context api")

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/super.c
index 8e46d204a0c2,2c0bad903fa6..000000000000
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@@ -408,16 -365,12 +365,9 @@@ static int erofs_fc_fill_super(struct s
  	sb->s_time_gran = 1;
  
  	sb->s_op = &erofs_sops;
 -
 -#ifdef CONFIG_EROFS_FS_XATTR
  	sb->s_xattr = erofs_xattr_handlers;
 -#endif
  
- 	/* set erofs default mount options */
- 	erofs_default_options(sbi);
- 
- 	err = erofs_parse_options(sb, data);
- 	if (err)
- 		return err;
- 
- 	if (test_opt(sbi, POSIX_ACL))
+ 	if (test_opt(ctx, POSIX_ACL))
  		sb->s_flags |= SB_POSIXACL;
  	else
  		sb->s_flags &= ~SB_POSIXACL;

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-12-05  4:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-27 22:13 linux-next: manual merge of the vfs tree with the erofs tree Stephen Rothwell
2022-11-28  2:12 ` 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

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.