[GEDI] [Gluster-devel] Get GFID for a file through libgfapi
Niels de Vos
ndevos at redhat.com
Mon Jan 9 20:38:55 UTC 2017
On Mon, Jan 09, 2017 at 05:53:03PM +0000, Ankireddypalle Reddy wrote:
> I am trying to extract the GFID for a file through libgfapi interface. When I try to extract the value of extended attribute glusterfs.gfid through libgfapi I get the errorno: 95. This works for FUSE though. Is there a way to extract the GFID for a file through libgfapi.
It seems that this is a case where FUSE handles the xatts special. The
glusterfs.gfid and glusterfs.gfid.string (VIRTUAL_GFID_XATTR_KEY and
VIRTUAL_GFID_XATTR_KEY_STR) are specifically handled in
There is a way to get the GFID, but it probably is rather a cumbersome
workaround for you. The handle-API is used heavily by NFS-Ganesha
(because NFS uses filehandles more than filenames), and extracts the
GFID from the 'struct glfs_object' with glfs_h_extract_handle(). A basic
example of how to obtain and extract the handle is in
Could you explain the need for knowing the GFID in the application? We
can extend gfapi with fetching the GFID if that would help you.
PS: we have a new integration at gluster.org where external projects can
ask gfapi related questions. The gluster-devel list tends to be a little
heavy on traffic for non-Gluster developers.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: not available
More information about the integration