]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: restrict platform_test_xfs_fd to regular files
authorEric Sandeen <sandeen@redhat.com>
Tue, 8 Oct 2013 15:17:50 +0000 (15:17 +0000)
committerRich Johnston <rjohnston@sgi.com>
Thu, 17 Oct 2013 19:53:27 +0000 (14:53 -0500)
commitfcd6fa7f6a29188a756ff8b071a152bc9d62baf4
tree9f6ad9f672b195077b4a6336f58b02c78ff16875
parent5425725c56bccb9a91847cb74cfdadc8b44fecf7
xfsprogs: restrict platform_test_xfs_fd to regular files

If a special file (block, char, pipe etc) resides on an
xfs filesystem, platform_test_xfs_[fd|path] will return
true, but a subsequent xfsctl will fail, because the file
operations to support the xfs ioctls are not set up on such
files (see i_fop assignments in xfs_setup_inode()).

>From the xfsctl manpage it's pretty clear that these functions
are supposed to return true if a subsequent xfsctl can be
handled, so it makes sense to exclude special files.

This was showing up in xfstest generic/306, which creates
the dev/null block device on an xfstest an tries to pwrite
to it with xfs_io - which emitted a warning when the xfsctl
trying to get geometry failed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
include/linux.h