[Gluster-users] How to Extract File Location From fd_t
vikas at gluster.com
Tue Jul 14 11:01:51 UTC 2009
----- "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?
> 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.
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