diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-05-27 17:12:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:22:51 -0500 |
commit | 8c57860cc79f37296785b4f7ae67fd5a8a543e39 (patch) | |
tree | 12e62546bed4c881d4fe6eae24cc98b33e87541e /source3 | |
parent | 14e25f10d6a3da34fb8b29c4331571efa11ee3b8 (diff) | |
download | samba-8c57860cc79f37296785b4f7ae67fd5a8a543e39.tar.gz samba-8c57860cc79f37296785b4f7ae67fd5a8a543e39.tar.bz2 samba-8c57860cc79f37296785b4f7ae67fd5a8a543e39.zip |
r23169: Merge 535 of Tridge's bzr tree:
store the right data after cleaning lock records. This fixes
RAW-BENCH-LOCK after a recovery on a cluster
(This used to be commit 3da3086dbf594fbdc4cfabf78f8d3ea1df4dc8ce)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/locking/brlock.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index d8dcc6f642..8e2f7ce41a 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -1482,8 +1482,11 @@ static int traverse_fn(struct db_record *rec, void *state) } if (orig_num_locks != num_locks) { - if (rec->value.dsize) { - rec->store(rec, rec->value, TDB_REPLACE); + if (num_locks) { + TDB_DATA data; + data.dptr = (uint8_t *)locks; + data.dsize = num_locks*sizeof(struct lock_struct); + rec->store(rec, data, TDB_REPLACE); } else { rec->delete_rec(rec); } |