linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the erofs tree with the vfs-idmapping tree
@ 2023-04-13 14:46 broonie
  2023-04-13 15:49 ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: broonie @ 2023-04-13 14:46 UTC (permalink / raw)
  To: Gao Xiang
  Cc: Christian Brauner, Gao Xiang, Jingbo Xu,
	Linux Kernel Mailing List, Linux Next Mailing List

Hi all,

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

  fs/erofs/xattr.c

between commit:

  a5488f29835c0 ("fs: simplify ->listxattr() implementation")

from the vfs-idmapping tree and commit:

  303f50cf89b24 ("erofs: handle long xattr name prefixes properly")

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

diff --cc fs/erofs/xattr.c
index 015462763bdd5,a04724c816e5f..0000000000000
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@@ -483,12 -517,28 +513,26 @@@ static int xattr_entrylist(struct xattr
  {
  	struct listxattr_iter *it =
  		container_of(_it, struct listxattr_iter, it);
- 	unsigned int prefix_len;
- 	const char *prefix;
+ 	unsigned int base_index = entry->e_name_index;
+ 	unsigned int prefix_len, infix_len = 0;
+ 	const char *prefix, *infix = NULL;
+ 	const struct xattr_handler *h;
+ 
+ 	if (entry->e_name_index & EROFS_XATTR_LONG_PREFIX) {
+ 		struct erofs_sb_info *sbi = EROFS_SB(_it->sb);
+ 		struct erofs_xattr_prefix_item *pf = sbi->xattr_prefixes +
+ 			(entry->e_name_index & EROFS_XATTR_LONG_PREFIX_MASK);
+ 
+ 		if (pf >= sbi->xattr_prefixes + sbi->xattr_prefix_count)
+ 			return 1;
+ 		infix = pf->prefix->infix;
+ 		infix_len = pf->infix_len;
+ 		base_index = pf->prefix->base_index;
+ 	}
  
- 	prefix = erofs_xattr_prefix(entry->e_name_index, it->dentry);
- 	if (!prefix)
+ 	h = erofs_xattr_handler(base_index);
+ 	if (!h || (h->list && !h->list(it->dentry)))
  		return 1;
 -
 -	prefix = xattr_prefix(h);
  	prefix_len = strlen(prefix);
  
  	if (!it->buffer) {

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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-13 14:46 linux-next: manual merge of the erofs tree with the vfs-idmapping tree broonie
@ 2023-04-13 15:49 ` Mark Brown
  2023-04-13 16:16   ` Gao Xiang
  2023-04-20  9:36   ` Christian Brauner
  0 siblings, 2 replies; 9+ messages in thread
From: Mark Brown @ 2023-04-13 15:49 UTC (permalink / raw)
  To: Gao Xiang
  Cc: Christian Brauner, Gao Xiang, Jingbo Xu,
	Linux Kernel Mailing List, Linux Next Mailing List

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

On Thu, Apr 13, 2023 at 03:46:51PM +0100, broonie@kernel.org wrote:

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

No, that's wrong.  This:

diff --cc fs/erofs/xattr.c
index 015462763bdd5,a04724c816e5f..0000000000000
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@@ -483,12 -517,28 +513,25 @@@ static int xattr_entrylist(struct xattr
  {
  	struct listxattr_iter *it =
  		container_of(_it, struct listxattr_iter, it);
- 	unsigned int prefix_len;
- 	const char *prefix;
+ 	unsigned int base_index = entry->e_name_index;
+ 	unsigned int prefix_len, infix_len = 0;
+ 	const char *prefix, *infix = NULL;
 -	const struct xattr_handler *h;
+ 
+ 	if (entry->e_name_index & EROFS_XATTR_LONG_PREFIX) {
+ 		struct erofs_sb_info *sbi = EROFS_SB(_it->sb);
+ 		struct erofs_xattr_prefix_item *pf = sbi->xattr_prefixes +
+ 			(entry->e_name_index & EROFS_XATTR_LONG_PREFIX_MASK);
+ 
+ 		if (pf >= sbi->xattr_prefixes + sbi->xattr_prefix_count)
+ 			return 1;
+ 		infix = pf->prefix->infix;
+ 		infix_len = pf->infix_len;
+ 		base_index = pf->prefix->base_index;
+ 	}
  
- 	prefix = erofs_xattr_prefix(entry->e_name_index, it->dentry);
 -	h = erofs_xattr_handler(base_index);
 -	if (!h || (h->list && !h->list(it->dentry)))
++	prefix = erofs_xattr_prefix(base_index, it->dentry);
 +	if (!prefix)
  		return 1;
 -
 -	prefix = xattr_prefix(h);
  	prefix_len = strlen(prefix);
  
  	if (!it->buffer) {

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

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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-13 15:49 ` Mark Brown
@ 2023-04-13 16:16   ` Gao Xiang
  2023-04-13 16:23     ` Mark Brown
  2023-04-20  9:36   ` Christian Brauner
  1 sibling, 1 reply; 9+ messages in thread
From: Gao Xiang @ 2023-04-13 16:16 UTC (permalink / raw)
  To: Mark Brown, Gao Xiang
  Cc: Christian Brauner, Jingbo Xu, Linux Kernel Mailing List,
	Linux Next Mailing List

Hi Mark,

On 2023/4/13 23:49, Mark Brown wrote:
> On Thu, Apr 13, 2023 at 03:46:51PM +0100, broonie@kernel.org wrote:
> 
>> 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.
> 
> No, that's wrong.  This:

Thanks.  Actually I didn't update the corresponind xattr patches (just
rebase some older commits, also I'd like to avoid in the future, but
sometimes it's impossible at least if some RVB is added...)

I think it could be resolved as before by Stephen:
https://lore.kernel.org/r/20230412101942.75e3efa9@canb.auug.org.au

And which looks the same as below:

> 
> diff --cc fs/erofs/xattr.c
> index 015462763bdd5,a04724c816e5f..0000000000000
> --- a/fs/erofs/xattr.c
> +++ b/fs/erofs/xattr.c
> @@@ -483,12 -517,28 +513,25 @@@ static int xattr_entrylist(struct xattr
>    {
>    	struct listxattr_iter *it =
>    		container_of(_it, struct listxattr_iter, it);
> - 	unsigned int prefix_len;
> - 	const char *prefix;
> + 	unsigned int base_index = entry->e_name_index;
> + 	unsigned int prefix_len, infix_len = 0;
> + 	const char *prefix, *infix = NULL;
>   -	const struct xattr_handler *h;
> +
> + 	if (entry->e_name_index & EROFS_XATTR_LONG_PREFIX) {
> + 		struct erofs_sb_info *sbi = EROFS_SB(_it->sb);
> + 		struct erofs_xattr_prefix_item *pf = sbi->xattr_prefixes +
> + 			(entry->e_name_index & EROFS_XATTR_LONG_PREFIX_MASK);
> +
> + 		if (pf >= sbi->xattr_prefixes + sbi->xattr_prefix_count)
> + 			return 1;
> + 		infix = pf->prefix->infix;
> + 		infix_len = pf->infix_len;
> + 		base_index = pf->prefix->base_index;
> + 	}
>    
> - 	prefix = erofs_xattr_prefix(entry->e_name_index, it->dentry);
>   -	h = erofs_xattr_handler(base_index);
>   -	if (!h || (h->list && !h->list(it->dentry)))
> ++	prefix = erofs_xattr_prefix(base_index, it->dentry);
>   +	if (!prefix)
>    		return 1;
>   -
>   -	prefix = xattr_prefix(h);
>    	prefix_len = strlen(prefix);
>    
>    	if (!it->buffer) {

Thanks,
Gao Xiang


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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-13 16:16   ` Gao Xiang
@ 2023-04-13 16:23     ` Mark Brown
  2023-04-13 16:27       ` Gao Xiang
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2023-04-13 16:23 UTC (permalink / raw)
  To: Gao Xiang
  Cc: Gao Xiang, Christian Brauner, Jingbo Xu,
	Linux Kernel Mailing List, Linux Next Mailing List

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

On Fri, Apr 14, 2023 at 12:16:46AM +0800, Gao Xiang wrote:

> Thanks.  Actually I didn't update the corresponind xattr patches (just
> rebase some older commits, also I'd like to avoid in the future, but
> sometimes it's impossible at least if some RVB is added...)

> I think it could be resolved as before by Stephen:
> https://lore.kernel.org/r/20230412101942.75e3efa9@canb.auug.org.au

> And which looks the same as below:

Probably some context changed which caused me to have to reresolve the
conflict?  Or perhaps just rerere not syncing properly from Stephen's
work.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-13 16:23     ` Mark Brown
@ 2023-04-13 16:27       ` Gao Xiang
  0 siblings, 0 replies; 9+ messages in thread
From: Gao Xiang @ 2023-04-13 16:27 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gao Xiang, Christian Brauner, Jingbo Xu,
	Linux Kernel Mailing List, Linux Next Mailing List



On 2023/4/14 00:23, Mark Brown wrote:
> On Fri, Apr 14, 2023 at 12:16:46AM +0800, Gao Xiang wrote:
> 
>> Thanks.  Actually I didn't update the corresponind xattr patches (just
>> rebase some older commits, also I'd like to avoid in the future, but
>> sometimes it's impossible at least if some RVB is added...)
> 
>> I think it could be resolved as before by Stephen:
>> https://lore.kernel.org/r/20230412101942.75e3efa9@canb.auug.org.au
> 
>> And which looks the same as below:
> 
> Probably some context changed which caused me to have to reresolve the
> conflict?  Or perhaps just rerere not syncing properly from Stephen's
> work.

Not sure.. I didn't change the file itself.

Anyway, thanks for the efforts and time!

Thanks,
Gao Xiang

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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-13 15:49 ` Mark Brown
  2023-04-13 16:16   ` Gao Xiang
@ 2023-04-20  9:36   ` Christian Brauner
  1 sibling, 0 replies; 9+ messages in thread
From: Christian Brauner @ 2023-04-20  9:36 UTC (permalink / raw)
  To: Mark Brown
  Cc: Gao Xiang, Gao Xiang, Jingbo Xu, Linux Kernel Mailing List,
	Linux Next Mailing List

On Thu, Apr 13, 2023 at 04:49:27PM +0100, Mark Brown wrote:
> On Thu, Apr 13, 2023 at 03:46:51PM +0100, broonie@kernel.org wrote:
> 
> > 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.
> 
> No, that's wrong.  This:

Yes, that fixup looks correct, thank you! 

> 
> diff --cc fs/erofs/xattr.c
> index 015462763bdd5,a04724c816e5f..0000000000000
> --- a/fs/erofs/xattr.c
> +++ b/fs/erofs/xattr.c
> @@@ -483,12 -517,28 +513,25 @@@ static int xattr_entrylist(struct xattr
>   {
>   	struct listxattr_iter *it =
>   		container_of(_it, struct listxattr_iter, it);
> - 	unsigned int prefix_len;
> - 	const char *prefix;
> + 	unsigned int base_index = entry->e_name_index;
> + 	unsigned int prefix_len, infix_len = 0;
> + 	const char *prefix, *infix = NULL;
>  -	const struct xattr_handler *h;
> + 
> + 	if (entry->e_name_index & EROFS_XATTR_LONG_PREFIX) {
> + 		struct erofs_sb_info *sbi = EROFS_SB(_it->sb);
> + 		struct erofs_xattr_prefix_item *pf = sbi->xattr_prefixes +
> + 			(entry->e_name_index & EROFS_XATTR_LONG_PREFIX_MASK);
> + 
> + 		if (pf >= sbi->xattr_prefixes + sbi->xattr_prefix_count)
> + 			return 1;
> + 		infix = pf->prefix->infix;
> + 		infix_len = pf->infix_len;
> + 		base_index = pf->prefix->base_index;
> + 	}
>   
> - 	prefix = erofs_xattr_prefix(entry->e_name_index, it->dentry);
>  -	h = erofs_xattr_handler(base_index);
>  -	if (!h || (h->list && !h->list(it->dentry)))
> ++	prefix = erofs_xattr_prefix(base_index, it->dentry);
>  +	if (!prefix)
>   		return 1;
>  -
>  -	prefix = xattr_prefix(h);
>   	prefix_len = strlen(prefix);
>   
>   	if (!it->buffer) {



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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-12  0:19 Stephen Rothwell
  2023-04-12  2:01 ` Gao Xiang
@ 2023-04-12  2:35 ` Jingbo Xu
  1 sibling, 0 replies; 9+ messages in thread
From: Jingbo Xu @ 2023-04-12  2:35 UTC (permalink / raw)
  To: Stephen Rothwell, Gao Xiang, Christian Brauner, Seth Forshee
  Cc: Christian Brauner (Microsoft),
	Gao Xiang, Linux Kernel Mailing List, Linux Next Mailing List



On 4/12/23 8:19 AM, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the erofs tree got a conflict in:
> 
>   fs/erofs/xattr.c
> 
> between commit:
> 
>   a5488f29835c ("fs: simplify ->listxattr() implementation")
> 
> from the vfs-idmapping tree and commit:
> 
>   3f43a25918ac ("erofs: handle long xattr name prefixes properly")
> 
> from the erofs 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.
> 

Hi,

Thanks for the fix up. It looks good to me.

It passes the corresponding testcase [1].

[1]
https://lore.kernel.org/all/20230411103004.104064-1-jefflexu@linux.alibaba.com/

-- 
Thanks,
Jingbo

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

* Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree
  2023-04-12  0:19 Stephen Rothwell
@ 2023-04-12  2:01 ` Gao Xiang
  2023-04-12  2:35 ` Jingbo Xu
  1 sibling, 0 replies; 9+ messages in thread
From: Gao Xiang @ 2023-04-12  2:01 UTC (permalink / raw)
  To: Stephen Rothwell, Gao Xiang, Christian Brauner, Seth Forshee, Jingbo Xu
  Cc: Christian Brauner (Microsoft),
	Linux Kernel Mailing List, Linux Next Mailing List



On 2023/4/12 08:19, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the erofs tree got a conflict in:
> 
>    fs/erofs/xattr.c
> 
> between commit:
> 
>    a5488f29835c ("fs: simplify ->listxattr() implementation")
> 
> from the vfs-idmapping tree and commit:
> 
>    3f43a25918ac ("erofs: handle long xattr name prefixes properly")
> 
> from the erofs 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, it looks good to me. Also hopefully Jingbo
could test the merged patch as well.

Thanks,
Gao Xiang

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

* linux-next: manual merge of the erofs tree with the vfs-idmapping tree
@ 2023-04-12  0:19 Stephen Rothwell
  2023-04-12  2:01 ` Gao Xiang
  2023-04-12  2:35 ` Jingbo Xu
  0 siblings, 2 replies; 9+ messages in thread
From: Stephen Rothwell @ 2023-04-12  0:19 UTC (permalink / raw)
  To: Gao Xiang, Christian Brauner, Seth Forshee
  Cc: Christian Brauner (Microsoft),
	Gao Xiang, Jingbo Xu, Linux Kernel Mailing List,
	Linux Next Mailing List

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

Hi all,

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

  fs/erofs/xattr.c

between commit:

  a5488f29835c ("fs: simplify ->listxattr() implementation")

from the vfs-idmapping tree and commit:

  3f43a25918ac ("erofs: handle long xattr name prefixes properly")

from the erofs 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/xattr.c
index 015462763bdd,a04724c816e5..000000000000
--- a/fs/erofs/xattr.c
+++ b/fs/erofs/xattr.c
@@@ -483,12 -517,28 +513,25 @@@ static int xattr_entrylist(struct xattr
  {
  	struct listxattr_iter *it =
  		container_of(_it, struct listxattr_iter, it);
- 	unsigned int prefix_len;
- 	const char *prefix;
+ 	unsigned int base_index = entry->e_name_index;
+ 	unsigned int prefix_len, infix_len = 0;
+ 	const char *prefix, *infix = NULL;
 -	const struct xattr_handler *h;
+ 
+ 	if (entry->e_name_index & EROFS_XATTR_LONG_PREFIX) {
+ 		struct erofs_sb_info *sbi = EROFS_SB(_it->sb);
+ 		struct erofs_xattr_prefix_item *pf = sbi->xattr_prefixes +
+ 			(entry->e_name_index & EROFS_XATTR_LONG_PREFIX_MASK);
+ 
+ 		if (pf >= sbi->xattr_prefixes + sbi->xattr_prefix_count)
+ 			return 1;
+ 		infix = pf->prefix->infix;
+ 		infix_len = pf->infix_len;
+ 		base_index = pf->prefix->base_index;
+ 	}
  
- 	prefix = erofs_xattr_prefix(entry->e_name_index, it->dentry);
 -	h = erofs_xattr_handler(base_index);
 -	if (!h || (h->list && !h->list(it->dentry)))
++	prefix = erofs_xattr_prefix(base_index, it->dentry);
 +	if (!prefix)
  		return 1;
 -
 -	prefix = xattr_prefix(h);
  	prefix_len = strlen(prefix);
  
  	if (!it->buffer) {

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

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

end of thread, other threads:[~2023-04-20  9:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 14:46 linux-next: manual merge of the erofs tree with the vfs-idmapping tree broonie
2023-04-13 15:49 ` Mark Brown
2023-04-13 16:16   ` Gao Xiang
2023-04-13 16:23     ` Mark Brown
2023-04-13 16:27       ` Gao Xiang
2023-04-20  9:36   ` Christian Brauner
  -- strict thread matches above, loose matches on Subject: below --
2023-04-12  0:19 Stephen Rothwell
2023-04-12  2:01 ` Gao Xiang
2023-04-12  2:35 ` Jingbo Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).