People systems have been using ramdisk with smaller-than-page-size blocks in their mkfs. The 4K sectors is only important if we will be using brd with a DAX filesystem. So only enable 4K sectors if DAX is configured Signed-off-by: Boaz Harrosh <boaz@xxxxxxxxxxxxx> --- drivers/block/brd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 6e0775b..e875f12 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -495,6 +495,7 @@ static struct brd_device *brd_alloc(int i) blk_queue_max_hw_sectors(brd->brd_queue, 1024); blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY); +#ifdef CONFIG_BLK_DEV_RAM_DAX /* This is so fdisk will align partitions on 4k, because of * direct_access API needing 4k alignment, returning a PFN * (This is only a problem on very small devices <= 4M, @@ -502,6 +503,7 @@ static struct brd_device *brd_alloc(int i) * is harmless) */ blk_queue_physical_block_size(brd->brd_queue, PAGE_SIZE); +#endif brd->brd_queue->limits.discard_granularity = PAGE_SIZE; brd->brd_queue->limits.max_discard_sectors = UINT_MAX; -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html