public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <aelder@sgi.com>
To: xfs@oss.sgi.com
Subject: [PATCH 0/6] xfsprogs: tolerate mount or project errors
Date: Mon,  3 Oct 2011 07:49:14 -0500	[thread overview]
Message-ID: <1317646160-5437-1-git-send-email-aelder@sgi.com> (raw)

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

             reply	other threads:[~2011-10-03 12:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 12:49 Alex Elder [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317646160-5437-1-git-send-email-aelder@sgi.com \
    --to=aelder@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox