Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Matias Bjørling
On 03/31/2016 12:26 PM, Wenwei Tao wrote: This is okay with me. By the way, why don't you like (sector_t)dev->sec_size * dev->sec_per_lun * rrpc->nr_luns, the change seems smaller? Both works. I wanted to fix the underlying issue (which was rrpc values wasn't initialized enough to be used).

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Matias Bjørling
On 03/31/2016 12:26 PM, Wenwei Tao wrote: This is okay with me. By the way, why don't you like (sector_t)dev->sec_size * dev->sec_per_lun * rrpc->nr_luns, the change seems smaller? Both works. I wanted to fix the underlying issue (which was rrpc values wasn't initialized enough to be used).

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Wenwei Tao
This is okay with me. By the way, why don't you like (sector_t)dev->sec_size * dev->sec_per_lun * rrpc->nr_luns, the change seems smaller? 2016-03-31 18:07 GMT+08:00 Matias Bjørling : > On 03/31/2016 11:51 AM, Wenwei Tao wrote: >> >> This could be work, but it needs more steps

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Wenwei Tao
This is okay with me. By the way, why don't you like (sector_t)dev->sec_size * dev->sec_per_lun * rrpc->nr_luns, the change seems smaller? 2016-03-31 18:07 GMT+08:00 Matias Bjørling : > On 03/31/2016 11:51 AM, Wenwei Tao wrote: >> >> This could be work, but it needs more steps when

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Matias Bjørling
On 03/31/2016 11:51 AM, Wenwei Tao wrote: This could be work, but it needs more steps when rrpc_area_init fails. If rrpc_area_init fail we may come to rrpc_free and call rrpc_area_free, we find and put the area by the rrpc->soffset value, this value is zero when we fail to get an area, we may

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Matias Bjørling
On 03/31/2016 11:51 AM, Wenwei Tao wrote: This could be work, but it needs more steps when rrpc_area_init fails. If rrpc_area_init fail we may come to rrpc_free and call rrpc_area_free, we find and put the area by the rrpc->soffset value, this value is zero when we fail to get an area, we may

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Wenwei Tao
This could be work, but it needs more steps when rrpc_area_init fails. If rrpc_area_init fail we may come to rrpc_free and call rrpc_area_free, we find and put the area by the rrpc->soffset value, this value is zero when we fail to get an area, we may put an exist area that really start from zero

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Wenwei Tao
This could be work, but it needs more steps when rrpc_area_init fails. If rrpc_area_init fail we may come to rrpc_free and call rrpc_area_free, we find and put the area by the rrpc->soffset value, this value is zero when we fail to get an area, we may put an exist area that really start from zero

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Matias Bjørling
On 03/31/2016 10:31 AM, Wenwei Tao wrote: 2016-03-30 22:28 GMT+08:00 Wenwei Tao : rrpc->nr_sects is calculated after rrpc init luns succeeds, before that the value of rrpc->nr_sects is zero, so we cannot use it to calcuate rrpc area size, we use rrpc->nr_luns instead.

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Matias Bjørling
On 03/31/2016 10:31 AM, Wenwei Tao wrote: 2016-03-30 22:28 GMT+08:00 Wenwei Tao : rrpc->nr_sects is calculated after rrpc init luns succeeds, before that the value of rrpc->nr_sects is zero, so we cannot use it to calcuate rrpc area size, we use rrpc->nr_luns instead. Signed-off-by: Wenwei

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Wenwei Tao
2016-03-30 22:28 GMT+08:00 Wenwei Tao : > rrpc->nr_sects is calculated after rrpc init luns succeeds, > before that the value of rrpc->nr_sects is zero, so we cannot > use it to calcuate rrpc area size, we use rrpc->nr_luns instead. > > Signed-off-by: Wenwei Tao

Re: [PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-31 Thread Wenwei Tao
2016-03-30 22:28 GMT+08:00 Wenwei Tao : > rrpc->nr_sects is calculated after rrpc init luns succeeds, > before that the value of rrpc->nr_sects is zero, so we cannot > use it to calcuate rrpc area size, we use rrpc->nr_luns instead. > > Signed-off-by: Wenwei Tao > --- > drivers/lightnvm/rrpc.c |

[PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-30 Thread Wenwei Tao
rrpc->nr_sects is calculated after rrpc init luns succeeds, before that the value of rrpc->nr_sects is zero, so we cannot use it to calcuate rrpc area size, we use rrpc->nr_luns instead. Signed-off-by: Wenwei Tao --- drivers/lightnvm/rrpc.c | 2 +- 1 file changed, 1

[PATCH 1/2] lightnvm: use rrpc->nr_luns to calculate the rrpc area size

2016-03-30 Thread Wenwei Tao
rrpc->nr_sects is calculated after rrpc init luns succeeds, before that the value of rrpc->nr_sects is zero, so we cannot use it to calcuate rrpc area size, we use rrpc->nr_luns instead. Signed-off-by: Wenwei Tao --- drivers/lightnvm/rrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)