lkml.org 
[lkml]   [1999]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] [possible race in ext2] Re: how to write get_block?
On Tue, 12 Oct 1999, Stephen C. Tweedie wrote:

>changes. The ext2 truncate code is really, really careful to provide

I was _not_ talking about ext2 at all. I was talking about the bforget and
brelse semantics. As bforget fallback to brelse you shouldn't expect
bforget to really destroy the buffer. It may do that but only if it's
possible.

You are using a _trick_ to let bforget to do the thing you want. If all
filesystem needs such thing it's ugly having to duplicate that current
ext2 tricks all over the place.

>The correct way to extend the current rules cleanly is to make the
>truncate code do a bforget() on data blocks as well as indirect blocks
>if, and only if, the file is not a regular file. That will deal with
>the symlink case too, and will mean that we are using the same mechanism
>for all of our dynamically-allocatable metadata.

IMHO we should drop all that race-prone tricks isntead of adding new ones.

If you use bforget to avoid fs corruption you are asking for troubles and
IMHO you are going in the wrong direction.

You may change bforget to do the right thing cleanly, but it will be badly
blocking. While you shouldn't block unless you are the one who wants to
reuse the buffer that is currently under I/O or dirty. So if you'll change
bforget then you'll block in the wrong place.

Andrea


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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.142 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site