Commit 633bb2ce authored by Coly Li's avatar Coly Li Committed by Jens Axboe

bcache: add more error message in bch_cached_dev_attach()

This patch adds more error message for attaching cached device, this is
helpful to debug code failure during bache device start up.
Signed-off-by: default avatarColy Li <colyli@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4b6efb4b
...@@ -1169,6 +1169,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c, ...@@ -1169,6 +1169,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c,
down_write(&dc->writeback_lock); down_write(&dc->writeback_lock);
if (bch_cached_dev_writeback_start(dc)) { if (bch_cached_dev_writeback_start(dc)) {
up_write(&dc->writeback_lock); up_write(&dc->writeback_lock);
pr_err("Couldn't start writeback facilities for %s",
dc->disk.disk->disk_name);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1182,6 +1184,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c, ...@@ -1182,6 +1184,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c,
ret = bch_cached_dev_run(dc); ret = bch_cached_dev_run(dc);
if (ret && (ret != -EBUSY)) { if (ret && (ret != -EBUSY)) {
up_write(&dc->writeback_lock); up_write(&dc->writeback_lock);
pr_err("Couldn't run cached device %s",
dc->backing_dev_name);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment