From 855cdd2c0bff7dcf9337734dc5749d127ca05086 Mon Sep 17 00:00:00 2001 From: Matias Bjørling Date: Thu, 7 Jul 2016 09:54:20 +0200 Subject: lightnvm: make rrpc_map_page call nvm_get_blk outside locks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The nvm_get_blk() function is called with rlun->lock held. This is ok when the media manager implementation doesn't go out of its atomic context. However, if a media manager persists its metadata, and guarantees that the block is given to the target, this is no longer a viable approach. Therefore, clean up the flow of rrpc_map_page, and make sure that nvm_get_blk() is called without any locks acquired. Signed-off-by: Matias Bjørling Signed-off-by: Jens Axboe --- drivers/lightnvm/rrpc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/lightnvm/rrpc.h') diff --git a/drivers/lightnvm/rrpc.h b/drivers/lightnvm/rrpc.h index 448e39a9c515..5e87d52cb983 100644 --- a/drivers/lightnvm/rrpc.h +++ b/drivers/lightnvm/rrpc.h @@ -76,6 +76,7 @@ struct rrpc_lun { struct rrpc_block *blocks; /* Reference to block allocation */ struct list_head prio_list; /* Blocks that may be GC'ed */ + struct list_head wblk_list; /* Queued blocks to be written to */ struct work_struct ws_gc; -- cgit v1.2.3-59-g8ed1b