Bug 1074492 - Can't reattach bcache cacheset more than once
Summary: Can't reattach bcache cacheset more than once
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-10 11:25 UTC by Sitsofe Wheeler
Modified: 2014-06-18 14:32 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-18 14:32:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sitsofe Wheeler 2014-03-10 11:25:26 UTC
Description of problem:
A bcache cacheset can't be reattached to a backing device more than once.

Version-Release number of selected component (if applicable):
kernel-3.13.6-200.fc20.x86_64

How reproducible:
Reproducible every time.

Steps to Reproduce:
1. Set up bcache (e.g.
make-bcache -B /dev/sdd
make-bcache -C /dev/sdf
ls -l /sys/fs/bcache
# Notice the uuid
echo <CACHESETUUID> > /sys/block/bcache0/bcache/attach
2. Run the following
bcachedev=bcache0
cacheset=$(basename $(realpath /sys/block/$bcachedev/bcache/cache/))
echo 1 > /sys/block/$bcachedev/bcache/detach
echo $cacheset > /sys/block/$bcachedev/bcache/attach
echo 1 > /sys/block/$bcachedev/bcache/detach
echo $cacheset > /sys/block/$bcachedev/bcache/attach

Actual results:
The following is reported in dmesg:
[   62.285074] bcache: cached_dev_detach_finish() Caching disabled for sdd
[   64.764636] ------------[ cut here ]------------
[   64.764684] WARNING: CPU: 1 PID: 839 at fs/sysfs/dir.c:486 sysfs_warn_dup+0x86/0xa0()
[   64.764739] sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/device:00/PNP0A03:00/device:08/VMBUS:00/vmbus_0_5/host3/target3:0:0/3:0:0:4/block/sdd/bcache/cache'
[   64.764845] Modules linked in: target_core_pscsi target_core_file target_core_iblock iscsi_target_mod target_core_mod iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel microcode serio_raw snd_pcsp snd_pcm snd_page_alloc snd_timer snd hv_netvsc soundcore hv_utils i2c_piix4 hyperv_keyboard i2c_core hyperv_fb bcache hv_storvsc hid_hyperv crc32c_intel ata_generic hv_vmbus pata_acpi dm_multipath
[   64.765175] CPU: 1 PID: 839 Comm: bash Not tainted 3.13.6-200.fc20.x86_64 #1
[   64.765225] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  05/23/2012
[   64.765292]  0000000000000009 ffff8800f2e19c58 ffffffff8168730c ffff8800f2e19ca0
[   64.765349]  ffff8800f2e19c90 ffffffff8106d47d ffff8800f32c1000 ffff8800f32c1000
[   64.765405]  ffff88007f6d61c0 0000000000000001 0000000000000000 ffff8800f2e19cf0
[   64.765461] Call Trace:
[   64.765487]  [<ffffffff8168730c>] dump_stack+0x45/0x56
[   64.765566]  [<ffffffff8106d47d>] warn_slowpath_common+0x7d/0xa0
[   64.765614]  [<ffffffff8106d4ec>] warn_slowpath_fmt+0x4c/0x50
[   64.765657]  [<ffffffff812307d6>] sysfs_warn_dup+0x86/0xa0
[   64.765698]  [<ffffffff81230830>] sysfs_add_one+0x40/0x50
[   64.765739]  [<ffffffff812313a1>] sysfs_do_create_link_sd.isra.2+0xc1/0x1f0
[   64.765792]  [<ffffffff812314f5>] sysfs_create_link+0x25/0x50
[   64.765847]  [<ffffffffa0060f2e>] bcache_device_link+0x9e/0xf0 [bcache]
[   64.765904]  [<ffffffffa0062832>] bch_cached_dev_attach+0x212/0x450 [bcache]
[   64.765964]  [<ffffffffa00683cb>] bch_cached_dev_store+0x6db/0x770 [bcache]
[   64.766015]  [<ffffffff8122f290>] ? sysfs_write_file+0x60/0x1c0
[   64.766059]  [<ffffffff8122f358>] sysfs_write_file+0x128/0x1c0
[   64.766104]  [<ffffffff811b8b34>] vfs_write+0xb4/0x1f0
[   64.766144]  [<ffffffff811b9569>] SyS_write+0x49/0xa0
[   64.766184]  [<ffffffff816962e9>] system_call_fastpath+0x16/0x1b
[   64.766228] ---[ end trace a50797e6db46d168 ]---
[   64.766263] ------------[ cut here ]------------
[   64.766306] WARNING: CPU: 1 PID: 839 at drivers/md/bcache/super.c:689 bcache_device_link+0xbc/0xf0 [bcache]()
[   64.768089] Couldn't create device <-> cache set symlinks
[   64.768129] Modules linked in:
[   64.769803]  target_core_pscsi target_core_file target_core_iblock iscsi_target_mod target_core_mod iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel microcode serio_raw snd_pcsp snd_pcm snd_page_alloc snd_timer snd hv_netvsc soundcore hv_utils i2c_piix4 hyperv_keyboard i2c_core hyperv_fb bcache hv_storvsc hid_hyperv crc32c_intel ata_generic hv_vmbus pata_acpi dm_multipath
[   64.778289] CPU: 1 PID: 839 Comm: bash Tainted: G        W    3.13.6-200.fc20.x86_64 #1
[   64.779984] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  05/23/2012
[   64.783337]  0000000000000009 ffff8800f2e19d00 ffffffff8168730c ffff8800f2e19d48
[   64.785015]  ffff8800f2e19d38 ffffffff8106d47d ffff8800f1f7008c ffff8800f1f70040
[   64.786669]  ffff88007ef00040 ffffffffa006ec98 ffff88007ef00cd0 ffff8800f2e19d98
[   64.788342] Call Trace:
[   64.789925]  [<ffffffff8168730c>] dump_stack+0x45/0x56
[   64.791488]  [<ffffffff8106d47d>] warn_slowpath_common+0x7d/0xa0
[   64.793041]  [<ffffffff8106d4ec>] warn_slowpath_fmt+0x4c/0x50
[   64.794584]  [<ffffffffa0060f4c>] bcache_device_link+0xbc/0xf0 [bcache]
[   64.796113]  [<ffffffffa0062832>] bch_cached_dev_attach+0x212/0x450 [bcache]
[   64.797677]  [<ffffffffa00683cb>] bch_cached_dev_store+0x6db/0x770 [bcache]
[   64.799199]  [<ffffffff8122f290>] ? sysfs_write_file+0x60/0x1c0
[   64.800691]  [<ffffffff8122f358>] sysfs_write_file+0x128/0x1c0
[   64.802171]  [<ffffffff811b8b34>] vfs_write+0xb4/0x1f0
[   64.803624]  [<ffffffff811b9569>] SyS_write+0x49/0xa0
[   64.805067]  [<ffffffff816962e9>] system_call_fastpath+0x16/0x1b
[   64.806522] ---[ end trace a50797e6db46d169 ]---
[   64.807980] bcache: bch_cached_dev_attach() Caching sdd as bcache0 on set ceac88d3-d7ba-421e-9060-866b47093c1a

Expected results:
No warning/error messages about sysfs nodes that can't be created.

Additional info:
I have a feeling that because the sysfs nodes aren't created properly the information returned by tools like bcache-status is stale.

Comment 1 Reartes Guillermo 2014-03-30 20:36:58 UTC
This bug seems to be a dup of bug 1068713

Comment 2 Reartes Guillermo 2014-04-10 12:56:33 UTC
It does still happen with kernel: 3.13.9-200.fc20.x86_64

Comment 3 Justin M. Forbes 2014-05-21 19:40:48 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 20 kernel bugs.

Fedora 20 has now been rebased to 3.14.4-200.fc20.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.

Comment 4 Josh Boyer 2014-06-18 14:32:10 UTC
This bug is being closed with INSUFFICIENT_DATA as there has not been a response in 2 weeks. If you are still experiencing this issue, please reopen and attach the relevant data from the latest kernel you are running and any data that might have been requested previously.


Note You need to log in before you can comment on or make changes to this bug.