Lines Matching full:part

268 	struct block_device *part = dev_to_bdev(dev);  in part_uevent()  local
270 add_uevent_var(env, "PARTN=%u", part->bd_partno); in part_uevent()
271 if (part->bd_meta_info && part->bd_meta_info->volname[0]) in part_uevent()
272 add_uevent_var(env, "PARTNAME=%s", part->bd_meta_info->volname); in part_uevent()
283 static void delete_partition(struct block_device *part) in delete_partition() argument
285 lockdep_assert_held(&part->bd_disk->open_mutex); in delete_partition()
287 fsync_bdev(part); in delete_partition()
288 __invalidate_device(part, true); in delete_partition()
290 xa_erase(&part->bd_disk->part_tbl, part->bd_partno); in delete_partition()
291 kobject_put(part->bd_holder_dir); in delete_partition()
292 device_del(&part->bd_device); in delete_partition()
298 remove_inode_hash(part->bd_inode); in delete_partition()
300 put_device(&part->bd_device); in delete_partition()
435 struct block_device *part; in partition_overlaps() local
440 xa_for_each_start(&disk->part_tbl, idx, part, 1) { in partition_overlaps()
441 if (part->bd_partno != skip_partno && in partition_overlaps()
442 start < part->bd_start_sect + bdev_nr_sectors(part) && in partition_overlaps()
443 start + length > part->bd_start_sect) { in partition_overlaps()
456 struct block_device *part; in bdev_add_partition() local
470 part = add_partition(disk, partno, start, length, in bdev_add_partition()
472 ret = PTR_ERR_OR_ZERO(part); in bdev_add_partition()
480 struct block_device *part = NULL; in bdev_del_partition() local
484 part = xa_load(&disk->part_tbl, partno); in bdev_del_partition()
485 if (!part) in bdev_del_partition()
489 if (part->bd_openers) in bdev_del_partition()
492 delete_partition(part); in bdev_del_partition()
502 struct block_device *part = NULL; in bdev_resize_partition() local
506 part = xa_load(&disk->part_tbl, partno); in bdev_resize_partition()
507 if (!part) in bdev_resize_partition()
511 if (start != part->bd_start_sect) in bdev_resize_partition()
518 bdev_set_nr_sectors(part, length); in bdev_resize_partition()
544 struct block_device *part; in blk_drop_partitions() local
549 xa_for_each_start(&disk->part_tbl, idx, part, 1) in blk_drop_partitions()
550 delete_partition(part); in blk_drop_partitions()
558 struct block_device *part; in blk_add_partition() local
588 part = add_partition(disk, p, from, size, state->parts[p].flags, in blk_add_partition()
590 if (IS_ERR(part) && PTR_ERR(part) != -ENXIO) { in blk_add_partition()
592 disk->disk_name, p, -PTR_ERR(part)); in blk_add_partition()
598 md_autodetect_dev(part->bd_dev); in blk_add_partition()