Re: DHT xlator, read and write a file during creating a new file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, it is ok
Is it possible to see this attribute in client side? In which xlator?

On Wed, May 3, 2017 at 2:58 PM, Sanoj Unnikrishnan <sunnikri@xxxxxxxxxx> wrote:
I am not sure, if i got your requirement correctly.
If you need to have the file count and directory count of each brick individually (without aggregation), you could get that by a getxattr of trusted.glusterfs.quota.size on the brick.
The size xattr value can be interpreted as follows:
getfattr -d -m. -e hex ' <path >
size: first 16 bytes
filecount: Next 16 bytes
dircount: Last 16 bytes

Regards,
Sanoj

On Wed, May 3, 2017 at 12:20 PM, Tahereh Fattahi <t28.fattahi@xxxxxxxxx> wrote:
Thank you
I need this information divided to bricks.

On Tue, May 2, 2017 at 11:07 PM, Vijay Bellur <vbellur@xxxxxxxxxx> wrote:


On Tue, May 2, 2017 at 8:00 AM, Tahereh Fattahi <t28.fattahi@xxxxxxxxx> wrote:
Hi

I want to use a file as a counter when I create a file in dht xlator.
I mean, after creating a new file,  I want open a file in the same directory with a special name, read that, update the counter and write back. 
I think for this purpose I  should open in dht_create_cbk, read in dht_open_cbk and write in dht_readv_cbk.
I think I should use dht_open , dht_readv and dht_writev. Maybe I could create inputs for these function expect frame! is it correct to use the frame fro dht_create function?

Is this scenario correct or there is better way?


Have you tried the object count feature [1] ?

Regards,
Vijay



_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel


_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux