linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Ashish Khurange <ashishk@it.iitb.ac.in>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: get vfsmount from dentry
Date: Sun, 12 Mar 2006 13:55:43 +0000	[thread overview]
Message-ID: <20060312135543.GB27946@ftp.linux.org.uk> (raw)
In-Reply-To: <441425BB.6030604@it.iitb.ac.in>

On Sun, Mar 12, 2006 at 07:14:27PM +0530, Ashish Khurange wrote:
> Hi,
> I'm trying to develop a fmon (file monitor) patch. For that I'm trying 
> to find complete pathname of the file/directory being changed.  If you 
> have dentry of a file and a corresponding vfsmount struct, I can find 
> out its entire pathname using following code. Which works exactly the 
> way I want.

> Now the only problem is in many functions in the filesystem code, I have 
> access only to the dentry and not to its vfsmount. I can do one thing I 
> can change the function definition and pass corresponding vfsmount as a 
> parameter to the function, but this will lead to lot of changes.
> 
> Is there any way by which I can found the vfsmount structure of a file 
> represented by dentry structure?

Which one?

There is no such thing as pathname of a file.  It can be present in any
number of places, including 0.  Moreover, the pathname that makes sense
for one process doesn't have to resolve to the same file (or even resolve
at all) for others.

So what are you really trying to achieve?

  reply	other threads:[~2006-03-12 13:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-12 13:44 get vfsmount from dentry Ashish Khurange
2006-03-12 13:55 ` Al Viro [this message]
2006-03-12 17:20   ` Ashish Khurange
2006-03-12 17:41     ` Al Viro
2006-03-12 18:00       ` Ashish Khurange
2006-03-12 18:23         ` Shaya Potter
2006-03-12 18:54           ` Ashish Khurange
2006-03-12 19:13             ` Al Viro
2006-03-12 20:34               ` Ashish Khurange
2006-03-12 20:45                 ` Shaya Potter
2006-03-13  7:24                 ` Jan Hudec
2006-03-12 18:24         ` Al Viro
2006-03-12 19:10 ` Jamie Lokier

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=20060312135543.GB27946@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=ashishk@it.iitb.ac.in \
    --cc=linux-fsdevel@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;
as well as URLs for NNTP newsgroup(s).