]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
xfstests: 261: test failures caused by bogus mtab entries
authorAlex Elder <aelder@sgi.com>
Mon, 3 Oct 2011 23:01:18 +0000 (23:01 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 6 Oct 2011 21:05:03 +0000 (16:05 -0500)
commitc22f11f56106a1a1e3345532bbbb2206d674e667
tree170eac2b499382555742826e7cae7bb1cd0b4325
parentd6f51d92893497250f1b440e321938a609bfb58b
xfstests: 261: test failures caused by bogus mtab entries

There is code in libxcmd that sets up a table of mount points and
directories that may be subject to quota enforcement.  If any entry
in the mount table (/proc/self/mounts) is inaccessible or has any
other problems, libxcmd exits.

We have encountered mtab entries that appear to be artifacts from
autoumount that, when parsed for getmntent(), return paths in the
mnt_fsname field that do not exist.  Such entries tend to have the
text " (deleted)" appended to a legitimate pathname (although the
space character is expanded to \040, as documented in getmntent(3)).

The xfs_quota command supports the ability to specify an alternate
mount table file, so this test makes use of that feature to exercise
the problem.  The test simply uses xfs_quota to print the current
set of paths, providing an alternate mount table file.  First it
does so with a copy of the current mount table (which is assumed
OK), then an extra bogus entry (very much like what has been seen
in the wild) is appended to the mount table, and runs the xfs_quota
command again.

It does this with no mount options, as well as with user, group, and
project quota options enabled.  (Given the current state of the code
however, only one of these is required.)

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
261 [new file with mode: 0644]
261.out [new file with mode: 0644]
group