Re: [PATCH COW] remove struct file from readpage() and friends

From: Eric W. Biederman
Date: Sat Apr 17 2004 - 21:04:13 EST


Jörn Engel <joern@xxxxxxxxxxxxxxxxxxxx> writes:

> Folks,
>
> this could be a good idea, it could also be utterly insane. If anyone
> knows for sure, please tell me.
>
> The point is that copyfile(), one of the ingredients to cowlinks,
> currently has to open() the source, because sendfile() requires a
> struct file* as one of the arguments. Following the path down shows
> that this struct file* is almost never used, but ultimately required
> by readpage() and readpages().
>
> Those two, again, almost never use the struct file*, except for five
> cases. One was trivial to fix, nfs, smbfs, cifs and blkmtd remain:

Interface wise there are per user credentials that need to remain with
the written data. These credentials by there very nature are per
file.

Last I heard the current interface was only a rough approximation of
correct in that it is wrong if you are caching data and you have
multiple people writing per file.

So definitely at the top level you should have a struct file
so that the credentials needed can be computed. As things
filter down it may be possible to change that.

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