Re: read actor

Christoph Hellwig (hch@infradead.org)
Fri, 4 Apr 2003 14:45:12 +0100


On Thu, Apr 03, 2003 at 04:14:05PM +0200, fcorneli@elis.ugent.be wrote:
> Hi,
>
> When one uses do_generic_file_read to (in-kernel) read a file from the
> page cache one has to give a read_actor as parameter. Suppose different
> do_generic_file_read instances occur simultaneously, then how can a
> shared file_read_actor differentiate between the different
> do_generic_file_read instances that made a call to it?
> Shouldn't read_descriptor_t contain something like
> void *this_data;
> to make this possible?

do_generic_file_read is not an interface you are supposed to use, and any use
of it will lead to subtile races with filesystems that use the pagecache
but not plain generic_file_read. See the ->sendfile operation in 2.5
for a proper fix.

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