[LTP] [PATCH] statx09: Reduce fs-verity blocksize to 1024
Martin Doucha
mdoucha@suse.cz
Fri Jul 14 14:32:14 CEST 2023
On 14. 07. 23 13:47, Petr Vorel wrote:
>> There are a few different approaches you could take. One would be the one you
>> mentioned: just add "-b 4096". Though, note that systems with non-4K pages and
>> kernel older than v6.3 can't mount an "-O verity -b 4096" filesystem.
>
> I suppose the problem would be with e.g. ppc64le. Because otherwise
> it works with this setup (untested on ppc64le, I believe it'd fail):
> .dev_fs_opts = (const char *const []){"-O verity", "-b 4096", NULL},
> and kept enable.block_size = 4096
> the test passes on older kernels 6.2.12-1-default (openSUSE), 5.10.0-8-amd64
> (Debian) as well as on 6.3 kernel.
>
>> Or you could query the filesystem block size (that resulted from mkfs.ext4 with
>> unspecified block size) and use that as the Merkle tree block size.
>
> Unless it's not too complicated, it looks to me the best, as it'd support both
> >= 6.3 and older kernels.
Querying the filesystem size doesn't help on older kernels because
mkfs.ext4 still creates the filesystem with small blocksize and setup()
exits with TCONF because it can't mount the loop device, as you've seen
in your own experiments. But it'll work on kernels v6.3+ so I've
submitted that as v2.
For the older kernels, we'll have to run mkfs.ext4 in setup() with
dynamically constructed command line arguments and set blocksize
explicitly to pagesize.
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list