public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] xfsprogs: tolerate mount or project errors
@ 2011-10-03 12:49 Alex Elder
  2011-10-03 12:49 ` [PATCH 1/6] xfsprogs: libxcmd: rearrange some routines Alex Elder
  2011-10-03 13:31 ` [PATCH 0/6] xfsprogs: tolerate mount or project errors Christoph Hellwig
  0 siblings, 2 replies; 17+ messages in thread
From: Alex Elder @ 2011-10-03 12:49 UTC (permalink / raw)
  To: xfs

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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-10-06 19:47 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-03 12:49 [PATCH 0/6] xfsprogs: tolerate mount or project errors Alex Elder
2011-10-03 12:49 ` [PATCH 1/6] xfsprogs: libxcmd: rearrange some routines Alex Elder
2011-10-03 12:49   ` [PATCH 2/6] xfsprogs: libxcmd: avoid using strtok() Alex Elder
2011-10-05 21:58     ` Christoph Hellwig
2011-10-03 12:49   ` [PATCH 3/6] xfsprogs: libxcmd: encapsulate fs_table initialization Alex Elder
2011-10-06 19:42     ` Christoph Hellwig
2011-10-03 12:49   ` [PATCH 4/6] xfsprogs: libxcmd: isolate strdup() calls to fs_table_insert() Alex Elder
2011-10-06 19:45     ` Christoph Hellwig
2011-10-06 19:47       ` Alex Elder
2011-10-03 12:49   ` [PATCH 5/6] xfsprogs: libxcmd: avoid exiting when an error occurs Alex Elder
2011-10-06 19:45     ` Christoph Hellwig
2011-10-03 12:49   ` [PATCH 6/6] xfsprogs: libxcmd: ignore errors when initializing fs_table Alex Elder
2011-10-06 19:47     ` Christoph Hellwig
2011-10-03 13:32   ` [PATCH 1/6] xfsprogs: libxcmd: rearrange some routines Christoph Hellwig
2011-10-03 13:31 ` [PATCH 0/6] xfsprogs: tolerate mount or project errors Christoph Hellwig
2011-10-03 14:21   ` Alex Elder
2011-10-03 14:23     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox