LWN.net Logo

Forced unmount

Forced unmount

Posted Aug 3, 2006 17:40 UTC (Thu) by rvfh (subscriber, #31018)
Parent article: revoke() and frevoke()

Could not some of that be userspace?

  • find open files on filesystem, and there owning processes
  • kill the processes in question*
  • unmount filesystem

* This _needs_ to be in userspace, so the user (who most likely asked for the unmount in the first place) can do something about it (save unsaved files...)

But maybe my knowledge is just out-dated, and this is already the case, and the problem at hand is a different one...


(Log in to post comments)

Forced unmount

Posted Aug 4, 2006 4:11 UTC (Fri) by efexis (guest, #26355) [Link]

You don't always want to kill the process; many processes could handle a file being closed without having to terminate, and would want to if it was multithreaded, with one thread using that file (eg, disconnecting a file from a browser, you wouldn't want to lose all browser windows).

It could also be the kernel that has the file open (eg, mounted into the filesystem using loopback block device); killing the kernel to release the file isn't desirable =)

I think if you're detaching files, a signal should be sent to processes at the same time, so they know the file is closed before they try and fail a read/write.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds