Re: RFC: Changes to fs/buffer.c?

From: Anton Altaparmakov
Date: Fri Oct 29 2004 - 17:18:38 EST


On Fri, 29 Oct 2004, Andrew Morton wrote:
> Anton Altaparmakov <aia21@xxxxxxxxx> wrote:
> >
> > Is it ok to export
> > create_buffers() and to make __set_page_buffers() static inline and move
> > it to include/linux/buffer.h?
>
> ho, hum - if you must ;)

I don't have to. It is very easy for me to take a copy of each of these
and stick it in fs/ntfs/aops.c. Works out of the box. Just seems silly
to proliferate code like that rather than to make use of existing
functions... Would you not agree? If not, I will just copy the functions
and that's that.

> I'd be inclined to rename it to attach_page_buffers() or something though -
> create_buffers() is a bit generic-sounding.

create_empty_buffers() which is already exported and used by pretty much
all fs is just as generic sounding... However renaming create_buffers()
to alloc_page_buffers() might be better as it doesn't actually attach the
buffers to the page. You still need the __set_page_buffers() to do that.
Perhaps you meant to rename __set_page_buffers() to attach_page_buffers()?

Its time for bed now but I will cook up a new patch tomorrow or Monday
depending on when I get some time on the computer...

Cheers,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
-
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/