[LTP] [PATCH v2] syscalls/statx04: use stx_attributes_mask before test

Cyril Hrubis chrubis@suse.cz
Wed Sep 11 14:47:14 CEST 2019


Hi!
> Do you mean use getxattr to ensure bitflags are enable or a functions test?
> I am confused.

For a given filesystem the support for filling in these flags was added
at some point to the kernel. If any kernel newer that this version fails
to fill them up it's a bug.

For ext2 it has been added in:

commit 93bc420ed41df63a18ae794101f7cbf45226a6ef
Author: yangerkun <yangerkun@huawei.com>
Date:   Mon Feb 18 09:07:02 2019 +0800

    ext2: support statx syscall

Hence starting kernel 5.0 ext2 (with ext2 driver) has to set the mask.

For ext4 it has been added in:

commit 3209f68b3ca4667069923a325c88b21131bfdf9f
Author: David Howells <dhowells@redhat.com>
Date:   Fri Mar 31 18:32:17 2017 +0100

	statx: Include a mask for stx_attributes in struct statx


Hence for ext4 the flags should be enabled since kernel 4.11

etc.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list