X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Flock.c;h=476b98f3f7ba0d9318edeedafc01ab717f6fe594;hp=88dbdd42c4899ebff6e57b52a70dc830195d507b;hb=0aa58f6e6017138a78ce4e86fb758732719acaca;hpb=51a56b52627e635566253a3fae081c3f466b6bb6 diff --git a/ccan/tdb2/lock.c b/ccan/tdb2/lock.c index 88dbdd42..476b98f3 100644 --- a/ccan/tdb2/lock.c +++ b/ccan/tdb2/lock.c @@ -1,4 +1,4 @@ - /* + /* Unix SMB/CIFS implementation. trivial database library @@ -186,7 +186,7 @@ static int tdb_brunlock(struct tdb_context *tdb, } while (ret == -1 && errno == EINTR); if (ret == -1) { - tdb_logerr(tdb, TDB_ERR_LOCK, TDB_DEBUG_TRACE, + tdb_logerr(tdb, TDB_ERR_LOCK, TDB_DEBUG_ERROR, "tdb_brunlock failed (fd=%d) at offset %zu" " rw_type=%d len=%zu", tdb->fd, (size_t)offset, rw_type, (size_t)len); @@ -198,7 +198,7 @@ static int tdb_brunlock(struct tdb_context *tdb, upgrade a read lock to a write lock. This needs to be handled in a special way as some OSes (such as solaris) have too conservative deadlock detection and claim a deadlock when progress can be - made. For those OSes we may loop for a while. + made. For those OSes we may loop for a while. */ int tdb_allrecord_upgrade(struct tdb_context *tdb) { @@ -234,7 +234,7 @@ int tdb_allrecord_upgrade(struct tdb_context *tdb) tv.tv_usec = 1; select(0, NULL, NULL, NULL, &tv); } - tdb_logerr(tdb, TDB_ERR_LOCK, TDB_DEBUG_WARNING, + tdb_logerr(tdb, TDB_ERR_LOCK, TDB_DEBUG_ERROR, "tdb_allrecord_upgrade failed"); return -1; } @@ -502,7 +502,7 @@ again: tdb_logerr(tdb, tdb->ecode, TDB_DEBUG_ERROR, "tdb_allrecord_lock freetables failed"); } - tdb_brunlock(tdb, ltype, TDB_HASH_LOCK_START, + tdb_brunlock(tdb, ltype, TDB_HASH_LOCK_START, TDB_HASH_LOCK_RANGE); return -1; } @@ -518,7 +518,7 @@ again: tdb_allrecord_unlock(tdb, ltype); if (tdb_lock_and_recover(tdb) == -1) { return -1; - } + } goto again; }