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

2014-08-21 Thread Harshavardhana
On Wed, Aug 20, 2014 at 10:04 PM, Prashanth Pai p...@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
___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel


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

2014-08-21 Thread Humble Devassy Chirammal
Hi Prasanth,

Its worth to have in our GlusterFS source doc . Can you send a patch on
this ?

--Humble


On Thu, Aug 21, 2014 at 10:34 AM, Prashanth Pai p...@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

 Regards,
  -Prashanth Pai

 - Original Message -
 From: Harshavardhana har...@harshavardhana.net
 To: Ben England bengl...@redhat.com
 Cc: gluster-devel gluster-devel@gluster.org
 Sent: Thursday, August 21, 2014 2:57:25 AM
 Subject: Re: [Gluster-devel] update-link-count-parent POSIX xlator
 parameter

 On Wed, Aug 20, 2014 at 1:55 PM, Ben England bengl...@redhat.com wrote:
  What is update-link-count-parent POSIX xlator parameter for?  Is it ever
 set by anyone and why?  It appears to be off by default.  Didn't see this
 documented, but the log message in posix.c says:  update-link-count-parent
 is enabled. Thus for each file an extended attribute representing the
 number of hardlinks for that file within the same parent directory is
 set.  Why would this be necessary?
 

 It was supposed to be used by Quota or it uses it internally i am not
 sure for ancestry paths and gfid to path conversion - AFAIK

 # gluster volume set volname build-pgfid on

 Enables this feature. Never tested it personally.

 --
 Religious confuse piety with mere ritual, the virtuous confuse
 regulation with outcomes
 ___
 Gluster-devel mailing list
 Gluster-devel@gluster.org
 http://supercolony.gluster.org/mailman/listinfo/gluster-devel
 ___
 Gluster-devel mailing list
 Gluster-devel@gluster.org
 http://supercolony.gluster.org/mailman/listinfo/gluster-devel

___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel


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

2014-08-21 Thread Prashanth Pai
sure!

Regards,
 -Prashanth Pai

- Original Message -
From: Humble Devassy Chirammal humble.deva...@gmail.com
To: Prashanth Pai p...@redhat.com
Cc: Harshavardhana har...@harshavardhana.net, Ben England 
bengl...@redhat.com, gluster-devel gluster-devel@gluster.org
Sent: Thursday, August 21, 2014 12:03:58 PM
Subject: Re: [Gluster-devel] update-link-count-parent POSIX xlator parameter

Hi Prasanth,

Its worth to have in our GlusterFS source doc . Can you send a patch on
this ?

--Humble


On Thu, Aug 21, 2014 at 10:34 AM, Prashanth Pai p...@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

 Regards,
  -Prashanth Pai

 - Original Message -
 From: Harshavardhana har...@harshavardhana.net
 To: Ben England bengl...@redhat.com
 Cc: gluster-devel gluster-devel@gluster.org
 Sent: Thursday, August 21, 2014 2:57:25 AM
 Subject: Re: [Gluster-devel] update-link-count-parent POSIX xlator
 parameter

 On Wed, Aug 20, 2014 at 1:55 PM, Ben England bengl...@redhat.com wrote:
  What is update-link-count-parent POSIX xlator parameter for?  Is it ever
 set by anyone and why?  It appears to be off by default.  Didn't see this
 documented, but the log message in posix.c says:  update-link-count-parent
 is enabled. Thus for each file an extended attribute representing the
 number of hardlinks for that file within the same parent directory is
 set.  Why would this be necessary?
 

 It was supposed to be used by Quota or it uses it internally i am not
 sure for ancestry paths and gfid to path conversion - AFAIK

 # gluster volume set volname build-pgfid on

 Enables this feature. Never tested it personally.

 --
 Religious confuse piety with mere ritual, the virtuous confuse
 regulation with outcomes
 ___
 Gluster-devel mailing list
 Gluster-devel@gluster.org
 http://supercolony.gluster.org/mailman/listinfo/gluster-devel
 ___
 Gluster-devel mailing list
 Gluster-devel@gluster.org
 http://supercolony.gluster.org/mailman/listinfo/gluster-devel

___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel


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

2014-08-20 Thread Ben England
What is update-link-count-parent POSIX xlator parameter for?  Is it ever set by 
anyone and why?  It appears to be off by default.  Didn't see this documented, 
but the log message in posix.c says:  update-link-count-parent is enabled. 
Thus for each file an extended attribute representing the number of hardlinks 
for that file within the same parent directory is set.  Why would this be 
necessary?  

background: I'm trying to see where various xattr calls per file read are 
coming from.


___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel


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

2014-08-20 Thread Harshavardhana
On Wed, Aug 20, 2014 at 1:55 PM, Ben England bengl...@redhat.com wrote:
 What is update-link-count-parent POSIX xlator parameter for?  Is it ever set 
 by anyone and why?  It appears to be off by default.  Didn't see this 
 documented, but the log message in posix.c says:  update-link-count-parent 
 is enabled. Thus for each file an extended attribute representing the number 
 of hardlinks for that file within the same parent directory is set.  Why 
 would this be necessary?


It was supposed to be used by Quota or it uses it internally i am not
sure for ancestry paths and gfid to path conversion - AFAIK

# gluster volume set volname build-pgfid on

Enables this feature. Never tested it personally.

-- 
Religious confuse piety with mere ritual, the virtuous confuse
regulation with outcomes
___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel


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

2014-08-20 Thread Prashanth Pai
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

Regards,
 -Prashanth Pai

- Original Message -
From: Harshavardhana har...@harshavardhana.net
To: Ben England bengl...@redhat.com
Cc: gluster-devel gluster-devel@gluster.org
Sent: Thursday, August 21, 2014 2:57:25 AM
Subject: Re: [Gluster-devel] update-link-count-parent POSIX xlator parameter

On Wed, Aug 20, 2014 at 1:55 PM, Ben England bengl...@redhat.com wrote:
 What is update-link-count-parent POSIX xlator parameter for?  Is it ever set 
 by anyone and why?  It appears to be off by default.  Didn't see this 
 documented, but the log message in posix.c says:  update-link-count-parent 
 is enabled. Thus for each file an extended attribute representing the number 
 of hardlinks for that file within the same parent directory is set.  Why 
 would this be necessary?


It was supposed to be used by Quota or it uses it internally i am not
sure for ancestry paths and gfid to path conversion - AFAIK

# gluster volume set volname build-pgfid on

Enables this feature. Never tested it personally.

-- 
Religious confuse piety with mere ritual, the virtuous confuse
regulation with outcomes
___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel
___
Gluster-devel mailing list
Gluster-devel@gluster.org
http://supercolony.gluster.org/mailman/listinfo/gluster-devel