diff options
| author | Jens Axboe <jaxboe@fusionio.com> | 2011-08-23 20:01:11 +0200 |
|---|---|---|
| committer | Jens Axboe <jaxboe@fusionio.com> | 2011-08-23 20:01:11 +0200 |
| commit | e8b177cedc39b092e423b8cbc687dbf096a1de47 (patch) | |
| tree | 67b1f1b622c93685eeefa8b68ad3c2ee9404df28 /include | |
| parent | dfaa2ef68e80c378e610e3c8c536f1c239e8d3ef (diff) | |
| parent | d27769ec3df1a8de9ca450d2dcd72d1ab259ba32 (diff) | |
| download | cachepc-linux-e8b177cedc39b092e423b8cbc687dbf096a1de47.tar.gz cachepc-linux-e8b177cedc39b092e423b8cbc687dbf096a1de47.zip | |
Merge branch 'for-3.2/core' into for-3.2/drivers
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/genhd.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 02fa4697a0e5..6d18f3531f18 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -128,6 +128,7 @@ struct hd_struct { #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ #define GENHD_FL_NATIVE_CAPACITY 128 #define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256 +#define GENHD_FL_NO_PART_SCAN 512 enum { DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */ @@ -234,9 +235,10 @@ static inline int disk_max_parts(struct gendisk *disk) return disk->minors; } -static inline bool disk_partitionable(struct gendisk *disk) +static inline bool disk_part_scan_enabled(struct gendisk *disk) { - return disk_max_parts(disk) > 1; + return disk_max_parts(disk) > 1 && + !(disk->flags & GENHD_FL_NO_PART_SCAN); } static inline dev_t disk_devt(struct gendisk *disk) |
