public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Adrian Bunk <bunk@stusta.de>
Cc: Oliver Neukum <oliver@neukum.org>,
	luto@myrealbox.com, aebr@win.tue.nl,
	linux-kernel@vger.kernel.org
Subject: Re: the umount() saga for regular linux desktop users
Date: Sun, 2 Jan 2005 21:56:50 +0100	[thread overview]
Message-ID: <20050102205650.GG18136@elf.ucw.cz> (raw)
In-Reply-To: <20050102205151.GE4183@stusta.de>

Hi!
> > > > Well, umount -l can be handy, but it does not allow you to get your CD
> > > > back from the drive.
> > > > 
> > > > umount --kill that kills whoever is responsible for filesystem being
> > > > busy would solve part of the problem (that can be done in userspace,
> > > > today).
> > > >...
> > > 
> > > What's wrong with
> > > 
> > >   fuser -k /mnt && umount /mnt
> > 
> > 1. Would need suid.
> 
> It needs suid only if you aren't root and you want to kill processes you 
> don't own.
> 
> Yes, this might cause problems e.g. if users are allowed to mount their 
> cdroms, but simply allowing them to kill processes of other users who 
> access this device isn't a solution, too.
> 
> > 2. Is a mindless slaughter of important processes.
> 
> It's what Pavel wanted to get included in umount.
> 
> Usually, you'll let fuser give you the list of processes and inspect 
> them manually.
> 
> > 3. Is a race condition.
> 
> Then put it into a while loop that executes until umount returns 0.
> 
> I still fail to see why I should implement half of fuser in umount. 
> Either you are working at the command line and know about fuser or you 
> are working through a GUI which can offer you a "kill all applications 
> accessing this device" button that calls fuser.

Okay, so the right solution is probably something more like

while umount /mnt; do
	fuser -km -TERM /mnt
	sleep 1
	fuser -km /mnt
done

Not sure how many command line users can do this... Perhaps including
fumount script doing this is good idea?
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

  reply	other threads:[~2005-01-02 20:57 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-02 19:37 the umount() saga for regular linux desktop users Pavel Machek
2005-01-02 20:11 ` Adrian Bunk
2005-01-02 20:15   ` Pavel Machek
2005-01-02 20:34   ` Oliver Neukum
2005-01-02 20:51     ` Adrian Bunk
2005-01-02 20:56       ` Pavel Machek [this message]
2005-01-02 21:05         ` Adrian Bunk
2005-01-03  9:35           ` Frank van Maarseveen
2005-01-03 19:14             ` Ingo Oeser
2005-01-02 20:36   ` Adrian Bunk
2005-01-03  1:36     ` Puneet Vyas
2005-01-02 20:36   ` Andreas Schwab
     [not found] <fa.foeqpaf.nlmd9n@ifi.uio.no>
     [not found] ` <fa.d9avdr3.1jm46gr@ifi.uio.no>
2005-01-03  1:17   ` Bodo Eggert
     [not found] <fa.iji5lco.m6nrs@ifi.uio.no>
     [not found] ` <fa.fv0gsro.143iuho@ifi.uio.no>
2005-01-02 12:38   ` Bodo Eggert
2005-01-02 20:27     ` Adrian Bunk
2005-01-03  0:37       ` Bodo Eggert
2005-01-02 22:43     ` Valdis.Kletnieks
2005-01-04 20:28       ` Lee Revell
2005-01-05  2:12         ` Bodo Eggert
  -- strict thread matches above, loose matches on Subject: below --
2004-12-31 17:41 William
2004-12-31 17:47 ` Arjan van de Ven
2004-12-31 17:48 ` Ush
2004-12-31 18:22   ` Gene Heskett
2004-12-31 18:31     ` Miquel van Smoorenburg
2004-12-31 21:48     ` Tom Felker
2005-01-01  0:07       ` Gene Heskett
2004-12-31 17:50 ` Andries Brouwer
2005-01-01 19:40   ` Andy Lutomirski
2004-12-31 17:51 ` Gene Heskett
2005-01-16  4:39 ` Greg Stark

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=20050102205650.GG18136@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=aebr@win.tue.nl \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@myrealbox.com \
    --cc=oliver@neukum.org \
    /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