[Gluster-devel] How can add one fop after another fop?

Tahereh Fattahi t28.fattahi at gmail.com
Thu Mar 30 12:29:02 UTC 2017


Yes, I know the architecture of translators, of course I dont want to
create a new translator.
If I understand that my idea is correct I will create one page in
uder_review tab, But I am not sure, I should test.
First I need to know which function firstly execute when a create operation
is running?

On Thu, Mar 30, 2017 at 4:10 PM, Niels de Vos <ndevos at redhat.com> wrote:

> On Thu, Mar 30, 2017 at 03:52:39PM +0430, Tahereh Fattahi wrote:
> > Thanks for your answer.
> > For example I want to save the number of files in directory as one
> extended
> > attribute.
> > After every create operation, this number should be added and set as
> > attribute, So after create I need a setxattr.
> > But I dont know where this create is completed, I tested in dht
> translator
> > and it was false because the creation is not complete in this translator.
>
> Each xlator receives the create procedure (and its callback). The
> "Glustr way" of doing this, could be to write your own xlator. Because
> this is a functionality we would like to see too, it would be a great
> opportunity to contribute such an xlator (or other approach?).
>
> My take on the functionality, is that the number of entries in a
> directory can be represented as (struct stat)->st_size of a directory
> inode. The Gluster internal representation could be stored as an xattr.
>
> You seem to be interested in implementing such a feature. If you write
> an email to this list with your proposal, we can work with you to get
> this included in one of the next versions.
>
> Once the approach has been settled upon, you can write a little design
> document for the glusterfs-specs repository [0].
>
> HTH,
> Niels
>
>
> 0. https://github.com/gluster/glusterfs-specs (use Gerrit to post docs)
>
>
> >
> > On Thu, Mar 30, 2017 at 3:44 PM, Niels de Vos <ndevos at redhat.com> wrote:
> >
> > > On Thu, Mar 30, 2017 at 07:03:28AM +0430, Tahereh Fattahi wrote:
> > > > Hi
> > > > I want after create any file, do one setxattr automatically , where
> and
> > > how
> > > > I should add this operation, and in which translator?
> > >
> > > We would like to add support for compound (or composite) FOPs through
> > > libgfapi. This is currently not available yet, and I do not think
> anyone
> > > started working on it.
> > >
> > > Could you explain a little more about your use case for this? Concrete
> > > examples will help in understanding and pointing you to potential
> > > alternative solutions.
> > >
> > > Thanks,
> > > Niels
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20170330/70f0dd03/attachment.html>


More information about the Gluster-devel mailing list