Re: [RFC] Let non-root users eject their ipods?

From: Nikita Danilov
Date: Tue Dec 20 2005 - 06:10:27 EST


Coywolf Qi Hunt writes:
> 2005/12/20, Sander <sander@xxxxxxxxxxx>:
> > Coywolf Qi Hunt wrote (ao):

[...]

> > > IMHO, umount doesn't guarantee sync, isn't it?
>
> Actually I was think umount(2), since this is the kernel list, but off
> topic here.
>
> >
> > I'm pretty sure it does :-)
>
> That is because: usually your removable media is not the file system
> root, hence umount(8) can return successfully only if no processes are
> busy working on it.
>
> If you boot from or chroot/pivot into a removable media, and you
> remount it ro, and unplug it, then you may lose data.

sys_umount() writes all cached data back, see generic_shutdown_super()->fsync_super()

>
> -- coywolf

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/