linux/drivers/md/bcache
Shenghui Wang e921efeb07 bcache: make the pr_err statement used for ENOENT only in sysfs_attatch section
The pr_err statement in the code for sysfs_attatch section would run
for various error codes, which maybe confusing.

E.g,

Run the command twice:
   echo 796b5c05-b03c-4bc7-9cbd-a8df5e8be891 > \
				/sys/block/bcache0/bcache/attach
   [the backing dev got attached on the first run]
   echo 796b5c05-b03c-4bc7-9cbd-a8df5e8be891 > \
				/sys/block/bcache0/bcache/attach

In dmesg, after the command run twice, we can get:
	bcache: bch_cached_dev_attach() Can't attach sda6: already attached
	bcache: __cached_dev_store() Can't attach 796b5c05-b03c-4bc7-9cbd-\
a8df5e8be891
               : cache set not found
The first statement in the message was right, but the second was
confusing.

bch_cached_dev_attach has various pr_ statements for various error
codes, except ENOENT.

After the change, rerun above command twice:
	echo 796b5c05-b03c-4bc7-9cbd-a8df5e8be891 > \
			/sys/block/bcache0/bcache/attach
	echo 796b5c05-b03c-4bc7-9cbd-a8df5e8be891 > \
			/sys/block/bcache0/bcache/attach

In dmesg we only got:
	bcache: bch_cached_dev_attach() Can't attach sda6: already attached
No confusing "cache set not found" message anymore.

And for some not exist SET-UUID:
	echo 796b5c05-b03c-4bc7-9cbd-a8df5e8be898 > \
			/sys/block/bcache0/bcache/attach
In dmesg we can get:
	bcache: __cached_dev_store() Can't attach 796b5c05-b03c-4bc7-9cbd-\
a8df5e8be898
	               : cache set not found

Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-08-09 08:21:17 -06:00
..
alloc.c bcache: add wait_for_kthread_stop() in bch_allocator_thread() 2018-05-03 08:35:13 -06:00
bcache.h bcache: set max writeback rate when I/O request is idle 2018-08-09 08:21:15 -06:00
bset.c bcache: add code comments for bset.c 2018-08-09 08:21:12 -06:00
bset.h bcache: convert to bioset_init()/mempool_init() 2018-05-30 15:33:32 -06:00
btree.c bcache: avoid unncessary cache prefetch bch_btree_node_get() 2018-08-09 08:21:05 -06:00
btree.h Merge branch 'for-4.15/block' of git://git.kernel.dk/linux-block 2017-11-14 15:32:19 -08:00
closure.c bcache: do not check return value of debugfs_create_dir() 2018-08-09 08:21:01 -06:00
closure.h bcache: do not check return value of debugfs_create_dir() 2018-08-09 08:21:01 -06:00
debug.c bcache: do not check return value of debugfs_create_dir() 2018-08-09 08:21:01 -06:00
debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
extents.c docs: Fix some broken references 2018-06-15 18:10:01 -03:00
extents.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
io.c bcache: convert to bioset_init()/mempool_init() 2018-05-30 15:33:32 -06:00
journal.c bcache: free heap cache_set->flush_btree in bch_journal_free 2018-07-27 09:15:46 -06:00
journal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig docs: Fix some broken references 2018-06-15 18:10:01 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
movinggc.c block: move bio_alloc_pages() to bcache 2018-01-06 09:18:00 -07:00
request.c bcache: set max writeback rate when I/O request is idle 2018-08-09 08:21:15 -06:00
request.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stats.c md: Convert timers to use timer_setup() 2017-11-14 20:11:57 -07:00
stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c bcache: set max writeback rate when I/O request is idle 2018-08-09 08:21:15 -06:00
sysfs.c bcache: make the pr_err statement used for ENOENT only in sysfs_attatch section 2018-08-09 08:21:17 -06:00
sysfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
util.c bcache: set max writeback rate when I/O request is idle 2018-08-09 08:21:15 -06:00
util.h bcache: set max writeback rate when I/O request is idle 2018-08-09 08:21:15 -06:00
writeback.c bcache: set max writeback rate when I/O request is idle 2018-08-09 08:21:15 -06:00
writeback.h bcache: simplify the calculation of the total amount of flash dirty data 2018-07-27 09:15:46 -06:00