On 02/26/2015 10:41 AM, Boaz Harrosh wrote:
> 
> 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 <[email protected]>
> ---
>  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)
>        */

Hi Dave

I was just thinking should we also do

+       if (part_show)
>               blk_queue_physical_block_size(brd->brd_queue, PAGE_SIZE);

The rational is that if part_show is off then we are not using partitions
at all and then there can be no problems?

I'll try to run your tests here. I never test xfs always ext4, maybe I should
start to ;-). Actually I do have xfsprogs so why not. But if you could run
a quick test as well it could be great.

Thanks
Boaz

<>
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to