mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* alloc_dentry and alloc_filp
@ 2004-02-03 16:53 Brice Goglin
  0 siblings, 0 replies; only message in thread
From: Brice Goglin @ 2004-02-03 16:53 UTC (permalink / raw)
  To: linux-kernel

Hi,

I would like to know why the alloc_inode/destroy_inode functions
have been added to super block operations during 2.5 development
while there still are no alloc/destroy_dentry or alloc/destroy_filp
functions.
It seems that the alloc_inode enhanced several filesystems such
as NFS, JFS, XFS, etc. But it also seems to me that similar
alloc_dentry or alloc_filp fields may also be interesting.

I looked at the usage of the private_data field of the struct file
in 2.6.1 filesystems and I think several implementations may be
enhanced by allowing filesystems to control the allocation of
struct file.
For instance, Coda could move its "struct coda_file_info" into
the main struct file.
Other examples are the struct dir_private_info of ext3,
presto_file_data in intermezzo, nfs4_state in nfs4, etc.

The usage of d_fsdata field in struct dentry shows that Intermezzo
may also be enhanced by allowing it to control dentry allocation
so that its struct presto_dentry_data would be allocated within
the dentry.

I imagine a simple patch adding in get_empty_filp/d_alloc a check
for the existence of alloc_file/dentry in the super block operations
and then call it or revert to the generic allocation routines.
Corresponding dentry/filp_init_once might then be exported as
inode_init_once is.

Looking at the current dentry/file allocation model in 2.6, I
didn't find any problem with that. What do you think about it ?
Has anobody already tried this ?
Any chance for such a patch to be included ?

Best regards
-- 
Brice Goglin
================================================
Ph.D Student
Laboratoire de l'Informatique et du Parallélisme
CNRS-INRIA-ENS Lyon
France

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-03 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-03 16:53 alloc_dentry and alloc_filp Brice Goglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®