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

Re: df not showing ext3 partition



On Aug 30, 2001  17:44 -0600, Curtis Hogg wrote:
> One thing I think i've found, with mount, is that the kernel is probably
> reading the superblock information from the partition whilst making it's
> decisions. I've noticed behaviour in mount that does a similar check...
> I'm in the process of patching mount to do this check if the fstype
> reported is 'auto'... i haven't actually patched the writeout to
> /etc/mtab yet, but so far during boot, it properly detects that the
> partition type was ext3... All I will have to do after this, is modify the
> -f /etc/mtab writeout to use the value garnered from the code I added, so
> /etc/mtab will always reflect actual fs type, not 'auto'.
> 
> Anyone have a better idea on this?

May as well just use the output from "/proc/mounts" to determine the type.
It saves you from probing the superblocks again from userspace, and also
because the kernel is always RIGHT for the root fs, while the mount code
may get it wrong for some reason (unsupported fs type, etc).

If /proc/mounts is not available, then falling back to the mount probe
code is a 99% correct alternative.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert





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