linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ashish Khurange <ashishk@it.iitb.ac.in>
To: Shaya Potter <spotter@cs.columbia.edu>
Cc: Al Viro <viro@ftp.linux.org.uk>, linux-fsdevel@vger.kernel.org
Subject: Re: get vfsmount from dentry
Date: Mon, 13 Mar 2006 00:24:54 +0530	[thread overview]
Message-ID: <44146E7E.8090902@it.iitb.ac.in> (raw)
In-Reply-To: <1142187797.4954.41.camel@localhost.localdomain>

Shaya Potter wrote:

>
>The question is, what are you trying to do?  Why can't you use a "struct
>file" (which will have the relevant vfsmnt).  If you can't say, then its
>hard for people to help you, most people here want to solve something
>"right", and without knowing the real problem don't feel its worth
>giving a half ass solution.
>
>  
>
I'm trying to build file monitor patch. I want to detect all the changes 
happening to file system. For this I need to insert my code in various 
functions in fs/open.c, fs/ nami.c.
Functions like vfs_mkdir, vfs_rmdir, notify_change, sys_write etc.
Whenever a change to file system happens I want to track that change 
with the name of of the file and the change happened to it.
The function which I send in my previous mail can be used to get the 
full pathname of the file being changed (pathname : lets say the name 
with which file is accessed). Now for this function I need both dentry 
and vfsmount struct of the file.
In few functions (like sys_fchmod) I have file struct as an argument, 
which provides me both vfsmount and dentry, hence I can find out 
pathname of the file being changed.
Where as in few functions (like vfs_mkdir) I have only dentry and inode 
of the directory, which are not sufficient to find the pathname.

I hope I am clear now.

- Ashish

  reply	other threads:[~2006-03-12 18:54 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
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 [this message]
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=44146E7E.8090902@it.iitb.ac.in \
    --to=ashishk@it.iitb.ac.in \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=spotter@cs.columbia.edu \
    --cc=viro@ftp.linux.org.uk \
    /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).