]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxcmd: populate fs table with xfs entries first, foreign entries last
authorBill O'Donnell <billodo@redhat.com>
Mon, 19 Sep 2016 06:02:22 +0000 (16:02 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 19 Sep 2016 06:02:22 +0000 (16:02 +1000)
commitbb80e3d6cd0470d268921bce96e4c6bc27d7f7b8
treefd8a6f5fe97b3fc5988885f2fb625c916b612744
parentb04647edea32dbbce0fc12ea6f54a8da706a2265
libxcmd: populate fs table with xfs entries first, foreign entries last

Commits b20b6c2 and 29647c8 modified xfs_quota for use on
non-XFS filesystems. Modifications to fs_initialise_mounts
(paths.c) resulted in an xfstest fail (xfs/261), due to foreign
fs paths being picked up first from the fs table. The xfs_quota
print command then complained about not being able to print the
foreign paths, instead of previous behavior (quiet).

This patch restores correct behavior, sorting the table so that
xfs entries are first, followed by foreign fs entries. The patch
maintains the order of xfs entries and foreign entries in the
same order as mtab entries. Then, in functions which print all
paths we can simply break at the first foreign path if the -f
switch is not specified.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
include/path.h
libxcmd/paths.c
quota/path.c