@@ -342,6 +342,10 @@ static int max_part = 1;
module_param(max_part, int, 0444);
MODULE_PARM_DESC(max_part, "Num Minors to reserve between devices");
+static int disable_512e = 0;
+module_param(disable_512e, int, 0444);
+MODULE_PARM_DESC(disable_512e, "Disable Logical 512e sector size");
+
MODULE_LICENSE("GPL");
MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
MODULE_ALIAS("rd");
@@ -389,6 +393,10 @@ static struct brd_device *brd_alloc(int
* is harmless)
*/
blk_queue_physical_block_size(brd->brd_queue, PAGE_SIZE);
+
+ if (disable_512e)
+ blk_queue_logical_block_size(brd->brd_queue, PAGE_SIZE);
+
disk = brd->brd_disk = alloc_disk(max_part);
if (!disk)
goto out_free_queue;