Patchset to add asynchronous open/close to master

Jeremy Allison jra at
Wed Jun 13 10:41:20 MDT 2012

On Wed, Jun 13, 2012 at 12:06:59PM +0200, Volker Lendecke wrote:
> On Wed, Jun 13, 2012 at 11:54:33AM +0200, Stefan (metze) Metzmacher wrote:
> > There's no infrastructure to defer async close calls,
> > so the smb layer calls file_free(), which means we return the result to
> > the client before the close is done.
> This might actually be an optimization that is simple and
> that we might do, similar to the early ack on async write.
> There might be file systems where close can not reasonably
> fail under non-catastropic circumstances like broken disks
> or corrupt file systems. For these cases it might be
> worthwile to add putting the close into a background thread.
> close(2) is deferred due to posix locks today, so we can not
> reliably return a possible close(2) error correctly to the
> client in all cases anyway.

Indeed. We already lie to clients on close. The
aio_pthread close change doesn't make it any worse :-).


More information about the samba-technical mailing list