[Gluster-users] How to Extract File Location From fd_t

Amin Abbaspour abbaspour_amin at yahoo.com
Thu Jul 16 10:06:56 UTC 2009


Thanks Vikas, 

You replay was really helpful. Hope to set this xlator up soon.

Amin Abbaspour


--- On Tue, 7/14/09, Vikas Gorur <vikas at gluster.com> wrote:

> From: Vikas Gorur <vikas at gluster.com>
> Subject: Re: [Gluster-users] How to Extract File Location From fd_t
> To: "Amin Abbaspour" <abbaspour_amin at yahoo.com>
> Cc: gluster-users at gluster.org
> Date: Tuesday, July 14, 2009, 1:01 PM
> 
> ----- "Amin Abbaspour" <abbaspour_amin at yahoo.com>
> wrote:
> 
> > Hi All,
> > 
> > I want to write a trace like translator with a limited
> FOP set just to
> > notify if the file is modified or not (i.e. create,
> writev, unlink).
> 
> > My questions:
> > 
> > 1. Is there any similar functionality in any of
> current xlators?
> 
> No.
>  
> > 2. Is my FOP subset (mentioned above) correct or I
> have missed any
> > other CUD (create, update, delete) operations?
> 
> Look at all the FOPs in afr-inode-write.c and
> afr-dir-write.c. Those
> are the ones that create, update or modify files and
> directories.
>  
> > 3. If I write this module myself, I want to extend
> trace.c. Then in
> > "trace_writev" I have fd in hand. How can I get this
> fd's file name?
> 
> Get the inode as fd->inode and then use inode_path
> (libglusterfs/src/inode.c)
> to get the name.
> 
> Happy hacking,
> Vikas
> -- 
> Engineer - http://gluster.com/
> 
> A: Because it messes up the way people read text.
> Q: Why is a top-posting such a bad thing?
> --
> 


      




More information about the Gluster-users mailing list