mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brice Goglin <Brice.Goglin@ens-lyon.fr>
To: linux-kernel@vger.kernel.org
Subject: alloc_dentry and alloc_filp
Date: Tue, 3 Feb 2004 17:53:00 +0100	[thread overview]
Message-ID: <20040203165300.GS5068@ens-lyon.fr> (raw)

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

                 reply	other threads:[~2004-02-03 16:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040203165300.GS5068@ens-lyon.fr \
    --to=brice.goglin@ens-lyon.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®