I think this would be a good addition. Maybe it should be part of a general re-working of how we manage threads.
It would be helpful if there was some fridge thread context stuff in Thread Local Storage so anyone could access it to do things like registering thread cancellation handlers and such. Optionally we could add something to request_op_context for this and have worker threads do the cleanup before exiting. One question would be if you need to do this for other threads also? The state async and DBUS threads can end up making FSAL calls, so they might wind up with an IPC channel attached also depending on which FSAL calls need the IPC channel. Frank > -----Original Message----- > From: Matt Benjamin [mailto:mbenja...@redhat.com] > Sent: Monday, September 21, 2015 1:04 PM > To: Dirk Jagdmann <d...@cubic.org> > Cc: NFS Ganesha Developers (Nfs-ganesha-devel@lists.sourceforge.net) > <Nfs-ganesha-devel@lists.sourceforge.net> > Subject: Re: [Nfs-ganesha-devel] thread cleanup hook for FSAL > > (as to what already exists, please consult the "thread fridge" code) > > Matt > > -- > Matt Benjamin > Red Hat, Inc. > 315 West Huron Street, Suite 140A > Ann Arbor, Michigan 48103 > > http://www.redhat.com/en/technologies/storage > > tel. 734-761-4689 > fax. 734-769-8938 > cel. 734-216-5309 > > ----- Original Message ----- > > From: "Matt Benjamin" <mbenja...@redhat.com> > > To: "Dirk Jagdmann" <d...@cubic.org> > > Cc: "NFS Ganesha Developers (Nfs-ganesha-devel@lists.sourceforge.net)" > > <Nfs-ganesha-devel@lists.sourceforge.net> > > Sent: Monday, September 21, 2015 4:03:11 PM > > Subject: Re: [Nfs-ganesha-devel] thread cleanup hook for FSAL > > > > Hi Dirk, > > > > That sounds well motivated. You might start discussion on IRC about > > interfaces. > > > > Matt > > > > -- > > Matt Benjamin > > Red Hat, Inc. > > 315 West Huron Street, Suite 140A > > Ann Arbor, Michigan 48103 > > > > http://www.redhat.com/en/technologies/storage > > > > tel. 734-761-4689 > > fax. 734-769-8938 > > cel. 734-216-5309 > > > > ----- Original Message ----- > > > From: "Dirk Jagdmann" <d...@cubic.org> > > > To: "NFS Ganesha Developers (Nfs-ganesha- > de...@lists.sourceforge.net)" > > > <Nfs-ganesha-devel@lists.sourceforge.net> > > > Sent: Monday, September 21, 2015 4:00:58 PM > > > Subject: [Nfs-ganesha-devel] thread cleanup hook for FSAL > > > > > > hello developers, > > > > > > I'm writing my FSAL which uses IPC to communicate with another > > > process which is providing the storage. This works well for me. I am > > > currently using one IPC "channel" for each NFS-Ganesha worker > > > thread. With a thread local variable these channels are created on > > > demand. However I currently can not close these channels, as my FSAL > > > code doesn't know when a worker thread is stopped. > > > > > > Can I add a hook mechanism to the NFS-Ganesha thread maintaining > > > code? This would allow a FSAL (or other code) to register a callback > > > function that will be called, just prior to the worker thread exit. > > > Which functions would be best suited to call those hooks? Or does it > > > already exist, and I didn't find it? > > > > > > -- > > > ---> Dirk Jagdmann > > > ----> http://cubic.org/~doj > > > -----> http://llg.cubic.org > > > > > > -------------------------------------------------------------------- > > > ---------- _______________________________________________ > > > Nfs-ganesha-devel mailing list > > > Nfs-ganesha-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel > > > > > > > ---------------------------------------------------------------------------- -- > _______________________________________________ > Nfs-ganesha-devel mailing list > Nfs-ganesha-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ------------------------------------------------------------------------------ _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel