[PARTITION]: Add whole_disk attribute.
Some partitioning systems create special partitions that span the entire disk. One example are Sun partitions, and this whole-disk partition exists to tell the firmware the extent of the entire device so it can load the boot block and do other things. Such partitions should not be treated as normal partitions, because all the other partitions overlap this whole-disk one. So we'd see multiple instances of the same UUID etc. which we do not want. udev and friends can thus search for this 'whole_disk' attribute and use it to decide to ignore the partition. Signed-off-by: Fabio Massimo Di Nitto <fabbione@ubuntu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
66efc5a7e3
commit
d18d7682c1
@@ -20,6 +20,8 @@ enum {
|
||||
LINUX_EXTENDED_PARTITION = 0x85,
|
||||
WIN98_EXTENDED_PARTITION = 0x0f,
|
||||
|
||||
SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION,
|
||||
|
||||
LINUX_SWAP_PARTITION = 0x82,
|
||||
LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
|
||||
|
||||
@@ -400,10 +402,14 @@ struct unixware_disklabel {
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define ADDPART_FLAG_NONE 0
|
||||
#define ADDPART_FLAG_RAID 1
|
||||
#define ADDPART_FLAG_WHOLEDISK 2
|
||||
|
||||
char *disk_name (struct gendisk *hd, int part, char *buf);
|
||||
|
||||
extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
|
||||
extern void add_partition(struct gendisk *, int, sector_t, sector_t);
|
||||
extern void add_partition(struct gendisk *, int, sector_t, sector_t, int);
|
||||
extern void delete_partition(struct gendisk *, int);
|
||||
|
||||
extern struct gendisk *alloc_disk_node(int minors, int node_id);
|
||||
|
Reference in New Issue
Block a user