LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Where's the create() pointer?
@ 2008-01-19 15:07 Justin Banks
2008-01-19 16:12 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: Justin Banks @ 2008-01-19 15:07 UTC (permalink / raw)
To: linux-kernel
It's probably been this way for a long time, and I'm just noticing, but
I can't seem to find the create() (among others) pointer for NFS filesystems.
Specifically, If I look at sb->s_root->d_inode->i_op there's no create
there. How do I find it? I'm guessing that the ability to share mount
structures between multiple NFS mounts resulted in some kind of fake
superblock, but I just can't figure out where to find the functions.
-justinb
--
Justin Banks
BakBone Software
justinb@bakbone.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Where's the create() pointer?
2008-01-19 15:07 Where's the create() pointer? Justin Banks
@ 2008-01-19 16:12 ` Trond Myklebust
2008-01-19 19:02 ` Justin Banks
0 siblings, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2008-01-19 16:12 UTC (permalink / raw)
To: Justin Banks; +Cc: linux-kernel
On Sat, 2008-01-19 at 08:07 -0700, Justin Banks wrote:
> It's probably been this way for a long time, and I'm just noticing, but
> I can't seem to find the create() (among others) pointer for NFS filesystems.
>
> Specifically, If I look at sb->s_root->d_inode->i_op there's no create
> there. How do I find it? I'm guessing that the ability to share mount
> structures between multiple NFS mounts resulted in some kind of fake
> superblock, but I just can't figure out where to find the functions.
Why would you want to do this in the first place?
Anyhow, to answer the question: sb->s_root is not guaranteed to be a
real file on NFS. The real mountpoints are usually in the anonymous
dentry list.
Trond
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Where's the create() pointer?
2008-01-19 16:12 ` Trond Myklebust
@ 2008-01-19 19:02 ` Justin Banks
2008-01-19 20:06 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: Justin Banks @ 2008-01-19 19:02 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Justin Banks, linux-kernel
Trond Myklebust wrote
>
> On Sat, 2008-01-19 at 08:07 -0700, Justin Banks wrote:
> > It's probably been this way for a long time, and I'm just noticing, but
> > I can't seem to find the create() (among others) pointer for NFS filesystems.
> >
> > Specifically, If I look at sb->s_root->d_inode->i_op there's no create
> > there. How do I find it? I'm guessing that the ability to share mount
> > structures between multiple NFS mounts resulted in some kind of fake
> > superblock, but I just can't figure out where to find the functions.
>
> Why would you want to do this in the first place?
I'm just looking at trapping new creates on NFS, and so I need to find
the pointer.
> Anyhow, to answer the question: sb->s_root is not guaranteed to be a
> real file on NFS. The real mountpoints are usually in the anonymous
> dentry list.
Okay, I'll look there, thanks.
-justinb
--
Justin Banks
BakBone Software
justinb@bakbone.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Where's the create() pointer?
2008-01-19 19:02 ` Justin Banks
@ 2008-01-19 20:06 ` Trond Myklebust
2008-01-20 3:31 ` Justin Banks
0 siblings, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2008-01-19 20:06 UTC (permalink / raw)
To: Justin Banks; +Cc: linux-kernel
On Sat, 2008-01-19 at 12:02 -0700, Justin Banks wrote:
> Trond Myklebust wrote
> >
> > On Sat, 2008-01-19 at 08:07 -0700, Justin Banks wrote:
> > > It's probably been this way for a long time, and I'm just noticing, but
> > > I can't seem to find the create() (among others) pointer for NFS filesystems.
> > >
> > > Specifically, If I look at sb->s_root->d_inode->i_op there's no create
> > > there. How do I find it? I'm guessing that the ability to share mount
> > > structures between multiple NFS mounts resulted in some kind of fake
> > > superblock, but I just can't figure out where to find the functions.
> >
> > Why would you want to do this in the first place?
>
> I'm just looking at trapping new creates on NFS, and so I need to find
> the pointer.
What is your purpose in trapping creates on the client? Is this for
accounting purposes? If so, why wouldn't inotify, or even a systemtap
script suffice?
Anyhow, the simplest way to find the pointer is to grep for nfs_create
in /proc/kallsyms.
Trond
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Where's the create() pointer?
2008-01-19 20:06 ` Trond Myklebust
@ 2008-01-20 3:31 ` Justin Banks
0 siblings, 0 replies; 5+ messages in thread
From: Justin Banks @ 2008-01-20 3:31 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Justin Banks, linux-kernel
Trond Myklebust wrote
>
> On Sat, 2008-01-19 at 12:02 -0700, Justin Banks wrote:
> > Trond Myklebust wrote
> > >
> > > On Sat, 2008-01-19 at 08:07 -0700, Justin Banks wrote:
> > > > It's probably been this way for a long time, and I'm just noticing, but
> > > > I can't seem to find the create() (among others) pointer for NFS filesystems.
> > > >
> > > > Specifically, If I look at sb->s_root->d_inode->i_op there's no create
> > > > there. How do I find it? I'm guessing that the ability to share mount
> > > > structures between multiple NFS mounts resulted in some kind of fake
> > > > superblock, but I just can't figure out where to find the functions.
> > >
> > > Why would you want to do this in the first place?
> >
> > I'm just looking at trapping new creates on NFS, and so I need to find
> > the pointer.
>
> What is your purpose in trapping creates on the client? Is this for
> accounting purposes? If so, why wouldn't inotify, or even a systemtap
> script suffice?
Could do inotify, except on a large-ish filesystem, it's really
unuseable, if you want to track everything that's going on.
> Anyhow, the simplest way to find the pointer is to grep for nfs_create
> in /proc/kallsyms.
Ugh. That's an ugly way, seems to me. Isn't there a way, given the
superblock? I mean, the VFS does it that way, doesn't it?
-justinb
--
Justin Banks
BakBone Software
justinb@bakbone.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-01-20 3:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-19 15:07 Where's the create() pointer? Justin Banks
2008-01-19 16:12 ` Trond Myklebust
2008-01-19 19:02 ` Justin Banks
2008-01-19 20:06 ` Trond Myklebust
2008-01-20 3:31 ` Justin Banks
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).