search for: exports_lock

Displaying 6 results from an estimated 6 matches for "exports_lock".

2020 Aug 15
2
Re: [PATCH nbdkit] New ondemand plugin.
...nder if there are extra fields we could be providing to journald. > >+++ b/plugins/ondemand/ondemand.c > > >+/* Because we rewind the exportsdir handle, we need a lock to protect > >+ * list_exports from being called in parallel. > >+ */ > >+static pthread_mutex_t exports_lock = PTHREAD_MUTEX_INITIALIZER; > > An alternative is to diropen() each time .list_exports gets called. > Either way should work, though. diropen == opendir? > I still have some pending patches to improve .list_exports (split > out a .default_export function, add an is_tls parameter)...
2020 Aug 15
0
Re: [PATCH nbdkit] New ondemand plugin.
...ter(1)>, firewalls, or TLS client certificates. Yep, a definite need for this warning. > +++ b/plugins/ondemand/ondemand.c > +/* Because we rewind the exportsdir handle, we need a lock to protect > + * list_exports from being called in parallel. > + */ > +static pthread_mutex_t exports_lock = PTHREAD_MUTEX_INITIALIZER; An alternative is to diropen() each time .list_exports gets called. Either way should work, though. I still have some pending patches to improve .list_exports (split out a .default_export function, add an is_tls parameter), so there may be some churn in this area (...
2020 Aug 14
2
[PATCH nbdkit] New ondemand plugin.
..."type=ext4|... The filesystem type.\n" \ + "command=<COMMAND> Alternate command instead of mkfs." + +/* Because we rewind the exportsdir handle, we need a lock to protect + * list_exports from being called in parallel. + */ +static pthread_mutex_t exports_lock = PTHREAD_MUTEX_INITIALIZER; + +static int +ondemand_list_exports (int readonly, int default_only, + struct nbdkit_exports *exports) +{ + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&exports_lock); + struct dirent *d; + + /* First entry should be the default export. XXX Should we...
2020 Aug 15
0
Re: [PATCH nbdkit] New ondemand plugin.
On 8/15/20 4:13 PM, Richard W.M. Jones wrote: >>> +/* Because we rewind the exportsdir handle, we need a lock to protect >>> + * list_exports from being called in parallel. >>> + */ >>> +static pthread_mutex_t exports_lock = PTHREAD_MUTEX_INITIALIZER; >> >> An alternative is to diropen() each time .list_exports gets called. >> Either way should work, though. > > diropen == opendir? Oops, yeah. > >> I still have some pending patches to improve .list_exports (split >> out a .d...
2020 Aug 27
0
[PATCH nbdkit 2/2] api: Remove .list_exports from nbdkit 1.22 release.
..."type=ext4|... The filesystem type.\n" \ "command=<COMMAND> Alternate command instead of mkfs." -/* Because we rewind the exportsdir handle, we need a lock to protect - * list_exports from being called in parallel. - */ -static pthread_mutex_t exports_lock = PTHREAD_MUTEX_INITIALIZER; - -static int -ondemand_list_exports (int readonly, int default_only, - struct nbdkit_exports *exports) -{ - ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&exports_lock); - struct dirent *d; - - /* First entry should be the default export. XXX Should we...
2020 Aug 27
4
[PATCH nbdkit 0/2] Temporarily remove .list_exports for nbdkit 1.22
If you're following nbdkit development upstream you'll have seen that we are still making changes to the .list_exports and related APIs. The current .list_exports API upstream is not how it will look finally. The latest set of proposals was here: https://www.redhat.com/archives/libguestfs/2020-August/thread.html#00330 At the same time I'd like to do an nbdkit 1.22 (stable) release.