[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200801231200.03016.nickpiggin@yahoo.com.au>
Date: Wed, 23 Jan 2008 12:00:02 +1100
From: Nick Piggin <nickpiggin@...oo.com.au>
To: Jan Kara <jack@...e.cz>
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH RESEND] Minimal fix for private_list handling races
On Wednesday 23 January 2008 04:10, Jan Kara wrote:
> Hi,
>
> as I got no answer for a week, I'm resending this fix for races in
> private_list handling. Andrew, do you like them more than the previous
> version?
FWIW, I reviewed this, and it looks OK although I think some comments
would be in order.
What would be really nice is to avoid the use of b_assoc_buffers
completely in this function like I've attempted (untested). I don't
know if you'd actually call that an improvement...?
Couple of things I noticed while looking at this code.
- What is osync_buffers_list supposed to do? I couldn't actually
work it out. Why do we care about waiting for these buffers on
here that were added while waiting for writeout of other buffers
to finish? Can we just remove it completely? I must be missing
something.
- What are the get_bh(bh) things supposed to do? Protect the lifetime
of a given bh while "lock" is dropped? That's nice, ignoring the
fact that we brelse(bh) *before* taking the lock again... but isn't
every single other buffer that we _have't_ elevated its reference
exposed to exactly the same lifetime problem? IOW, either it is not
required at all, or it is required for _all_ buffers? (my patch
should fix this).
Hmm, now I remember why I rewrote this file :P
View attachment "fs-fsync_buffers_list-fix.patch" of type "text/x-diff" (1911 bytes)
Powered by blists - more mailing lists