History

Merge branch 'for-3.2/drivers' of git://git.kernel.dk/linux-block

* 'for-3.2/drivers' of git://git.kernel.dk/linux-block: (30 commits) virtio-blk: use ida to allocate disk index hpsa: add small delay when using PCI Power Management to reset for kump cciss: add small delay when using PCI Power Management to reset for kump xen/blkback: Fix two races in the handling of barrier requests. xen/blkback: Check for proper operation. xen/blkback: Fix the inhibition to map pages when discarding sector ranges. xen/blkback: Report VBD_WSECT (wr_sect) properly. xen/blkback: Support 'feature-barrier' aka old-style BARRIER requests. xen-blkfront: plug device number leak in xlblk_init() error path xen-blkfront: If no barrier or flush is supported, use invalid operation. xen-blkback: use kzalloc() in favor of kmalloc()+memset() xen-blkback: fixed indentation and comments xen-blkfront: fix a deadlock while handling discard response xen-blkfront: Handle discard requests. xen-blkback: Implement discard requests ('feature-discard') xen-blkfront: add BLKIF_OP_DISCARD and discard request struct drivers/block/loop.c: remove unnecessary bdev argument from loop_clr_fd() drivers/block/loop.c: emit uevent on auto release drivers/block/cpqarray.c: use pci_dev->revision loop: always allow userspace partitions and optionally support automatic scanning ... Fic up trivial header file includsion conflict in drivers/block/loop.c

Linus Torvalds committed 15 years ago

Commit 3d0a8d12 parents b4fdcb0 a0eda6218 files · +638 −123Browse files

Showing the changes to include/linux (2 of 18 files). Show all

Unified · Split

2 files
  1. include/linux/genhd.h +4 −2
  2. include/linux/loop.h +1 −0
include/linux/genhd.h+4−2
@@ -131,6 +131,7 @@ struct hd_struct { · 130 unmodified lines
131131 #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */
132132 #define GENHD_FL_NATIVE_CAPACITY 128
133133 #define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256
134+#define GENHD_FL_NO_PART_SCAN 512
134135
135136 enum {
136137 DISK_EVENT_MEDIA_CHANGE = 1 << 0, /* media changed */
@@ -238,9 +239,10 @@ static inline int disk_max_parts(struct gendisk *disk) · 101 unmodified lines
238239 return disk->minors;
239240 }
240241
241−static inline bool disk_partitionable(struct gendisk *disk)
242+static inline bool disk_part_scan_enabled(struct gendisk *disk)
242243 {
243− return disk_max_parts(disk) > 1;
244+ return disk_max_parts(disk) > 1 &&
245+ !(disk->flags & GENHD_FL_NO_PART_SCAN);
244246 }
245247
246248 static inline dev_t disk_devt(struct gendisk *disk)
include/linux/loop.h+1−0
@@ -74,6 +74,7 @@ struct loop_device { · 73 unmodified lines
7474 enum {
7575 LO_FLAGS_READ_ONLY = 1,
7676 LO_FLAGS_AUTOCLEAR = 4,
77+ LO_FLAGS_PARTSCAN = 8,
7778 };
7879
7980 #include <asm/posix_types.h> /* for __kernel_old_dev_t */