Lines Matching refs:partno
35 char *disk_name(struct gendisk *hd, int partno, char *buf) in disk_name() argument
37 if (!partno) in disk_name()
40 snprintf(buf, BDEVNAME_SIZE, "%sp%d", hd->disk_name, partno); in disk_name()
42 snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, partno); in disk_name()
49 return disk_name(bdev->bd_disk, bdev->bd_part->partno, buf); in bdevname()
79 return sprintf(buf, "%d\n", p->partno); in part_partition_show()
235 add_uevent_var(env, "PARTN=%u", part->partno); in part_uevent()
268 void delete_partition(struct gendisk *disk, int partno) in delete_partition() argument
274 if (partno >= ptbl->len) in delete_partition()
277 part = rcu_dereference_protected(ptbl->part[partno], 1); in delete_partition()
281 rcu_assign_pointer(ptbl->part[partno], NULL); in delete_partition()
301 struct hd_struct *add_partition(struct gendisk *disk, int partno, in add_partition() argument
313 err = disk_expand_part_tbl(disk, partno); in add_partition()
318 if (ptbl->part[partno]) in add_partition()
339 p->partno = partno; in add_partition()
354 dev_set_name(pdev, "%sp%d", dname, partno); in add_partition()
356 dev_set_name(pdev, "%s%d", dname, partno); in add_partition()
394 rcu_assign_pointer(ptbl->part[partno], p); in add_partition()
448 delete_partition(disk, part->partno); in drop_partitions()