]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: pblk: prevent premature sync point resets
authorHans Holmberg <hans.holmberg@cnexlabs.com>
Fri, 5 Jan 2018 13:16:11 +0000 (14:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jan 2018 15:50:12 +0000 (08:50 -0700)
commit36253ad401f15d28f2650b06c196aa83bf941457
treecb8027e0f3bb2ad1bdf293f7e243f4e8fa1e4f7d
parentf78b39ae40f8383119292a58bf38ac425eac48c6
lightnvm: pblk: prevent premature sync point resets

Unless we protect flush pointer updates with a lock, we risk
resetting new flush points before we've synced all sectors
up to that point.

This patch protects new flush points with the same spin lock
that is being held when advancing the sync pointer and
resetting completed flush points.

Signed-off-by: Hans Holmberg <hans.holmberg@cnexlabs.com>
Signed-off-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/pblk-rb.c