Lines Matching refs:part

270 	struct block_device *part = dev_to_bdev(dev);  in part_uevent()  local
272 add_uevent_var(env, "PARTN=%u", part->bd_partno); in part_uevent()
273 if (part->bd_meta_info && part->bd_meta_info->volname[0]) in part_uevent()
274 add_uevent_var(env, "PARTNAME=%s", part->bd_meta_info->volname); in part_uevent()
285 static void delete_partition(struct block_device *part) in delete_partition() argument
287 lockdep_assert_held(&part->bd_disk->open_mutex); in delete_partition()
289 fsync_bdev(part); in delete_partition()
290 __invalidate_device(part, true); in delete_partition()
292 xa_erase(&part->bd_disk->part_tbl, part->bd_partno); in delete_partition()
293 kobject_put(part->bd_holder_dir); in delete_partition()
294 device_del(&part->bd_device); in delete_partition()
300 remove_inode_hash(part->bd_inode); in delete_partition()
302 put_device(&part->bd_device); in delete_partition()
437 struct block_device *part; in partition_overlaps() local
442 xa_for_each_start(&disk->part_tbl, idx, part, 1) { in partition_overlaps()
443 if (part->bd_partno != skip_partno && in partition_overlaps()
444 start < part->bd_start_sect + bdev_nr_sectors(part) && in partition_overlaps()
445 start + length > part->bd_start_sect) { in partition_overlaps()
458 struct block_device *part; in bdev_add_partition() local
472 part = add_partition(disk, partno, start, length, in bdev_add_partition()
474 ret = PTR_ERR_OR_ZERO(part); in bdev_add_partition()
482 struct block_device *part = NULL; in bdev_del_partition() local
486 part = xa_load(&disk->part_tbl, partno); in bdev_del_partition()
487 if (!part) in bdev_del_partition()
491 if (part->bd_openers) in bdev_del_partition()
494 delete_partition(part); in bdev_del_partition()
504 struct block_device *part = NULL; in bdev_resize_partition() local
508 part = xa_load(&disk->part_tbl, partno); in bdev_resize_partition()
509 if (!part) in bdev_resize_partition()
513 if (start != part->bd_start_sect) in bdev_resize_partition()
520 bdev_set_nr_sectors(part, length); in bdev_resize_partition()
546 struct block_device *part; in blk_drop_partitions() local
551 xa_for_each_start(&disk->part_tbl, idx, part, 1) in blk_drop_partitions()
552 delete_partition(part); in blk_drop_partitions()
560 struct block_device *part; in blk_add_partition() local
590 part = add_partition(disk, p, from, size, state->parts[p].flags, in blk_add_partition()
592 if (IS_ERR(part) && PTR_ERR(part) != -ENXIO) { in blk_add_partition()
594 disk->disk_name, p, -PTR_ERR(part)); in blk_add_partition()
600 md_autodetect_dev(part->bd_dev); in blk_add_partition()