Lines Matching full:part

251 	const struct block_device *part = dev_to_bdev(dev);  in part_uevent()  local
253 add_uevent_var(env, "PARTN=%u", bdev_partno(part)); in part_uevent()
254 if (part->bd_meta_info && part->bd_meta_info->volname[0]) in part_uevent()
255 add_uevent_var(env, "PARTNAME=%s", part->bd_meta_info->volname); in part_uevent()
266 void drop_partition(struct block_device *part) in drop_partition() argument
268 lockdep_assert_held(&part->bd_disk->open_mutex); in drop_partition()
270 xa_erase(&part->bd_disk->part_tbl, bdev_partno(part)); in drop_partition()
271 kobject_put(part->bd_holder_dir); in drop_partition()
273 device_del(&part->bd_device); in drop_partition()
274 put_device(&part->bd_device); in drop_partition()
401 struct block_device *part; in partition_overlaps() local
406 xa_for_each_start(&disk->part_tbl, idx, part, 1) { in partition_overlaps()
407 if (bdev_partno(part) != skip_partno && in partition_overlaps()
408 start < part->bd_start_sect + bdev_nr_sectors(part) && in partition_overlaps()
409 start + length > part->bd_start_sect) { in partition_overlaps()
422 struct block_device *part; in bdev_add_partition() local
441 part = add_partition(disk, partno, start, length, in bdev_add_partition()
443 ret = PTR_ERR_OR_ZERO(part); in bdev_add_partition()
451 struct block_device *part = NULL; in bdev_del_partition() local
455 part = xa_load(&disk->part_tbl, partno); in bdev_del_partition()
456 if (!part) in bdev_del_partition()
460 if (atomic_read(&part->bd_openers)) in bdev_del_partition()
464 * We verified that @part->bd_openers is zero above and so in bdev_del_partition()
465 * @part->bd_holder{_ops} can't be set. And since we hold in bdev_del_partition()
468 * So no need to call @part->bd_holder_ops->mark_dead() here. in bdev_del_partition()
472 bdev_unhash(part); in bdev_del_partition()
473 invalidate_bdev(part); in bdev_del_partition()
474 drop_partition(part); in bdev_del_partition()
484 struct block_device *part = NULL; in bdev_resize_partition() local
488 part = xa_load(&disk->part_tbl, partno); in bdev_resize_partition()
489 if (!part) in bdev_resize_partition()
493 if (start != part->bd_start_sect) in bdev_resize_partition()
500 bdev_set_nr_sectors(part, length); in bdev_resize_partition()
526 struct block_device *part; in blk_add_partition() local
556 part = add_partition(disk, p, from, size, state->parts[p].flags, in blk_add_partition()
558 if (IS_ERR(part)) { in blk_add_partition()
559 if (PTR_ERR(part) != -ENXIO) { in blk_add_partition()
561 disk->disk_name, p, part); in blk_add_partition()
568 md_autodetect_dev(part->bd_dev); in blk_add_partition()
636 struct block_device *part; in bdev_disk_changed() local
651 xa_for_each_start(&disk->part_tbl, idx, part, 1) { in bdev_disk_changed()
657 bdev_unhash(part); in bdev_disk_changed()
664 WARN_ON_ONCE(atomic_read(&part->bd_openers)); in bdev_disk_changed()
665 invalidate_bdev(part); in bdev_disk_changed()
666 drop_partition(part); in bdev_disk_changed()