Re: [PATCH] ext34: ensure do_split leaves enough free space in both blocks

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen C. Tweedie
Date: Tuesday, September 18, 2007 - 10:41 am

Hi,

On Mon, 2007-09-17 at 11:06 -0500, Eric Sandeen wrote:

Nasty.


A big improvement.  :)


This is the guts of it, and I spent a while looking just to convince
myself it was getting things right in the corner case and was splitting
at _exactly_ the right point.  If we have large dirents and 1k
blocksize, even getting the split point off-by-one will still leave us
vulnerable to the bug.

But it all looks fine.  My only other comment would be that "move" is
redundant, you could lose it completely and just do

	split = i+1;

but I think the logic's easier to understand the way it is. 

Nice catch.

--Stephen


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] ext34: ensure do_split leaves enough free spac ..., Stephen C. Tweedie, (Tue Sep 18, 10:41 am)