All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lightnvm: fix bad block initialization
@ 2018-02-22  8:10 Heiner Litz
  0 siblings, 0 replies; 5+ messages in thread
From: Heiner Litz @ 2018-02-22  8:10 UTC (permalink / raw)
  To: linux-block; +Cc: Heiner Litz

fix reading bad block device information to correctly setup the per line blk_bitmap during lightnvm initialization 

Signed-off-by: Heiner Litz <hlitz@ucsc.edu>
---
 drivers/lightnvm/pblk-init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 86a94a7faa96..e0eba150ac7e 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -461,10 +461,11 @@ static int pblk_bb_line(struct pblk *pblk, struct pblk_line *line,
 	struct nvm_tgt_dev *dev = pblk->dev;
 	struct nvm_geo *geo = &dev->geo;
 	int i, bb_cnt = 0;
+	int blk_per_lun = geo->nr_chks * geo->plane_mode;
 
 	for (i = 0; i < blk_per_line; i++) {
 		struct pblk_lun *rlun = &pblk->luns[i];
-		u8 *lun_bb_log = bb_log + i * blk_per_line;
+		u8 *lun_bb_log = bb_log + i * blk_per_lun;
 
 		if (lun_bb_log[line->id] == NVM_BLK_T_FREE)
 			continue;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] lightnvm: fix bad block initialization
  2018-02-23 18:45 ` Matias Bjørling
  2018-02-24  9:11   ` Javier Gonzalez
@ 2018-02-24  9:15   ` Javier Gonzalez
  1 sibling, 0 replies; 5+ messages in thread
From: Javier Gonzalez @ 2018-02-24  9:15 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: Heiner Litz, linux-block

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

> On 23 Feb 2018, at 19.45, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> On 02/23/2018 06:40 PM, Heiner Litz wrote:
>> fix reading bad block device information to correctly setup the per line
>> blk_bitmap during lightnvm initialization
>> 
>> Signed-off-by: Heiner Litz <hlitz@ucsc.edu>
>> ---
>>  drivers/lightnvm/pblk-init.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
>> index 86a94a7faa96..e0eba150ac7e 100644
>> --- a/drivers/lightnvm/pblk-init.c
>> +++ b/drivers/lightnvm/pblk-init.c
>> @@ -461,10 +461,11 @@ static int pblk_bb_line(struct pblk *pblk, struct pblk_line *line,
>>  	struct nvm_tgt_dev *dev = pblk->dev;
>>  	struct nvm_geo *geo = &dev->geo;
>>  	int i, bb_cnt = 0;
>> +	int blk_per_lun = geo->nr_chks * geo->plane_mode;
>> 
>>  	for (i = 0; i < blk_per_line; i++) {
>>  		struct pblk_lun *rlun = &pblk->luns[i];
>> -		u8 *lun_bb_log = bb_log + i * blk_per_line;
>> +		u8 *lun_bb_log = bb_log + i * blk_per_lun;
>> 
>>  		if (lun_bb_log[line->id] == NVM_BLK_T_FREE)
>>  			continue;
> 
> Thanks Heiner. Applied.

The patch looks good, but it is missing:

   Fixes: 36b3b712e81dc ("lightnvm: pblk: refactor bad block identification")

Matias, please add this when picking up.

Reviewed-by: Javier González <javier@cnexlabs.com>


PS:
Heiner: Matias' lightnvm.io address is mb@lightnvm.io

[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] lightnvm: fix bad block initialization
  2018-02-23 18:45 ` Matias Bjørling
@ 2018-02-24  9:11   ` Javier Gonzalez
  2018-02-24  9:15   ` Javier Gonzalez
  1 sibling, 0 replies; 5+ messages in thread
From: Javier Gonzalez @ 2018-02-24  9:11 UTC (permalink / raw)
  To: Matias Bjørling; +Cc: Heiner Litz, linux-block, matias

[-- Attachment #1: Type: text/plain, Size: 1390 bytes --]

> On 23 Feb 2018, at 19.45, Matias Bjørling <mb@lightnvm.io> wrote:
> 
> On 02/23/2018 06:40 PM, Heiner Litz wrote:
>> fix reading bad block device information to correctly setup the per line
>> blk_bitmap during lightnvm initialization
>> 
>> Signed-off-by: Heiner Litz <hlitz@ucsc.edu>
>> ---
>>  drivers/lightnvm/pblk-init.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
>> index 86a94a7faa96..e0eba150ac7e 100644
>> --- a/drivers/lightnvm/pblk-init.c
>> +++ b/drivers/lightnvm/pblk-init.c
>> @@ -461,10 +461,11 @@ static int pblk_bb_line(struct pblk *pblk, struct pblk_line *line,
>>  	struct nvm_tgt_dev *dev = pblk->dev;
>>  	struct nvm_geo *geo = &dev->geo;
>>  	int i, bb_cnt = 0;
>> +	int blk_per_lun = geo->nr_chks * geo->plane_mode;
>> 
>>  	for (i = 0; i < blk_per_line; i++) {
>>  		struct pblk_lun *rlun = &pblk->luns[i];
>> -		u8 *lun_bb_log = bb_log + i * blk_per_line;
>> +		u8 *lun_bb_log = bb_log + i * blk_per_lun;
>> 
>>  		if (lun_bb_log[line->id] == NVM_BLK_T_FREE)
>>  			continue;
> 
> Thanks Heiner. Applied.

The patch looks good, but it is missing:

    Fixes: 36b3b712e81dc ("lightnvm: pblk: refactor bad block identification")

Matias, please add this when picking up.

Reviewed-by: Javier González <javier@cnexlabs.com>




[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] lightnvm: fix bad block initialization
  2018-02-23 17:40 Heiner Litz
@ 2018-02-23 18:45 ` Matias Bjørling
  2018-02-24  9:11   ` Javier Gonzalez
  2018-02-24  9:15   ` Javier Gonzalez
  0 siblings, 2 replies; 5+ messages in thread
From: Matias Bjørling @ 2018-02-23 18:45 UTC (permalink / raw)
  To: Heiner Litz, linux-block; +Cc: javier, matias

On 02/23/2018 06:40 PM, Heiner Litz wrote:
> fix reading bad block device information to correctly setup the per line
> blk_bitmap during lightnvm initialization
> 
> Signed-off-by: Heiner Litz <hlitz@ucsc.edu>
> ---
>   drivers/lightnvm/pblk-init.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
> index 86a94a7faa96..e0eba150ac7e 100644
> --- a/drivers/lightnvm/pblk-init.c
> +++ b/drivers/lightnvm/pblk-init.c
> @@ -461,10 +461,11 @@ static int pblk_bb_line(struct pblk *pblk, struct pblk_line *line,
>   	struct nvm_tgt_dev *dev = pblk->dev;
>   	struct nvm_geo *geo = &dev->geo;
>   	int i, bb_cnt = 0;
> +	int blk_per_lun = geo->nr_chks * geo->plane_mode;
>   
>   	for (i = 0; i < blk_per_line; i++) {
>   		struct pblk_lun *rlun = &pblk->luns[i];
> -		u8 *lun_bb_log = bb_log + i * blk_per_line;
> +		u8 *lun_bb_log = bb_log + i * blk_per_lun;
>   
>   		if (lun_bb_log[line->id] == NVM_BLK_T_FREE)
>   			continue;
> 

Thanks Heiner. Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] lightnvm: fix bad block initialization
@ 2018-02-23 17:40 Heiner Litz
  2018-02-23 18:45 ` Matias Bjørling
  0 siblings, 1 reply; 5+ messages in thread
From: Heiner Litz @ 2018-02-23 17:40 UTC (permalink / raw)
  To: linux-block; +Cc: javier, matias, Heiner Litz

fix reading bad block device information to correctly setup the per line
blk_bitmap during lightnvm initialization

Signed-off-by: Heiner Litz <hlitz@ucsc.edu>
---
 drivers/lightnvm/pblk-init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c
index 86a94a7faa96..e0eba150ac7e 100644
--- a/drivers/lightnvm/pblk-init.c
+++ b/drivers/lightnvm/pblk-init.c
@@ -461,10 +461,11 @@ static int pblk_bb_line(struct pblk *pblk, struct pblk_line *line,
 	struct nvm_tgt_dev *dev = pblk->dev;
 	struct nvm_geo *geo = &dev->geo;
 	int i, bb_cnt = 0;
+	int blk_per_lun = geo->nr_chks * geo->plane_mode;
 
 	for (i = 0; i < blk_per_line; i++) {
 		struct pblk_lun *rlun = &pblk->luns[i];
-		u8 *lun_bb_log = bb_log + i * blk_per_line;
+		u8 *lun_bb_log = bb_log + i * blk_per_lun;
 
 		if (lun_bb_log[line->id] == NVM_BLK_T_FREE)
 			continue;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-24  9:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22  8:10 [PATCH] lightnvm: fix bad block initialization Heiner Litz
2018-02-23 17:40 Heiner Litz
2018-02-23 18:45 ` Matias Bjørling
2018-02-24  9:11   ` Javier Gonzalez
2018-02-24  9:15   ` Javier Gonzalez

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.