diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 17:27:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-05 17:27:02 -0400 |
commit | 3526dd0c7832f1011a0477cc6d903662bae05ea8 (patch) | |
tree | 22fbac64eb40a0b29bfa4c029695f39b2f591e62 /drivers/lightnvm/pblk-map.c | |
parent | dd972f924df6bdbc0ab185a38d5d2361dbc26311 (diff) | |
parent | bc6d65e6dc89c3b7ff78e4ad797117c122ffde8e (diff) |
Merge tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block
Pull block layer updates from Jens Axboe:
"It's a pretty quiet round this time, which is nice. This contains:
- series from Bart, cleaning up the way we set/test/clear atomic
queue flags.
- series from Bart, fixing races between gendisk and queue
registration and removal.
- set of bcache fixes and improvements from various folks, by way of
Michael Lyle.
- set of lightnvm updates from Matias, most of it being the 1.2 to
2.0 transition.
- removal of unused DIO flags from Nikolay.
- blk-mq/sbitmap memory ordering fixes from Omar.
- divide-by-zero fix for BFQ from Paolo.
- minor documentation patches from Randy.
- timeout fix from Tejun.
- Alpha "can't write a char atomically" fix from Mikulas.
- set of NVMe fixes by way of Keith.
- bsg and bsg-lib improvements from Christoph.
- a few sed-opal fixes from Jonas.
- cdrom check-disk-change deadlock fix from Maurizio.
- various little fixes, comment fixes, etc from various folks"
* tag 'for-4.17/block-20180402' of git://git.kernel.dk/linux-block: (139 commits)
blk-mq: Directly schedule q->timeout_work when aborting a request
blktrace: fix comment in blktrace_api.h
lightnvm: remove function name in strings
lightnvm: pblk: remove some unnecessary NULL checks
lightnvm: pblk: don't recover unwritten lines
lightnvm: pblk: implement 2.0 support
lightnvm: pblk: implement get log report chunk
lightnvm: pblk: rename ppaf* to addrf*
lightnvm: pblk: check for supported version
lightnvm: implement get log report chunk helpers
lightnvm: make address conversions depend on generic device
lightnvm: add support for 2.0 address format
lightnvm: normalize geometry nomenclature
lightnvm: complete geo structure with maxoc*
lightnvm: add shorten OCSSD version in geo
lightnvm: add minor version to generic geometry
lightnvm: simplify geometry structure
lightnvm: pblk: refactor init/exit sequences
lightnvm: Avoid validation of default op value
lightnvm: centralize permission check for lightnvm ioctl
...
Diffstat (limited to 'drivers/lightnvm/pblk-map.c')
-rw-r--r-- | drivers/lightnvm/pblk-map.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/lightnvm/pblk-map.c b/drivers/lightnvm/pblk-map.c index 7445e6430c52..20dbaa89c9df 100644 --- a/drivers/lightnvm/pblk-map.c +++ b/drivers/lightnvm/pblk-map.c | |||
@@ -65,6 +65,8 @@ static void pblk_map_page_data(struct pblk *pblk, unsigned int sentry, | |||
65 | lba_list[paddr] = cpu_to_le64(w_ctx->lba); | 65 | lba_list[paddr] = cpu_to_le64(w_ctx->lba); |
66 | if (lba_list[paddr] != addr_empty) | 66 | if (lba_list[paddr] != addr_empty) |
67 | line->nr_valid_lbas++; | 67 | line->nr_valid_lbas++; |
68 | else | ||
69 | atomic64_inc(&pblk->pad_wa); | ||
68 | } else { | 70 | } else { |
69 | lba_list[paddr] = meta_list[i].lba = addr_empty; | 71 | lba_list[paddr] = meta_list[i].lba = addr_empty; |
70 | __pblk_map_invalidate(pblk, line, paddr); | 72 | __pblk_map_invalidate(pblk, line, paddr); |
@@ -125,7 +127,7 @@ void pblk_map_erase_rq(struct pblk *pblk, struct nvm_rq *rqd, | |||
125 | atomic_dec(&e_line->left_eblks); | 127 | atomic_dec(&e_line->left_eblks); |
126 | 128 | ||
127 | *erase_ppa = rqd->ppa_list[i]; | 129 | *erase_ppa = rqd->ppa_list[i]; |
128 | erase_ppa->g.blk = e_line->id; | 130 | erase_ppa->a.blk = e_line->id; |
129 | 131 | ||
130 | spin_unlock(&e_line->lock); | 132 | spin_unlock(&e_line->lock); |
131 | 133 | ||
@@ -166,6 +168,6 @@ retry: | |||
166 | set_bit(bit, e_line->erase_bitmap); | 168 | set_bit(bit, e_line->erase_bitmap); |
167 | atomic_dec(&e_line->left_eblks); | 169 | atomic_dec(&e_line->left_eblks); |
168 | *erase_ppa = pblk->luns[bit].bppa; /* set ch and lun */ | 170 | *erase_ppa = pblk->luns[bit].bppa; /* set ch and lun */ |
169 | erase_ppa->g.blk = e_line->id; | 171 | erase_ppa->a.blk = e_line->id; |
170 | } | 172 | } |
171 | } | 173 | } |