Home | History | Annotate | Download | only in ext2fs

Lines Matching defs:ltype

204 	u32 ltype;
258 static int tdb_lock(struct tdb_context *tdb, int list, int ltype);
259 static int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
261 static int tdb_transaction_lock(struct tdb_context *tdb, int ltype);
403 static int _tdb_lock(struct tdb_context *tdb, int list, int ltype, int op)
407 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
409 ltype &= ~TDB_MARK_LOCK;
413 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
422 TDB_LOG((tdb, TDB_DEBUG_ERROR,"tdb_lock: invalid list %d for ltype=%d\n",
423 list, ltype));
460 tdb->methods->tdb_brlock(tdb,FREELIST_TOP+4*list, ltype, op,
469 tdb->lockrecs[tdb->num_lockrecs].ltype = ltype;
476 int tdb_lock(struct tdb_context *tdb, int list, int ltype)
479 ret = _tdb_lock(tdb, list, ltype, F_SETLKW);
482 "ltype=%d (%s)\n", list, ltype, strerror(errno)));
488 int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
490 return _tdb_lock(tdb, list, ltype, F_SETLK);
497 int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
502 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
504 ltype &= ~TDB_MARK_LOCK;
508 (ltype == tdb->global_lock.ltype || ltype == F_RDLCK)) {
584 int tdb_transaction_lock(struct tdb_context *tdb, int ltype)
589 if (tdb->methods->tdb_brlock(tdb, TRANSACTION_LOCK, ltype,
619 static int _tdb_lockall(struct tdb_context *tdb, int ltype, int op)
621 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
623 ltype &= ~TDB_MARK_LOCK;
629 if (tdb->global_lock.count && tdb->global_lock.ltype == ltype) {
645 tdb->methods->tdb_brlock(tdb, FREELIST_TOP, ltype, op,
654 tdb->global_lock.ltype = ltype;
662 static int _tdb_unlockall(struct tdb_context *tdb, int ltype)
664 bool mark_lock = ((ltype & TDB_MARK_LOCK) == TDB_MARK_LOCK);
666 ltype &= ~TDB_MARK_LOCK;
673 if (tdb->global_lock.ltype != ltype || tdb->global_lock.count == 0) {
690 tdb->global_lock.ltype = 0;