svn commit: samba r3312 - in branches/SAMBA_4_0/source/ntvfs/common: .

tridge at samba.org tridge at samba.org
Thu Oct 28 06:45:29 GMT 2004


Author: tridge
Date: 2004-10-28 06:45:28 +0000 (Thu, 28 Oct 2004)
New Revision: 3312

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/ntvfs/common&rev=3312&nolog=1

Log:
in the brlock code, we prevent lock stampedes by attempting to not
wakeup all pending locks at once. This change means that we only
trigger this anti-stampede code for write locks, as for pending read
locks the correct behaviour is to stampede (as they will all succeed)

Modified:
   branches/SAMBA_4_0/source/ntvfs/common/brlock.c


Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/common/brlock.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/common/brlock.c	2004-10-28 06:17:38 UTC (rev 3311)
+++ branches/SAMBA_4_0/source/ntvfs/common/brlock.c	2004-10-28 06:45:28 UTC (rev 3312)
@@ -338,7 +338,9 @@
 			if (last_notice != -1 && brl_overlap(&locks[i], &locks[last_notice])) {
 				continue;
 			}
-			last_notice = i;
+			if (locks[i].lock_type == PENDING_WRITE_LOCK) {
+				last_notice = i;
+			}
 			data.data = (void *)&locks[i].notify_ptr;
 			data.length = sizeof(void *);
 			messaging_send(brl->messaging_ctx, locks[i].context.server, MSG_BRL_RETRY, &data);



More information about the samba-cvs mailing list