1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r10494: - don't generate a tdb log message for any type of failed lock probe

- if the lock upgrade loop ever fails then log a warning
This commit is contained in:
Andrew Tridgell 2005-09-26 01:37:46 +00:00 committed by Gerald (Jerry) Carter
parent 144cc3da5e
commit 1b03c4e6c7

View File

@ -65,11 +65,7 @@ int tdb_brlock_len(struct tdb_context *tdb, tdb_off_t offset,
/* Generic lock error. errno set by fcntl.
* EAGAIN is an expected return from non-blocking
* locks. */
if (errno != EAGAIN) {
TDB_LOG((tdb, 5, "tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d len=%d: %s\n",
tdb->fd, offset, rw_type, lck_type, len,
strerror(errno)));
} else if (!probe && lck_type != F_SETLK) {
if (!probe && lck_type != F_SETLK) {
/* Ensure error code is set for log fun to examine. */
tdb->ecode = TDB_ERR_LOCK;
TDB_LOG((tdb, 5,"tdb_brlock failed (fd=%d) at offset %d rw_type=%d lck_type=%d\n",
@ -103,6 +99,7 @@ int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len)
tv.tv_usec = 1;
select(0, NULL, NULL, NULL, &tv);
}
TDB_LOG((tdb, 5,"tdb_brlock_upgrade failed at offset %d\n", offset));
return -1;
}