Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1741606
| From | Rakesh Pandit <rakesh@tuxera.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] lightnvm: pblk: fix changing GC group list for a line |
| Date | 2017-09-28 16:50 +0200 |
| Message-ID | <uuIiu-1KL-5@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
pblk_line_gc_list seems to had a bug since the introduction of pblk in
getting GC list for a line. In b20ba1bc7 while redesigning GC
algorithm it was not fixed correctly. The problem is that even if
valid sector count (vsc) is less that mid_thrs (threshold for GC mid
list) it would always satisfy 'vsc < high_thrs' as high_thrs >
mid_thrs always.
Fixes: a4bd217b4("lightnvm: physical block device (pblk) target")
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
---
drivers/lightnvm/pblk-core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 8150164..93a58ed 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -295,16 +295,16 @@ struct list_head *pblk_line_gc_list(struct pblk *pblk, struct pblk_line *line)
line->gc_group = PBLK_LINEGC_FULL;
move_list = &l_mg->gc_full_list;
}
- } else if (vsc < lm->high_thrs) {
- if (line->gc_group != PBLK_LINEGC_HIGH) {
- line->gc_group = PBLK_LINEGC_HIGH;
- move_list = &l_mg->gc_high_list;
- }
} else if (vsc < lm->mid_thrs) {
if (line->gc_group != PBLK_LINEGC_MID) {
line->gc_group = PBLK_LINEGC_MID;
move_list = &l_mg->gc_mid_list;
}
+ } else if (vsc < lm->high_thrs) {
+ if (line->gc_group != PBLK_LINEGC_HIGH) {
+ line->gc_group = PBLK_LINEGC_HIGH;
+ move_list = &l_mg->gc_high_list;
+ }
} else if (vsc < line->sec_in_line) {
if (line->gc_group != PBLK_LINEGC_LOW) {
line->gc_group = PBLK_LINEGC_LOW;
--
2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] lightnvm: pblk: fix changing GC group list for a line Rakesh Pandit <rakesh@tuxera.com> - 2017-09-28 16:50 +0200
Re: [PATCH] lightnvm: pblk: fix changing GC group list for a line Javier González <jg@lightnvm.io> - 2017-10-02 13:30 +0200
Re: [PATCH] lightnvm: pblk: fix changing GC group list for a line Javier González <jg@lightnvm.io> - 2017-10-02 13:50 +0200
Re: [PATCH] lightnvm: pblk: fix changing GC group list for a line Rakesh Pandit <rakesh@tuxera.com> - 2017-10-02 13:50 +0200
csiph-web