Lines Matching full:whole

1034  * @whole: whole block device containing @bdev, may equal @bdev
1045 static bool bd_may_claim(struct block_device *bdev, struct block_device *whole, in bd_may_claim() argument
1052 else if (whole == bdev) in bd_may_claim()
1053 return true; /* is a whole device which isn't held */ in bd_may_claim()
1055 else if (whole->bd_holder == bd_may_claim) in bd_may_claim()
1057 else if (whole->bd_holder != NULL) in bd_may_claim()
1066 * @whole: the whole device containing @bdev, may equal @bdev
1076 int bd_prepare_to_claim(struct block_device *bdev, struct block_device *whole, in bd_prepare_to_claim() argument
1082 if (!bd_may_claim(bdev, whole, holder)) { in bd_prepare_to_claim()
1088 if (whole->bd_claiming) { in bd_prepare_to_claim()
1089 wait_queue_head_t *wq = bit_waitqueue(&whole->bd_claiming, 0); in bd_prepare_to_claim()
1100 whole->bd_claiming = holder; in bd_prepare_to_claim()
1127 static void bd_clear_claiming(struct block_device *whole, void *holder) in bd_clear_claiming() argument
1131 BUG_ON(whole->bd_claiming != holder); in bd_clear_claiming()
1132 whole->bd_claiming = NULL; in bd_clear_claiming()
1133 wake_up_bit(&whole->bd_claiming, 0); in bd_clear_claiming()
1139 * @whole: whole block device
1146 struct block_device *whole, void *holder) in bd_finish_claiming() argument
1149 BUG_ON(!bd_may_claim(bdev, whole, holder)); in bd_finish_claiming()
1151 * Note that for a whole device bd_holders will be incremented twice, in bd_finish_claiming()
1154 whole->bd_holders++; in bd_finish_claiming()
1155 whole->bd_holder = bd_may_claim; in bd_finish_claiming()
1158 bd_clear_claiming(whole, holder); in bd_finish_claiming()
1165 * @whole: whole block device
1172 void bd_abort_claiming(struct block_device *bdev, struct block_device *whole, in bd_abort_claiming() argument
1176 bd_clear_claiming(whole, holder); in bd_abort_claiming()
1457 * mutex_lock_nested(whole->bd_mutex, 1)
1463 struct block_device *whole = NULL, *claiming = NULL; in __blkdev_get() local
1477 whole = bdget_disk(disk, 0); in __blkdev_get()
1478 if (!whole) { in __blkdev_get()
1486 if (whole) in __blkdev_get()
1487 claiming = whole; in __blkdev_get()
1539 ret = __blkdev_get(whole, mode, NULL, 1); in __blkdev_get()
1542 bdev->bd_contains = bdgrab(whole); in __blkdev_get()
1593 if (whole) in __blkdev_get()
1594 bdput(whole); in __blkdev_get()
1610 if (whole) in __blkdev_get()
1611 bdput(whole); in __blkdev_get()