Re: The INN/mmap bug

From: Alexander Viro (viro@math.psu.edu)
Date: Mon Sep 18 2000 - 12:19:27 EST


On Mon, 18 Sep 2000, Chris Mason wrote:

> I'm not trying to put it all into a single get_block call, we have
> different get_block funcs for different purposes. What I'm really trying
> to do is squeeze into block_prepare_write, as a generic setup function for
> file modifications.

It is not. Period. Full stop. Check cont_prepare_write() and you will see
a counterexample in the same fs/buffer.c. Yes, they are used in exactly
the same manner.

        Generic function for file modifications is generic_file_write().
block_prepare_write() lives several layers below and is used only for some
of the local filesystems (ones where it fits).

> The other reason why I convert in get_block is that is when I've got the
> most information about the internals of the file, including a path through
> the btree to the item that may or may not need converting. In reiserfs,
> the only way to find out if the last item of the file is packed is to
> search the tree for it, and the same searching code is used if it is a
> packed or an unpacked item.

        ? Chris, I hope you've noticed that e.g. ext2_prepare_write()
lives in fs/ext2/inode.c, not in fs/buffer.c. So I don't see what stops
you from pulling _any_ data you want.

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



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:18 EST