atom feed15 messages in org.freebsd.freebsd-fsRe: umount -f implementation
FromSent OnAttachments
Rick MacklemJun 28, 2009 4:59 pm 
Nathanael HoyleJun 28, 2009 5:31 pm 
David G LawrenceJun 28, 2009 9:52 pm 
Attilio RaoJun 29, 2009 2:55 am 
Rick MacklemJun 29, 2009 7:38 am 
Rick MacklemJun 29, 2009 8:16 am 
Bruce EvansJun 29, 2009 10:52 am 
Rick C. PettyJun 29, 2009 4:26 pm 
Rick MacklemJun 30, 2009 9:00 am 
Attilio RaoJun 30, 2009 9:07 am 
Kostik BelousovJun 30, 2009 12:32 pm 
Rick MacklemJun 30, 2009 1:03 pm 
Kirk McKusickJun 30, 2009 2:58 pm 
Julian H. StaceyJun 30, 2009 5:48 pm 
Rick MacklemJul 1, 2009 10:26 am 
Subject:Re: umount -f implementation
From:Kirk McKusick (mcku@mckusick.com)
Date:Jun 30, 2009 2:58:16 pm
List:org.freebsd.freebsd-fs

Just for the history books, there originally were two forms of forced unmounts. The gentle force (-f) and the brute force (-F) unmount. The -f unmount flushes out all the dirty buffers so that when the unmount completes no data is lost and the filesystem is in a consistent state. The -F unmount invalidates and discards all the dirty buffers without attempting to do any I/O on them. The result is lost data and a possibly inconsistent filesystem. But it will get the job done even if the disk has died or the server has gone away.

For reasons that I never tracked down, the -F unmount option was never incorporated into FreeBSD when they did the merge from 4.4BSD-Lite II, so that functionality never made it into the system. It is actually much easier to do than unmount -f since you just walk through and set B_INVAL and B_ERROR on all the dirty buffers for that filesystem. The problem with unmount -f is that it will hang if the server is gone since it will insist on pushing back all the dirty buffers.