Re: [PATCH] hfsplus: limit sb_maxbytes to partition size

Hyunchul Lee
2026-03-06T00:40:20Z

On Thu, Mar 05, 2026 at 06:27:34AM -0800, hch@infradead.org wrote:
> On Thu, Mar 05, 2026 at 09:29:33AM +0900, Hyunchul Lee wrote:
> > Sorry it's generic/285, not generic/268.
> > in generic/285, there is a test that creates a hole exceeding the block
> > size and appends small data to the file. hfsplus fails because it fills
> > the block device and returns ENOSPC. However if it returns EFBIG
> > instead, the test is skipped.
>
> generic/285 needs to call _require_sparse_files.
>

The generic/258(src/seek_sanity_test.c) is considering filesystems
that don't support sparse files[1].

int test_basic_support()
...
pos = lseek(fd, 0, SEEK_HOLE);
...
if (pos == filsze) {
default_behavior = 1;
fprintf(stderr, "File system supports the default behavior.\n");
...

The issue is that there are some tests which write to offsets larger
than the block device. How about skipping for such test cases when
dealing with filesystems that don't support sparse files?

[1]: https://github.com/kdave/xfstests/blob/master/src/seek_sanity_test.c#L1244

--
Thanks,
Hyunchul