Re: [PATCH 1/5]: ufs: missed brelse and wrong baseblk

From: Evgeniy Dushistov
Date: Tue Jun 20 2006 - 12:24:16 EST


On Mon, Jun 19, 2006 at 07:28:33PM +0100, Al Viro wrote:
> But now we have the buffer_heads on page 0 in the state inconsistent with
> the reality - basically, fs/buffer.c helpers will assume that they are
> _still_ in the second state (known to be in hole), while in the reality
> they should be either in the first or in the third one (mapped to known
> disk block or not known).
>
> It's not a fundamental problem;
And if we'll write after that to 0th page,
data with size <=page size, we can get garbage(not zeroes)
on the rest of page.

Definitely, after block allocation,
we should touch pages from inode cache,
which belongs to block except current page.

>however, it does mean that using these
> helpers means using library functions in situation they'd never been designed
> for. IOW, you need very careful analysis of the assumptions made by
> the entire bunch and, quite possibly, need versions modified for UFS.
May be there is some incomprehension here,
this series and all other my patches in -mm related to UFS
is not introduced write support for UFS, they fixes
bugs similar to which you point out in black corners
of the existing implementation.

Note: almost all such bugs related to
touch blockdev's cache instead of inode's cache, and working
with blockdev's buffer cache without take into consideration
that it's also page cache).

--
/Evgeniy

-
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/