bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df enhancment for removable media


From: Paul Eggert
Subject: Re: df enhancment for removable media
Date: Wed, 21 Sep 2005 13:43:24 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Juergen Weigert <address@hidden> writes:

>> Unless I'm missing something I'd rather not change the default behavor
>> of df, as that would be a compatibility hassle.  That is, df shouldn't
>> attempt to mount file systems by default; it should do so only if the
>> user asks, with a new option.
>
> These hald mounts are different. For almost every aspect such a device
> appears to be mounted. So I figured, df should also pretend the 
> device is mounted.

But lots of programs other than df invoke statfs.  We shouldn't have
to change them all.  Instead, it would be much better to fix statfs to
do the right thing with hald mounts.  statfs should return values that
are consistent with every other system call: it should not return
incorrect values simply for the convenience of some low-level hardware
abstraction layer.

Please also see the message from Ivan Guyrdiev of Cornell archived at
<http://www.nsa.gov/selinux/list-archive/0507/thread_body36.cfm> dated
2005-07-20 in which he says something similar: the statfs
implementation needs to get fixed.


> Looks ugly in df.c, right. But in fsusage.c we'd have to place the 
> new code in multiple implementations. Ugly too.

It would only need to be placed in sections corresponding to
implementations that have the bug.  Currently, that's just one
implementation: GNU/Linux, and only a small subset of these hosts as
well.  Since the workaround issues more system calls, it would be nice
to detect the broken implementations at compile-time somehow, or at
least filter out the obviously non-broken implementations.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]