linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang via Linux-erofs <linux-erofs@lists.ozlabs.org>
To: Huang Jianan <jnhuang95@gmail.com>
Cc: guoweichao@oppo.com, linux-erofs@lists.ozlabs.org, zhangshiming@oppo.com
Subject: Re: [PATCH 3/5] erofs-utils: fix the wrong address of inline dir content.
Date: Fri, 16 Oct 2020 23:36:03 +0800	[thread overview]
Message-ID: <20201016153559.GA32727@hsiangkao-HP-ZHAN-66-Pro-G1> (raw)
In-Reply-To: <20201015133959.61007-3-huangjianan@oppo.com>

On Thu, Oct 15, 2020 at 09:39:57PM +0800, Huang Jianan wrote:
> Signed-off-by: Huang Jianan <huangjianan@oppo.com>
> Signed-off-by: Guo Weichao <guoweichao@oppo.com>
> ---
>  fuse/namei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fuse/namei.c b/fuse/namei.c
> index 21e6ba0..3503a8d 100644
> --- a/fuse/namei.c
> +++ b/fuse/namei.c
> @@ -158,7 +158,7 @@ struct dcache_entry *disk_lookup(struct dcache_entry *parent, const char *name,
>  	if (v.datalayout == EROFS_INODE_FLAT_INLINE) {
>  		uint32_t dir_off = erofs_blkoff(dirsize);
>  		off_t dir_addr = nid2addr(dcache_get_nid(parent))
> -			+ sizeof(struct erofs_inode_compact);
> +			+ sizeof(struct erofs_inode_compact) + v.xattr_isize;

hmm... just considering this line, I think it should be

+               off_t dir_addr = nid2addr(dcache_get_nid(parent)) +
+                       v.inode_isize + v.xattr_isize;

btw, I've fixed it, will send out the next integrated WIP
erofsfuse patchset.

Thanks,
Gao Xiang

>  
>  		memset(buf, 0, sizeof(buf));
>  		ret = dev_read(buf, dir_off, dir_addr);
> -- 
> 2.25.1
> 

  reply	other threads:[~2020-10-16 15:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 13:39 [PATCH 1/5] erofs-utils: fix the conflict with the master branch Huang Jianan
2020-10-15 13:39 ` [PATCH 2/5] erofs-utils: fix the wrong name length of tail file in the directory Huang Jianan
2020-10-15 13:39 ` [PATCH 3/5] erofs-utils: fix the wrong address of inline dir content Huang Jianan
2020-10-16 15:36   ` Gao Xiang via Linux-erofs [this message]
2020-10-15 13:39 ` [PATCH 4/5] erofs-utils: support read special file Huang Jianan
2020-10-15 13:39 ` [PATCH 5/5] erofs-utils: support read compressed file Huang Jianan
2020-10-16 16:17   ` Gao Xiang via Linux-erofs
2020-10-17  6:24     ` jnhuang95
2020-10-17  6:36       ` Gao Xiang via Linux-erofs
2020-10-16 15:41 ` [PATCH 1/5] erofs-utils: fix the conflict with the master branch Gao Xiang via Linux-erofs

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=20201016153559.GA32727@hsiangkao-HP-ZHAN-66-Pro-G1 \
    --to=linux-erofs@lists.ozlabs.org \
    --cc=guoweichao@oppo.com \
    --cc=hsiangkao@aol.com \
    --cc=jnhuang95@gmail.com \
    --cc=zhangshiming@oppo.com \
    /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;
as well as URLs for NNTP newsgroup(s).