2023-04-12 01:05:17

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the erofs tree with the vfs-idmapping tree

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


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2023-04-12 02:04:45

by Gao Xiang

[permalink] [raw]
Subject: Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree



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

2023-04-12 02:37:51

by Jingbo Xu

[permalink] [raw]
Subject: Re: linux-next: manual merge of the erofs tree with the vfs-idmapping tree



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/[email protected]/

--
Thanks,
Jingbo