mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
d734547488
Now we have one fixed field for the exclusive lock holder and an array of shared locks. This way we now prioritize writers over readers: If a pending write comes in while readers are active, it will put itself into the exclusive slot. Then it waits for the readers to vanish. Only when all readers are gone the exclusive lock request is granted. New readers will just look at the exclusive slot and see it's taken. They will then line up as watchers, retrying whenever things change. This also means that it will be cheaper to support many shared locks: Granting a shared lock just means to extend the array. We don't have to walk the array for possible conflicts. This also adds explicit UPGRADE and DOWNGRADE operations for better error checking. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> |
||
---|---|---|
.. | ||
bench_pthreadpool.c | ||
cmd_vfs.c | ||
denytest.c | ||
locktest2.c | ||
mangle_test.c | ||
masktest.c | ||
msg_sink.c | ||
msg_source.c | ||
msgtest.c | ||
nbench.c | ||
nbio.c | ||
pdbtest.c | ||
proto.h | ||
rpc_open_tcp.c | ||
scanner.c | ||
test_addrchange.c | ||
test_async_echo.c | ||
test_authinfo_structs.c | ||
test_buffersize.c | ||
test_case_insensitive.c | ||
test_chain3.c | ||
test_cleanup.c | ||
test_dbwrap_ctdb.c | ||
test_dbwrap_do_locked.c | ||
test_dbwrap_watch.c | ||
test_g_lock.c | ||
test_hidenewfiles.c | ||
test_idmap_cache.c | ||
test_idmap_tdb_common.c | ||
test_messaging_fd_passing.c | ||
test_messaging_read.c | ||
test_messaging_send_all.c | ||
test_namemap_cache.c | ||
test_notify_online.c | ||
test_notify.c | ||
test_nttrans_create.c | ||
test_nttrans_fsctl.c | ||
test_oplock_cancel.c | ||
test_posix_append.c | ||
test_pthreadpool_tevent.c | ||
test_smb2.c | ||
test_smbsock_any_connect.c | ||
torture.c | ||
utable.c | ||
vfstest_chain.c | ||
vfstest.c | ||
vfstest.h | ||
wbc_async.c | ||
wbc_async.h |