diff options
author | Volker Lendecke <vl@samba.org> | 2012-07-17 22:24:51 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-07-18 15:57:53 -0700 |
commit | 3e9f58be7e56b7990417e3f97a2d215f3591289e (patch) | |
tree | 2bc154d5c7c2a2bbeb4ac6ab948c427dab340a60 /source3/include | |
parent | 3da86cc23f20e5b852d08aa05dacabb2d6e496e2 (diff) | |
download | samba-3e9f58be7e56b7990417e3f97a2d215f3591289e.tar.gz samba-3e9f58be7e56b7990417e3f97a2d215f3591289e.tar.bz2 samba-3e9f58be7e56b7990417e3f97a2d215f3591289e.zip |
s3-smb1: Postpone close_file until all aio is handled
Thanks to Jeremy for this simple idea
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/vfs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h index c4ef5a3046..c5b896db0f 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -251,6 +251,15 @@ typedef struct files_struct { unsigned num_aio_requests; struct tevent_req **aio_requests; + + /* + * If a close request comes in while we still have aio_requests + * around, we need to hold back the close. When all aio_requests are + * done, the aio completion routines need tevent_wait_done() on + * this. A bit ugly, but before we have close_file() fully async + * possibly the simplest approach. Thanks, Jeremy for the idea. + */ + struct tevent_req *deferred_close; } files_struct; struct vuid_cache_entry { |