diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/genhd.h | 6 | ||||
| -rw-r--r-- | include/linux/loop.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 6957350e122f..9de31bc98c88 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -131,6 +131,7 @@ struct hd_struct { | |||
| 131 | #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ | 131 | #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ |
| 132 | #define GENHD_FL_NATIVE_CAPACITY 128 | 132 | #define GENHD_FL_NATIVE_CAPACITY 128 |
| 133 | #define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256 | 133 | #define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256 |
| 134 | #define GENHD_FL_NO_PART_SCAN 512 | ||
| 134 | 135 | ||
| 135 | enum { | 136 | enum { |
| 136 | DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */ | 137 | DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */ |
| @@ -238,9 +239,10 @@ static inline int disk_max_parts(struct gendisk *disk) | |||
| 238 | return disk->minors; | 239 | return disk->minors; |
| 239 | } | 240 | } |
| 240 | 241 | ||
| 241 | static inline bool disk_partitionable(struct gendisk *disk) | 242 | static inline bool disk_part_scan_enabled(struct gendisk *disk) |
| 242 | { | 243 | { |
| 243 | return disk_max_parts(disk) > 1; | 244 | return disk_max_parts(disk) > 1 && |
| 245 | !(disk->flags & GENHD_FL_NO_PART_SCAN); | ||
| 244 | } | 246 | } |
| 245 | 247 | ||
| 246 | static inline dev_t disk_devt(struct gendisk *disk) | 248 | static inline dev_t disk_devt(struct gendisk *disk) |
diff --git a/include/linux/loop.h b/include/linux/loop.h index a06880689115..11a41a8f08eb 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
| @@ -74,6 +74,7 @@ struct loop_device { | |||
| 74 | enum { | 74 | enum { |
| 75 | LO_FLAGS_READ_ONLY = 1, | 75 | LO_FLAGS_READ_ONLY = 1, |
| 76 | LO_FLAGS_AUTOCLEAR = 4, | 76 | LO_FLAGS_AUTOCLEAR = 4, |
| 77 | LO_FLAGS_PARTSCAN = 8, | ||
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ | 80 | #include <asm/posix_types.h> /* for __kernel_old_dev_t */ |
