bug-parted
[Top][All Lists]
Advanced

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

Re: check_mntent_file() (was: Re: Resizing root partition)


From: Theodore Ts'o
Subject: Re: check_mntent_file() (was: Re: Resizing root partition)
Date: Sat, 9 Aug 2003 11:46:21 -0400
User-agent: Mutt/1.5.4i

On Sat, Aug 09, 2003 at 03:06:07PM +1000, Andrew Clausen wrote:
> > > Perhaps e2fsprogs' users have less problems because of their usage
> > > modes... but I suspect some e2fsprogs' users are in fact losing data
> > > also.  (Possibly even silently)
> > 
> > If you think so, why don't you report it to the maintaner? I CC'd him this
> > email.
> 
> I was planning to investigate it more first.  (I just sent the email
> quickly, to correct my mistake)
> 
> I checked a newer version (1.34), and it is in fact doing what I
> suggested it should.
> 
> It isn't really a clean solution, though.  (It has 'heuristic'
> written all over it!)

Again, I'm missing context here; what are you concerned about?

> 
> Eg: it will fail if the user runs:
> 
>       "parted /dev/hda"
> 
> And if they use devfs, everywhere else is using devfs names
> (in /proc/mounts and /etc/mtab), and the partition of interest
> (eg: /dev/hda1) doesn't exist.

1) If you're using devfs, devfs is so full of races and other bugs
that you're basically inviting yourself to lose.  One more way of
losing isn't all that interesting to me.  As of Linux 2.6, devfs is
deprecated, and many kernel developers have never thought it was a
good idea in the first place.

2) check_mntent_file is using stat to deal with aliased device nodes,
which is about as much as it can handle.  If the partition doesn't
exist, then obviously it can't be mounted; so what's the problem?

> How should parted figure what partition 1 of /dev/hda is?
> stat /dev/hda, get st_rdev, and add 1?

That should work, and should be relatively safe.  But again, what is
the specific problem you are trying to solve here?

                                                - Ted





reply via email to

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