Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326857
| From | Matias Bjørling <m@bjorling.me> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] lightnvm: fix request intersection locking in rrpc |
| Date | 2016-02-04 15:20 +0100 |
| Message-ID | <qYsVk-1nc-23@gated-at.bofh.it> (permalink) |
| References | <qYsVj-1nc-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Javier González <jg@lightnvm.io>
This patch fixes an error on the calculation of intersecting logical
addresses; it contemplates the case where a new request including
several addresses intersects with a single locked address. This case is
typical when multiple pages are sent in a new request, while GC - which
at the moment sends one address at the time - is running.
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
---
drivers/lightnvm/rrpc.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h
index c27283a..3989d65 100644
--- a/drivers/lightnvm/rrpc.h
+++ b/drivers/lightnvm/rrpc.h
@@ -174,8 +174,7 @@ static inline sector_t rrpc_get_sector(sector_t laddr)
static inline int request_intersects(struct rrpc_inflight_rq *r,
sector_t laddr_start, sector_t laddr_end)
{
- return (laddr_end >= r->l_start && laddr_end <= r->l_end) &&
- (laddr_start >= r->l_start && laddr_start <= r->l_end);
+ return (laddr_end >= r->l_start) && (laddr_start <= r->l_end);
}
static int __rrpc_lock_laddr(struct rrpc *rrpc, sector_t laddr,
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/5] LightNVM updates for next 4.5-rc Matias Bjørling <m@bjorling.me> - 2016-02-04 15:20 +0100 [PATCH 5/5] lightnvm: allow to force mm initialization Matias Bjørling <m@bjorling.me> - 2016-02-04 15:20 +0100 [PATCH 3/5] lightnvm: fix request intersection locking in rrpc Matias Bjørling <m@bjorling.me> - 2016-02-04 15:20 +0100 [PATCH 4/5] lightnvm: check overflow and correct mlc pairs Matias Bjørling <m@bjorling.me> - 2016-02-04 15:20 +0100 [PATCH 2/5] lightnvm: warn if irqs are disabled in lock laddr Matias Bjørling <m@bjorling.me> - 2016-02-04 15:20 +0100 Re: [PATCH v2 0/5] LightNVM updates for next 4.5-rc Jens Axboe <axboe@fb.com> - 2016-02-04 17:30 +0100
csiph-web