From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Hongbo Li <lihongbo22@huawei.com>,
xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com,
jefflexu@linux.alibaba.com
Cc: linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] erofs: fix file handle encoding for 64-bit NIDs
Date: Wed, 7 May 2025 17:56:57 +0800 [thread overview]
Message-ID: <56196c13-954f-4185-a17b-d52e337cb4f8@linux.alibaba.com> (raw)
In-Reply-To: <20250507094015.14007-1-lihongbo22@huawei.com>
On 2025/5/7 17:40, Hongbo Li wrote:
> EROFS uses NID to indicate the on-disk inode offset, which can
> exceed 32 bits. However, the default encode_fh uses the ino32,
> thus it doesn't work if the image is larger than 128GiB.
>
> Let's introduce our own helpers to encode file handles.
>
> It's easy to reproduce:
> 1. prepare an erofs image with nid bigger than U32_MAX
> 2. mount -t erofs foo.img /mnt/erofs
> 3. set exportfs with configuration: /mnt/erofs *(rw,sync,
> no_root_squash)
> 4. mount -t nfs $IP:/mnt/erofs /mnt/nfs
> 5. md5sum /mnt/nfs/foo # foo is the file which nid bigger
> than U32_MAX. # you will get ESTALE error.
>
> In the case of overlayfs, the underlying filesystem's file
> handle is encoded in ovl_fb.fid, which is similar to NFS's
> case. If the NID of file is larger than U32_MAX, the overlay
> will get -ESTALE error when calls exportfs_decode_fh.
>
> Fixes: 3e917cc305c6 ("erofs: make filesystem exportable")
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
prev parent reply other threads:[~2025-05-07 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 9:40 Hongbo Li
2025-05-07 9:56 ` Gao Xiang [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=56196c13-954f-4185-a17b-d52e337cb4f8@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=chao@kernel.org \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=lihongbo22@huawei.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiang@kernel.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
all inboxes | Powered by JetHome®