Re: buffers not syncing correctly during shutdown

From: Ivan Voras <ivoras_at_freebsd.org>
Date: Thu, 15 Oct 2009 11:47:10 +0200
Alexey Shuvaev wrote:
> On Wed, Oct 14, 2009 at 03:13:00PM +0200, Ivan Voras wrote:
>> Gary Jennejohn wrote:
>>
>>> I personally don't see why it ever should be handled.  This is UNIX not
>>> Windows and users should be smart enough to know that they umount such
>>> devices before removing them otherwise nasty things can happen.
>> Yes, but this is 2009 not 1978.
>>
> Well, the other side of being in 2009 is that filesystems have evolved too.
> For example, I have UFS2 + SU on most of my removable media (sticks and
> external hard drives). I was always interested how
> this new "feature" of FreeBSD, to allow removable media disappear almost
> silently, plays in this case?

I see what you mean - UFS+SU is definitely not suitable for this 
environment. UFS without SU (mounted "normal" or "sync") OTOH is better.

Windows mounts removable devices sync (unless told otherwise) since 
sometime around Win98SE.

> I've had one case when I lost my external hard drive during
> tar -xvf ports.tar.bz2 into it. I haven't touched it at the moment
> (voltage spikes?). It was quite funny trying to browse through
> the half-cached content then... have spent ~5 minutes before noticing
> kernel message.
> Re-plugging the drive has brought it back, with dirty filesystem, of course.
> Maybe it would be better if the system paniced then :/)

This would not help since the newly inserted device would get its own 
descriptor structure, whose pointer is obviously different from the old 
one...

> Anyway, my point is that removing the media with most of
> modern filesystems on it without unmounting is an operator error.
> IMHO, the system should warn such an operators in one or the other way...

Warn about what? That the media has been removed? AFAIK USB does this 
right now. Or you are suggesting another message from the file system 
layer saying: "see, about that in-transit data you are thinking about... 
well, it's gone now." :)
Received on Thu Oct 15 2009 - 07:47:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:57 UTC