Skip to content

xfsprogs: tolerate mount or project errors

Alex Elder linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xfsprogs: libxcmd: rearrange some routineslibxcmd/paths.c+82 -801 reply
2/6xfsprogs: libxcmd: avoid using strtok()libxcmd/paths.c+13 -41 reply
3/6xfsprogs: libxcmd: encapsulate fs_table initializationgrowfs/xfs_growfs.c include/path.h io/parent.c +2 more+43 -291 reply
4/6xfsprogs: libxcmd: isolate strdup() calls to fs_table_insert()libxcmd/paths.c+67 -712 replies
5/6xfsprogs: libxcmd: avoid exiting when an error occurslibxcmd/paths.c+20 -461 reply
6/6xfsprogs: libxcmd: ignore errors when initializing fs_tablelibxcmd/paths.c+15 -121 reply

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/6R-b
2/6
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] xfsprogs: tolerate mount or project errors

This series adds a few more cleanups to libxcmd, but they (and the ones recently) were really just ground work leading up to addressing a specific underlying problem, which is done in the last patch (or maybe the last two).

libxcmd includes code to initialize a table with entries that represent mount points and project directories that may be subject to quota enforcement. These are then available as targets of various operations.

When adding an entry to the table, various things can go wrong. For example, a path defined in the projects file might not exist, a mount point specified might not be accessible to the user, or a memory allocation could fail.

Currently, if any error occurs when inserting an entry into this "fs_table", exit() is called so the executing program just quits.

Since this table is simply used to define the available targets of operations, there is no real need to exit when an error occurs setting up just one of its entries. In some cases everything else might be just fine, and normally the entry that causes an error is not even something the user cares to operate on anyway.

The trouble report that led to fixing this had to do with a situation in which automount left some sort of artifact in the list of mounted filesystems, and any attempt to run xfs_growfs was met with an error that prevented it from being run. The errant entry in /proc/self/mounts contained something like this in the mnt_fsname field returned by getmntent(): "/tmp/auto7fGuI5 (deleted)"

This series addresses this by both ignoring errors while initializing fs_table, and by not exiting when an error occurs.

-Alex

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs