From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F77AC7EE24 for ; Thu, 1 Jun 2023 03:30:12 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4QWs8L5nk7z3ch6 for ; Thu, 1 Jun 2023 13:30:10 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.alibaba.com (client-ip=115.124.30.113; helo=out30-113.freemail.mail.aliyun.com; envelope-from=hsiangkao@linux.alibaba.com; receiver=) Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4QWs8G5VsFz3bnP for ; Thu, 1 Jun 2023 13:30:06 +1000 (AEST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R521e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Vk-fSKn_1685590200; Received: from 30.97.48.255(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0Vk-fSKn_1685590200) by smtp.aliyun-inc.com; Thu, 01 Jun 2023 11:30:01 +0800 Message-ID: <3997637a-b83a-627e-c2be-6beed51f9651@linux.alibaba.com> Date: Thu, 1 Jun 2023 11:29:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v5 4/6] erofs: make the size of read data stored in buffer_ofs To: Jingbo Xu , xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, linux-erofs@lists.ozlabs.org References: <20230601024347.108469-1-jefflexu@linux.alibaba.com> <20230601024347.108469-5-jefflexu@linux.alibaba.com> From: Gao Xiang In-Reply-To: <20230601024347.108469-5-jefflexu@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On 2023/6/1 10:43, Jingbo Xu wrote: > Since now xattr_iter structures have been unified, make the size of the > read data stored in buffer_ofs. Don't bother reusing buffer_size for > this use, which may be confusing. > > This is in preparation for the following further cleanup. > > Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Thanks, Gao Xiang > --- > fs/erofs/xattr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/erofs/xattr.c b/fs/erofs/xattr.c > index a691d539ae4f..19f9bf67440c 100644 > --- a/fs/erofs/xattr.c > +++ b/fs/erofs/xattr.c > @@ -337,7 +337,7 @@ static int xattr_checkbuffer(struct erofs_xattr_iter *it, > { > int err = it->buffer_size < value_sz ? -ERANGE : 0; > > - it->buffer_size = value_sz; > + it->buffer_ofs = value_sz; > return !it->buffer ? 1 : err; > } > > @@ -370,7 +370,7 @@ static int inline_getxattr(struct inode *inode, struct erofs_xattr_iter *it) > if (ret != -ENOATTR) > break; > } > - return ret ? ret : it->buffer_size; > + return ret ? ret : it->buffer_ofs; > } > > static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *it) > @@ -392,7 +392,7 @@ static int shared_getxattr(struct inode *inode, struct erofs_xattr_iter *it) > if (ret != -ENOATTR) > break; > } > - return ret ? ret : it->buffer_size; > + return ret ? ret : it->buffer_ofs; > } > > static bool erofs_xattr_user_list(struct dentry *dentry)