Re: [PATCH] int (*readpage)(struct file *, struct page *);

From: Roman V. Shaposhnick (vugluskr@unicorn.math.spbu.ru)
Date: Thu May 11 2000 - 08:25:54 EST


On Thu, May 11, 2000 at 02:44:58PM +0200, Jamie Lokier wrote:
> Roman V. Shaposhnick wrote:
> > * all address space operations get a "struct file *" pointer[1]. It will
> > contain a hint from kernel when it is available and NULL if it is not.
>
> Linus already noted that it needs to be clear this can be NULL --
> perhaps to the extent of having two separate functions, one with and one
> without the file pointer.

  I disagree; Linus' idea was to let current adress_space_operations be
file oriented and let people create different set of methods but do
not touch fs.h. The interface is quite ok now, IMHO, it need not be
changed.
 
> May I humbly suggest you name the argument `struct file * file_or_null',
> so that filesystem implementors don't make the mistake of assuming it
> is always set?

  Hm, I guess that what we need is somekind of documentation on this topic,
just to prevent further discussion of what adress_space_operations should be.
I bet that after a while there will be a lot of people asking just the
same questions and suggesting just the same that will "make things more
general".

Thanks,
Roman.

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



This archive was generated by hypermail 2b29 : Mon May 15 2000 - 21:00:18 EST