linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* read actor
@ 2003-04-03 14:14 fcorneli
  2003-04-04 13:45 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: fcorneli @ 2003-04-03 14:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Frank.Cornelis

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?

I also very much could use a this_data field so my read_actor can put the 
data into a structure pointed to by this_data.
If something for this already is present somewhere... please point me to 
that place in the code tree.

Please CC me; I'm not on the list.


Frank.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: read actor
  2003-04-03 14:14 read actor fcorneli
@ 2003-04-04 13:45 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2003-04-04 13:45 UTC (permalink / raw)
  To: fcorneli; +Cc: linux-kernel, Frank.Cornelis

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-04 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-03 14:14 read actor fcorneli
2003-04-04 13:45 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).