All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaitanya.Kulkarni@wdc.com (Chaitanya Kulkarni)
Subject: [PATCH] nvmet-file: clamp-down file namespace lba_shift
Date: Wed, 6 Mar 2019 20:11:24 +0000	[thread overview]
Message-ID: <SN6PR04MB4527C36DBCE293BDA6A7508786730@SN6PR04MB4527.namprd04.prod.outlook.com> (raw)
In-Reply-To: 20190305095548.14934-1-sagi@grimberg.me

On 3/5/19 1:55 AM, Sagi Grimberg wrote:
> When the backing file is a tempfile for example, the inode i_blkbits
> can be 1M in size which causes problems for hosts to support as the
> disk block size.
> 
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> This issue was observed in I/O errors in the log running test nvme/009.
>
We are not doing any I/O in nvme/009 explicitly using dd/fio, is this 
due to internal commands we send as a part of connect and disconnect ?
Or test number is different ?

>   drivers/nvme/target/io-cmd-file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/io-cmd-file.c b/drivers/nvme/target/io-cmd-file.c
> index 517522305e5c..5008826cbd6a 100644
> --- a/drivers/nvme/target/io-cmd-file.c
> +++ b/drivers/nvme/target/io-cmd-file.c
> @@ -49,7 +49,7 @@ int nvmet_file_ns_enable(struct nvmet_ns *ns)
>   		goto err;
>   
>   	ns->size = stat.size;
> -	ns->blksize_shift = file_inode(ns->file)->i_blkbits;
> +	ns->blksize_shift = min_t(u8, file_inode(ns->file)->i_blkbits, PAGE_SHIFT);
>   
>   	ns->bvec_cache = kmem_cache_create("nvmet-bvec",
>   			NVMET_MAX_MPOOL_BVEC * sizeof(struct bio_vec),
> 

  reply	other threads:[~2019-03-06 20:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05  9:55 [PATCH] nvmet-file: clamp-down file namespace lba_shift Sagi Grimberg
2019-03-06 20:11 ` Chaitanya Kulkarni [this message]
2019-03-06 20:19   ` Sagi Grimberg
2019-03-06 20:38     ` Chaitanya Kulkarni
2019-03-06 20:49       ` Keith Busch
2019-03-07  1:14         ` Sagi Grimberg
2019-03-08 13:30 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SN6PR04MB4527C36DBCE293BDA6A7508786730@SN6PR04MB4527.namprd04.prod.outlook.com \
    --to=chaitanya.kulkarni@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.