bcache: fix race of writeback thread starting before complete initialization
The bch_writeback_thread might BUG_ON in read_dirty() if dc->sb==BDEV_STATE_DIRTY and bch_sectors_dirty_init has not yet completed its related initialization. This patch downs the dc->writeback_lock until after initialization is complete, thus preventing bch_writeback_thread from proceeding prematurely. See this thread: http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3453Signed-off-by: NEric Wheeler <bcache@linux.ewheeler.net> Tested-by: NMarc MERLIN <marc@merlins.org> Cc: <stable@vger.kernel.org> Signed-off-by: NJens Axboe <axboe@fb.com>
Showing
想要评论请 注册 或 登录