From: "Darrick J. Wong" <djwong@kernel.org>
To: Zorro Lang <zlang@redhat.com>
Cc: Joanne Chang <joannechien@google.com>,
fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH v3] common/rc: add _require_blocks_in_file helper
Date: Sun, 8 Feb 2026 17:53:26 -0800 [thread overview]
Message-ID: <20260209015326.GK1535390@frogsfrogsfrogs> (raw)
In-Reply-To: <20260208195043.vhvkanq5pysbb74y@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com>
On Mon, Feb 09, 2026 at 03:50:43AM +0800, Zorro Lang wrote:
> On Mon, Jan 12, 2026 at 11:20:36AM +0800, Joanne Chang wrote:
> > On Sat, Jan 10, 2026 at 9:38 AM Darrick J. Wong <djwong@kernel.org> wrote:
> > > On Thu, Jan 08, 2026 at 02:25:01AM +0000, Joanne Chang wrote:
> > > > generic/735 attempts to create a file with nearly 2^32 blocks. However,
> > > > some filesystems have a maximum file block limit below this threshold.
> > > > For instance, F2FS is limited to approximately 2^30 blocks due to the
> > > > capacity of the inode. So add _require_blocks_in_file helper to skip the
> > > > test in such cases.
> > > >
> > > > The helper uses a hardcoded constant instead of a programmatic method,
> > > > so that bugs which affect the maximum file size are not masked.
> > >
> > > Not to mention trying to create a file with 1,057,053,439 blocks
> > > allocated to it would probably take forever.
> > >
> > > Hang on, we're talking about iblocks (aka the number of blocks allocated
> > > to this inode), not the maximum file size in blocks, right?
> > >
> > > If so, then maybe this function and its comments should
> > > s/blocks/iblocks/? Or am I confused? ;)
> > >
> > > --D
> >
> > If I understand correctly, generic/735 creates a large logical file, but
> > the actual physical block allocation is much smaller. Also, the F2FS
> > limitation is about how many blocks the inode can address, no matter if
> > the blocks are actually allocated.
> >
> > So I believe the requirement is about the maximum file size in blocks,
> > not the number of blocks actually allocated. Does it make sense to keep
> > the name, or do you think another term would be clearer? I appreciate
> > your thoughts on this.
>
> Hi Darrick,
>
> I think Joanne's explanation makes sense, if you don't have more review points
> on it, I'll merge this patch.
Agpgth, I didn't notice this reply! My apologies! :(
Ok, since this is a limit on the maximum logical file block number,
_require_max_file_range_blocks, perhaps?
--D
>
> Thanks,
> Zorro
>
> >
> > Best regards,
> > Joanne
> >
>
next prev parent reply other threads:[~2026-02-09 1:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 2:25 [PATCH v3] common/rc: add _require_blocks_in_file helper Joanne Chang
2026-01-10 1:38 ` Darrick J. Wong
2026-01-12 3:20 ` Joanne Chang
2026-02-08 19:50 ` Zorro Lang
2026-02-09 1:53 ` Darrick J. Wong [this message]
2026-02-09 3:54 ` Zorro Lang
2026-02-09 5:55 ` Joanne Chang
2026-01-23 4:08 ` Chao Yu
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=20260209015326.GK1535390@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=joannechien@google.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=zlang@redhat.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