Lines Matching full:whole

1020  * @whole: whole block device containing @bdev, may equal @bdev
1031 static bool bd_may_claim(struct block_device *bdev, struct block_device *whole, in bd_may_claim() argument
1038 else if (whole == bdev) in bd_may_claim()
1039 return true; /* is a whole device which isn't held */ in bd_may_claim()
1041 else if (whole->bd_holder == bd_may_claim) in bd_may_claim()
1043 else if (whole->bd_holder != NULL) in bd_may_claim()
1052 * @whole: the whole device containing @bdev, may equal @bdev
1062 int bd_prepare_to_claim(struct block_device *bdev, struct block_device *whole, in bd_prepare_to_claim() argument
1068 if (!bd_may_claim(bdev, whole, holder)) { in bd_prepare_to_claim()
1074 if (whole->bd_claiming) { in bd_prepare_to_claim()
1075 wait_queue_head_t *wq = bit_waitqueue(&whole->bd_claiming, 0); in bd_prepare_to_claim()
1086 whole->bd_claiming = holder; in bd_prepare_to_claim()
1113 static void bd_clear_claiming(struct block_device *whole, void *holder) in bd_clear_claiming() argument
1117 BUG_ON(whole->bd_claiming != holder); in bd_clear_claiming()
1118 whole->bd_claiming = NULL; in bd_clear_claiming()
1119 wake_up_bit(&whole->bd_claiming, 0); in bd_clear_claiming()
1125 * @whole: whole block device
1132 struct block_device *whole, void *holder) in bd_finish_claiming() argument
1135 BUG_ON(!bd_may_claim(bdev, whole, holder)); in bd_finish_claiming()
1137 * Note that for a whole device bd_holders will be incremented twice, in bd_finish_claiming()
1140 whole->bd_holders++; in bd_finish_claiming()
1141 whole->bd_holder = bd_may_claim; in bd_finish_claiming()
1144 bd_clear_claiming(whole, holder); in bd_finish_claiming()
1151 * @whole: whole block device
1158 void bd_abort_claiming(struct block_device *bdev, struct block_device *whole, in bd_abort_claiming() argument
1162 bd_clear_claiming(whole, holder); in bd_abort_claiming()
1440 * mutex_lock_nested(whole->bd_mutex, 1)
1446 struct block_device *whole = NULL, *claiming = NULL; in __blkdev_get() local
1460 whole = bdget_disk(disk, 0); in __blkdev_get()
1461 if (!whole) { in __blkdev_get()
1469 if (whole) in __blkdev_get()
1470 claiming = whole; in __blkdev_get()
1522 ret = __blkdev_get(whole, mode, NULL, 1); in __blkdev_get()
1525 bdev->bd_contains = bdgrab(whole); in __blkdev_get()
1576 if (whole) in __blkdev_get()
1577 bdput(whole); in __blkdev_get()
1593 if (whole) in __blkdev_get()
1594 bdput(whole); in __blkdev_get()