On Tue, 2005-10-18 at 13:47, Paul Eggert wrote: > "Paul A. Clarke" <[EMAIL PROTECTED]> writes: > > Indeed, the above referenced code from mountlist.c will accidentally > > trip over the "logdev=" and "rtdev=" options for XFS, as well as the > > "dev=" option used by IBM's GPFS. > > Thanks for your detailed analysis. The former should be easy to fix, > but what's the latter? I couldn't find documentation about GPFS and > mnttab with a quick Google search.
I don't think the GPFS use of "dev=" is documented. But, let me pose the question a different way: why is the "df" command looking for "dev=" in the mount options of filesystems which don't even support it? Is there a documented standard to which this conforms? If not, it would seem like this obscure special procesing in df is sort of an obscure miniature time bomb. :) Unless a standard is at play, I propose removing the special processing _except_ for filesystems which support it. (Unfortunately, I'm not familiar with all filesystems ;-), but none of the filesystems I'm familiar with on Linux support it, thus my original patch.) > > Attached is a trivial and minimal patch which removes the code which > > does the "dev=" special processing, although only for Linux. > > How about the following fancier patch. Does it treat GPFS correctly? ... > (strcmp (Fs_type, "autofs") == 0 \ > + || strcmp (Fs_type, "none") == 0 \ > + || strcmp (Fs_type, "proc") == 0 \ > || strcmp (Fs_type, "subfs") == 0 \ > /* for Irix 6.5 */ \ > || strcmp (Fs_type, "ignore") == 0) It's interesting to see there's a precedent for filesystem-specific processing, and even operating system-specific processing. Not to stray too far, but shouldn't the "Irix 6.5" code be conditionally compiled only for Irix 6.5? > - devopt = strstr (mnt->mnt_opts, "dev="); > + me->me_dev = (dev_t) -1; /* Magic; means not known yet. */ > + devopt = strstr (mnt->mnt_opts, ",dev="); This won't work if "dev=" is the first option. (Although it looks like, at least on my Linux system, the options are reordered such that ro/rw is always the first one...can one depend on that behavior?) Regards, PC _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
