[Gluster-devel] Adding one variable to inode structure

Pranith Kumar Karampuri pkarampu at redhat.com
Mon Jun 5 05:30:02 UTC 2017


On Mon, Jun 5, 2017 at 9:55 AM, Tahereh Fattahi <t28.fattahi at gmail.com>
wrote:

> Assume that one client wants to search it's directories for video files.
>  I want use something that helps this client to search just directories
> that have this kind of file.
> like a extended attribute, but I want this attribute be set by server not
> by client.
> I dont know which xlator is suitable for this work.
>

The xlator that comes close to it is:  index xlator
xlators/features/index/src

You may have to track extra operations like create/mknod/link/rename/unlink
to make sure you get the functionality you want. Basically this xlator
helps you in indexing a behavior. We use this for indexing
directories/files that need heal etc.


>
> On Mon, Jun 5, 2017 at 7:13 AM, Pranith Kumar Karampuri <
> pkarampu at redhat.com> wrote:
>
>> This sounds hacky. In general anything that is specific about an inode,
>> we try to store it in inode-ctx. Who uses this information about presence
>> of video-file and how? May be with that knowledge there could be a
>> possibility we can improve the solution. Do let us know the complete
>> problem you are trying to solve.
>>
>> On Mon, Jun 5, 2017 at 4:53 AM, Tahereh Fattahi <t28.fattahi at gmail.com>
>> wrote:
>>
>>> Hi
>>> I want to add one boolean field to inode structure for a directory.
>>>  when it is 1 it means that directory has one or more video file. when
>>> it is 0 it means that there is no video file in that directory.
>>> I can add this variable to inode structure and update it in server side,
>>> in posix_create function (when there is a create request for a video file).
>>> question is about client knowledge about this variable. is it possible
>>> that client can see the amount of this variable of different servers
>>> (bricks) and OR them to one variable in cient's inode of the directory? in
>>> which xlator I should try in client side?
>>>
>>> _______________________________________________
>>> Gluster-devel mailing list
>>> Gluster-devel at gluster.org
>>> http://lists.gluster.org/mailman/listinfo/gluster-devel
>>>
>>
>>
>>
>> --
>> Pranith
>>
>
>


-- 
Pranith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20170605/c13c6b48/attachment.html>


More information about the Gluster-devel mailing list