Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Jianan <jnhuang@linux.alibaba.com>
To: Gao Xiang <hsiangkao@linux.alibaba.com>
Cc: linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH] erofs-utils: fuse: introduce xattr support
Date: Thu, 28 Jul 2022 20:11:36 +0800	[thread overview]
Message-ID: <cde0a4da-4add-27dd-8222-4e288b03cd06@linux.alibaba.com> (raw)
In-Reply-To: <YtaFqh7KEe/ku/b/@B-P7TQMD6M-0146.local>



在 2022/7/19 18:21, Gao Xiang 写道:
> Hi Jianan,
> 
> On Fri, Jul 15, 2022 at 05:53:59PM +0800, Huang Jianan wrote:
>> This implements xattr functionalities for erofsfuse. A large amount
>> of code was adapted from Linux kernel.
>>
>> Signed-off-by: Huang Jianan <jnhuang@linux.alibaba.com>
>> ---
>>   fuse/main.c              |  32 +++
>>   include/erofs/internal.h |   8 +
>>   include/erofs/xattr.h    |  21 ++
>>   lib/xattr.c              | 508 +++++++++++++++++++++++++++++++++++++++
>>   4 files changed, 569 insertions(+)
>>
>> diff --git a/fuse/main.c b/fuse/main.c
>> index f4c2476..30a0bed 100644
>> --- a/fuse/main.c
>> +++ b/fuse/main.c
>> @@ -139,7 +139,39 @@ static int erofsfuse_readlink(const char *path, char *buffer, size_t size)
>>   	return 0;
>>   }
>>   
>> +static int erofsfuse_getxattr(const char *path, const char *name, char *value,
>> +			size_t size)
>> +{
>> +	int ret;
>> +	struct erofs_inode vi;
>> +
>> +	erofs_dbg("getxattr(%s): name=%s size=%llu", path, name, size);
>> +
>> +	ret = erofs_ilookup(path, &vi);
>> +	if (ret)
>> +		return ret;
>> +
>> +	return erofs_getxattr(&vi, name, value, size);
>> +}
>> +
>> +static int erofsfuse_listxattr(const char *path, char *list, size_t size)
>> +{
>> +	int ret;
>> +	struct erofs_inode vi;
>> +	int i;
> 
> As we discussed offline, this line should be unneeded.
A new patch has been sent, in addition a test case has been added.

Thanks,
Jianan
> 
> Thanks,
> Gao Xiang

      reply	other threads:[~2022-07-28 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  9:53 [PATCH] erofs-utils: fuse: introduce xattr support Huang Jianan
2022-07-19 10:21 ` Gao Xiang
2022-07-28 12:11   ` Huang Jianan [this message]

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=cde0a4da-4add-27dd-8222-4e288b03cd06@linux.alibaba.com \
    --to=jnhuang@linux.alibaba.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox