Lines Matching full:part
259 struct block_device *part = dev_to_bdev(dev); in part_uevent() local
261 add_uevent_var(env, "PARTN=%u", part->bd_partno); in part_uevent()
262 if (part->bd_meta_info && part->bd_meta_info->volname[0]) in part_uevent()
263 add_uevent_var(env, "PARTNAME=%s", part->bd_meta_info->volname); in part_uevent()
274 static void delete_partition(struct block_device *part) in delete_partition() argument
276 lockdep_assert_held(&part->bd_disk->open_mutex); in delete_partition()
278 fsync_bdev(part); in delete_partition()
279 __invalidate_device(part, true); in delete_partition()
281 xa_erase(&part->bd_disk->part_tbl, part->bd_partno); in delete_partition()
282 kobject_put(part->bd_holder_dir); in delete_partition()
283 device_del(&part->bd_device); in delete_partition()
289 remove_inode_hash(part->bd_inode); in delete_partition()
291 put_device(&part->bd_device); in delete_partition()
426 struct block_device *part; in partition_overlaps() local
431 xa_for_each_start(&disk->part_tbl, idx, part, 1) { in partition_overlaps()
432 if (part->bd_partno != skip_partno && in partition_overlaps()
433 start < part->bd_start_sect + bdev_nr_sectors(part) && in partition_overlaps()
434 start + length > part->bd_start_sect) { in partition_overlaps()
447 struct block_device *part; in bdev_add_partition() local
461 part = add_partition(disk, partno, start, length, in bdev_add_partition()
463 ret = PTR_ERR_OR_ZERO(part); in bdev_add_partition()
471 struct block_device *part = NULL; in bdev_del_partition() local
475 part = xa_load(&disk->part_tbl, partno); in bdev_del_partition()
476 if (!part) in bdev_del_partition()
480 if (atomic_read(&part->bd_openers)) in bdev_del_partition()
483 delete_partition(part); in bdev_del_partition()
493 struct block_device *part = NULL; in bdev_resize_partition() local
497 part = xa_load(&disk->part_tbl, partno); in bdev_resize_partition()
498 if (!part) in bdev_resize_partition()
502 if (start != part->bd_start_sect) in bdev_resize_partition()
509 bdev_set_nr_sectors(part, length); in bdev_resize_partition()
532 struct block_device *part; in blk_drop_partitions() local
537 xa_for_each_start(&disk->part_tbl, idx, part, 1) in blk_drop_partitions()
538 delete_partition(part); in blk_drop_partitions()
546 struct block_device *part; in blk_add_partition() local
576 part = add_partition(disk, p, from, size, state->parts[p].flags, in blk_add_partition()
578 if (IS_ERR(part) && PTR_ERR(part) != -ENXIO) { in blk_add_partition()
580 disk->disk_name, p, -PTR_ERR(part)); in blk_add_partition()
586 md_autodetect_dev(part->bd_dev); in blk_add_partition()