[Gluster-devel] update-link-count-parent POSIX xlator parameter

Harshavardhana harsha at harshavardhana.net
Thu Aug 21 06:01:45 UTC 2014


On Wed, Aug 20, 2014 at 10:04 PM, Prashanth Pai <ppai at redhat.com> wrote:
> Hi,
>
> I recently came across this when I was looking for various ways to convert GFID to Path[1].
> I have tested "build-pgfid" option for basic sanity. It's documented in the commit msg of change[2]. Found one small issue[3]. There could be others.
> Users should be aware that these xattrs generated only for newly created dirs/files and are not built for already existing dirs/files.
>
> [1]: https://github.com/prashanthpai/sof-object-listing/blob/master/changelog/gfid-to-path.md
> [2]: http://review.gluster.org/5951
> [3]: http://review.gluster.org/8352
>

Explored quite a few options here

- https://gist.github.com/harshavardhana/b5d3c69db5312b84022f - was
one approach which was worked by Brad Hubbard which makes used of
kernel dentry caches.
- For ext4 you have
  # debugfs 'ncheck <inode_num>' <device>
- XFS provides something similar, but requires a umount
  # xfs_ncheck -i ino <device>
- Then stumbled across this since its specifically used by Quota, do
not know how hard its to expose this. But Avati indicated that this
would involve additional overheads for every call()
- The best possible solution is to use a database for such a mapping
(quite tricky) and requires a lot of internal work.

So in the end haven't come across an easier way out of this :-)

-- 
Religious confuse piety with mere ritual, the virtuous confuse
regulation with outcomes


More information about the Gluster-devel mailing list