Re: [PATCH 7/7] libtrivfs: lock-less reference counting for trivfs_peropen objects

2014-05-26 Thread Samuel Thibault
Justus Winter, le Mon 26 May 2014 13:19:19 +0200, a écrit : > * libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field > refcnt. > (struct trivfs_control): Remove unused field lock. > * libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex > initialization. > * libtrivfs/io-

[PATCH 7/7] libtrivfs: lock-less reference counting for trivfs_peropen objects

2014-05-26 Thread Justus Winter
* libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field refcnt. (struct trivfs_control): Remove unused field lock. * libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex initialization. * libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust accordingly. * lib

Re: [PATCH 7/7] libtrivfs: lock-less reference counting for trivfs_peropen objects

2014-05-24 Thread Samuel Thibault
Justus Winter, le Fri 23 May 2014 09:48:35 +0200, a écrit : > It is an optimization. This way we can use just 1 atomic operation > when trivfs_peropen_destroy_hook is not used, and 3 when it is. If we > do it like you described, we need two in any case. Then you could rather use something like:

Re: [PATCH 7/7] libtrivfs: lock-less reference counting for trivfs_peropen objects

2014-05-23 Thread Justus Winter
Quoting Samuel Thibault (2014-05-23 01:40:19) > Justus Winter, le Tue 13 May 2014 21:02:56 +0200, a écrit : > > diff --git a/libtrivfs/protid-clean.c b/libtrivfs/protid-clean.c > > index f98da6a..cce736d 100644 > > --- a/libtrivfs/protid-clean.c > > +++ b/libtrivfs/protid-clean.c > > @@ -31,19 +31,

Re: [PATCH 7/7] libtrivfs: lock-less reference counting for trivfs_peropen objects

2014-05-22 Thread Samuel Thibault
Justus Winter, le Tue 13 May 2014 21:02:56 +0200, a écrit : > diff --git a/libtrivfs/protid-clean.c b/libtrivfs/protid-clean.c > index f98da6a..cce736d 100644 > --- a/libtrivfs/protid-clean.c > +++ b/libtrivfs/protid-clean.c > @@ -31,19 +31,23 @@ trivfs_clean_protid (void *arg) > (*trivfs_prot

[PATCH 7/7] libtrivfs: lock-less reference counting for trivfs_peropen objects

2014-05-13 Thread Justus Winter
* libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field refcnt. (struct trivfs_control): Remove unused field lock. * libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex initialization. * libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust accordingly. * lib