Subject: Re: SOFTDEPS safe for qmail?
To: Peter Seebach <seebs@plethora.net>
From: Don Lewis <Don.Lewis@tsc.tdk.com>
List: current-users
Date: 06/17/2000 04:23:07
On Jun 17,  1:05am, Peter Seebach wrote:
} Subject: Re: SOFTDEPS safe for qmail?
} In message <20000617000112.A7087@rek.tjls.com>, Thor Lancelot Simon writes:
} >me a bit -- and that you can get "synchronous" writes by inserting
} >explicit barriers, e.g. with fsync().  It's easy to use fsync() to
} >guarantee consistency at critical points *without* taking the hit of 
} >doing synchronous writes all the time.
} 
} But does fsync() really work on softdep filesystems?

Yes it does.

} I know that no amount of
} syncing guarantees that "df" will report the right amount immediately after
} a big delete...

fsync() != sync()   A call to fsync() will push the file out to disk
before it returns, whereas sync() schedules everything to be written
and returns without waiting on the actual I/O.

I think the current softdep free space behaviour is a bug.  I think
df should immediately reflect the effects of file deletion and if
a process tries to use this space before the deletions have made it
to disk, the process should block.  Kirk McKusick disagrees and claims
that fixing this would be too hard.  I guess that since I'm not prepared
to submit code to implement this, he wins the argument ;-)