From: "Fawad Lateef" <fawadlateef@gmail.com>
To: "UZAIR LAKHANI" <uzairr_bs1b@yahoo.com>
Cc: "Tomas Hruby" <thruby@gmail.com>, linux-fsdevel@vger.kernel.org
Subject: Re: getting file pointer from dentry/inode
Date: Thu, 4 May 2006 16:23:50 +0500 [thread overview]
Message-ID: <1e62d1370605040423i60c5bca6g18e51de6c0da2f2b@mail.gmail.com> (raw)
In-Reply-To: <20060504104812.61391.qmail@web37902.mail.mud.yahoo.com>
On 5/4/06, UZAIR LAKHANI <uzairr_bs1b@yahoo.com> wrote:
> --- Tomas Hruby <thruby@gmail.com> wrote:
>
> > > Secondly is this logically correct to get the file
> > > pointer from inode/dentry etc.
> >
> > I don't think so. A single file on a disk (inode)
> > can be opened concurrently,
> > with different mode, with different read position,
> > etc. Many file structures
> > share the same inode then.
> >
>
> ok I agree that
> "A single file on a disk (inode)
> > can be opened concurrently,
> > with different mode, with different read position,
> > etc. Many file structures
> > share the same inode then."
>
> but since I am getting the dentry so can I use the
> dentry_open function. If this is ok then additionally
> what is the purpose of dentry_open function.
>
Ya, I think its ok to do so, as nfsd and others also do so (see
http://sosdg.org/~coywolf/lxr/source/fs/nfsd/vfs.c#L684). dentry_open
actually gets a new filp and then fill it with the information got
from dentry (many from dentry_d_inode) and returns that newly created
filp see the code for it
(http://sosdg.org/~coywolf/lxr/source/fs/open.c#L784)
--
Fawad Lateef
next prev parent reply other threads:[~2006-05-04 11:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 9:45 getting file pointer from dentry/inode UZAIR LAKHANI
2006-05-04 10:02 ` Tomas Hruby
2006-05-04 10:48 ` UZAIR LAKHANI
2006-05-04 11:23 ` Fawad Lateef [this message]
2006-05-04 11:14 ` Fawad Lateef
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=1e62d1370605040423i60c5bca6g18e51de6c0da2f2b@mail.gmail.com \
--to=fawadlateef@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=thruby@gmail.com \
--cc=uzairr_bs1b@yahoo.com \
/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;
as well as URLs for NNTP newsgroup(s).