Re: [PATCH 1/2] ocfs2: Zero the tail cluster when extending pasti_size v2

From: Joel Becker
Date: Tue Jul 06 2010 - 22:04:35 EST


On Wed, Jul 07, 2010 at 08:42:53AM +0800, Tao Ma wrote:
> > Oh, you're right. We need to walk the entire extent range
> >between i_size and pos and figure out what needs CoW. This needs to
> >happen no matter what.
> Actually we can only have unwritten extents after i_size and it
> shouldn't hurt you in this case.
> So do we really need to CoW all the unwritten extents?
> All I want to say is that since they are unwritten, they should also
> mean 'zero' for the user space.
> So can we just need to skip clearing pages if i_size is in an
> unwritten extent?

We can certainly have unwritten extents in the middle too ;-)
I've just reworked the entire ocfs2_zero_extend() logic to skip
unwritten extents and CoW refcounted ones. We have to CoW for nonsparse
anyway, so we needed this logic. We do need to walk the entire range,
just in case there are extents anywhere between i_size and pos.
Patches coming as soon as it stops breaking.

Joel

--

Life's Little Instruction Book #3

"Watch a sunrise at least once a year."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/