Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1291064 > unrolled thread
| Started by | Chao Yu <chao2.yu@samsung.com> |
|---|---|
| First post | 2015-12-14 11:30 +0100 |
| Last post | 2015-12-14 12:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] lightnvm: fix incorrect nr_free_blocks stat Chao Yu <chao2.yu@samsung.com> - 2015-12-14 11:30 +0100
Re: [PATCH] lightnvm: fix incorrect nr_free_blocks stat Matias Bjørling <mb@lightnvm.io> - 2015-12-14 12:50 +0100
| From | Chao Yu <chao2.yu@samsung.com> |
|---|---|
| Date | 2015-12-14 11:30 +0100 |
| Subject | [PATCH] lightnvm: fix incorrect nr_free_blocks stat |
| Message-ID | <qFyyf-4PE-25@gated-at.bofh.it> |
When initing bad block list in gennvm_block_bb, once we move bad block from free_list to bb_list, we should maintain both stat info nr_free_blocks and nr_bad_blocks. So this patch fixes to add missing operation related to nr_free_blocks. Signed-off-by: Chao Yu <chao2.yu@samsung.com> --- drivers/lightnvm/gennvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index 35dde84..6b504a2 100644 --- a/drivers/lightnvm/gennvm.c +++ b/drivers/lightnvm/gennvm.c @@ -89,6 +89,7 @@ static int gennvm_block_bb(struct ppa_addr ppa, int nr_blocks, u8 *blks, list_move_tail(&blk->list, &lun->bb_list); lun->vlun.nr_bad_blocks++; + lun->vlun.nr_free_blocks--; } return 0; -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Matias Bjørling <mb@lightnvm.io> |
|---|---|
| Date | 2015-12-14 12:50 +0100 |
| Message-ID | <qFzNE-5Cf-13@gated-at.bofh.it> |
| In reply to | #1291064 |
On 12/14/2015 11:23 AM, Chao Yu wrote: > When initing bad block list in gennvm_block_bb, once we move bad block > from free_list to bb_list, we should maintain both stat info > nr_free_blocks and nr_bad_blocks. So this patch fixes to add missing > operation related to nr_free_blocks. > > Signed-off-by: Chao Yu <chao2.yu@samsung.com> > --- > drivers/lightnvm/gennvm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c > index 35dde84..6b504a2 100644 > --- a/drivers/lightnvm/gennvm.c > +++ b/drivers/lightnvm/gennvm.c > @@ -89,6 +89,7 @@ static int gennvm_block_bb(struct ppa_addr ppa, int nr_blocks, u8 *blks, > > list_move_tail(&blk->list, &lun->bb_list); > lun->vlun.nr_bad_blocks++; > + lun->vlun.nr_free_blocks--; > } > > return 0; > Thanks Yu, Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web