[arch-projects] [initscrupts][RFC] umount tmpfs and ramfs on shutdown

Seblu seblu at seblu.net
Sun Apr 24 15:42:29 EDT 2011

On Sat, Apr 23, 2011 at 4:32 PM, Tom Gundersen <teg at jklm.no> wrote:
> Hi guys,
> On shutdown we unmount/remount most filesystems. However, we make
> exception fro the "api" filesystems as they might still be useful and
> they are anyway not backed by a block device.
> The problem is that umount does not easily let us make exception based
> on mountpoints, but we have to use mounttype instead. For /sys and
> /proc this is ok, but /dev might be tmpfs, so we have until now
> avoided unmounting any tmpfs filesystems.
> This might be a problem if a tmpfs system is a submount of a
> blockdevice, as this will block the unmounting of the parent device.
> The attached patch (originally by Gerardo) fixes this problem when
> /dev is mounted as devtmpfs and keeps the old behavior if /dev is
> tmpfs.
> I made some adjustments, as noted in the commit message (Gerardo,
> please let me know if this looks ok with you).
> If someone knows of any reason not to unmount tmpfs or ramfs on
> shutdown, please speak up.
I"m happy you ask this. Because your mail subject remember me an old
story about win98 (i guess), which have a big improvment from 95, by
don't unloading some driver at shutdown because it was unecessary.
This "improvment" speed up the shutdown. So the question, was, is
there a reason to unmount ramfs at shutdown?
I understand the unmount chaining issue, but i don't see which case is
problematic, do you have a ticket # ?

2 small points about your patch:
- You should use /bin/grep and not grep, like everywhere else.
- A comment before the if then else to explain why we do this will be cool.

Sébastien Luttringer

More information about the arch-projects mailing list