]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/rc: improve _fstyp_has_non_default_seek_data_hole()
authorJeffle Xu <jefflexu@linux.alibaba.com>
Mon, 13 May 2019 09:14:41 +0000 (17:14 +0800)
committerEryu Guan <guaneryu@gmail.com>
Tue, 14 May 2019 03:10:02 +0000 (11:10 +0800)
commitb6908c6e23d4ce7411c132623617c100d697568c
tree7acbc0dd1f225fc56223a26dec52e14fd0dae791
parentf8f57747222de156e253200e5e3adbf10e4b0df6
common/rc: improve _fstyp_has_non_default_seek_data_hole()

commit 34081087 adds more sanity to seek_sanity_test() to prevent
a lseek() implementation regression from being ignored, and a
hardcoded whitelist is maintained to distinguish whether a
filesystem type only supports non-default behavior of SEEK_HOLE
or not.

In commit 34081087, NFS is listed in this whitelist, that is, NFS
is thought supporting non-default behavior only. However as far as
I know, nfsv2 and nfsv3 only support default behavior of SEEK_HOLE
(that is, always returning EOF) in linux.

On the other hand, xfstests uses "mount -t nfs ..." to mount a
NFS mount point. Normally the mount point is mounted as nfsv4,
but it can be mounted mandatorily as nfsv3 if we specify
"Nfsvers=3" in /etc/nfsmount.conf. In this case, a series of
tests fail (including generic/285, generic/448, generic/490, etc.)
with error message "Default behavior is not allowed. Aborting."

So I just make some special handling for NFS in
_fstyp_has_non_default_seek_data_hole(), that is, default behavior
of SEEK_HOLE is acceptable for nfsv2 and nfsv3.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc