[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6F75B3CB-23BA-4CCD-9EA7-8B8B00BFFB9E@cnexlabs.com>
Date: Mon, 20 Aug 2018 07:45:19 +0000
From: Javier Gonzalez <javier@...xlabs.com>
To: Matias Bjørling <mb@...htnvm.io>
CC: "Konopko, Igor J" <igor.j.konopko@...el.com>,
"Dziegielewski, Marcin" <marcin.dziegielewski@...el.com>,
Hans Holmberg <hans.holmberg@...xlabs.com>,
Heiner Litz <hlitz@...c.edu>,
Young Tack Tack Jin <youngtack.jin@...cuitblvd.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] lightnvm: pblk: fix incorrect min_write_pgs
> On 17 Aug 2018, at 16.36, Matias Bjørling <mb@...htnvm.io> wrote:
>
> The calculation of pblk->min_write_pgs should only use the optimal
> write size attribute provided by the drive, it does not correlate to
> the memory page size of the system, which can be smaller or larger
> than the LBA size reported.
>
> Signed-off-by: Matias Bjørling <mb@...htnvm.io>
> ---
> drivers/lightnvm/pblk-init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
> index 9119c64d6f62..8adc8ac8b03c 100644
> --- a/drivers/lightnvm/pblk-init.c
> +++ b/drivers/lightnvm/pblk-init.c
> @@ -371,7 +371,7 @@ static int pblk_core_init(struct pblk *pblk)
> atomic64_set(&pblk->nr_flush, 0);
> pblk->nr_flush_rst = 0;
>
> - pblk->min_write_pgs = geo->ws_opt * (geo->csecs / PAGE_SIZE);
> + pblk->min_write_pgs = geo->ws_opt;
> max_write_ppas = pblk->min_write_pgs * geo->all_luns;
> pblk->max_write_pgs = min_t(int, max_write_ppas, NVM_MAX_VLBA);
> pblk_set_sec_per_write(pblk, pblk->min_write_pgs);
> --
> 2.11.0
Looks good to me.
Reviewed-by: Javier González <javier@...xlabs.com>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists