Home | History | Annotate | Download | only in ext2fs

Lines Matching defs:ltype

205 	u32 ltype;
260 static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
261 static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
263 static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
405 static int _tdb_lock(struct tdb_context *tdb, int list, int ltype, int op)
409 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
411 ltype &= ~TDB_MARK_LOCK;
415 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
424 TDB_LOG((tdb, TDB_DEBUG_ERROR,"tdb_lock: invalid list %d for ltype=%d\n",
425 list, ltype));
462 tdb->methods->tdb_brlock(tdb,FREELIST_TOP+4*list, ltype, op,
471 tdb->lockrecs[tdb->num_lockrecs].ltype = ltype;
478 int tdb_lock(struct tdb_context *tdb, int list, int ltype)
481 ret = _tdb_lock(tdb, list, ltype, F_SETLKW);
484 "ltype=%d (%s)\n", list, ltype, strerror(errno)));
490 int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
492 return _tdb_lock(tdb, list, ltype, F_SETLK);
499 int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
504 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
506 ltype &= ~TDB_MARK_LOCK;
510 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
586 int tdb_transaction_lock(struct tdb_context *tdb, int ltype)
591 if (tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, ltype,
621 static int _tdb_lockall(struct tdb_context *tdb, int ltype, int op)
623 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
625 ltype &= ~TDB_MARK_LOCK;
631 if (tdb->global_lock.count && tdb->global_lock.ltype == ltype) {
647 tdb->methods->tdb_brlock(tdb, FREELIST_TOP, ltype, op,
656 tdb->global_lock.ltype = ltype;
664 static int _tdb_unlockall(struct tdb_context *tdb, int ltype)
666 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
668 ltype &= ~TDB_MARK_LOCK;
675 if (tdb->global_lock.ltype != ltype || tdb->global_lock.count == 0) {
692 tdb->global_lock.ltype = 0;