Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can mount only one filesystem at a time on kernel 4.12.0-rc1 #6147

Closed
arachnist opened this issue May 20, 2017 · 2 comments · Fixed by #6148
Closed

Can mount only one filesystem at a time on kernel 4.12.0-rc1 #6147

arachnist opened this issue May 20, 2017 · 2 comments · Fixed by #6148

Comments

@arachnist
Copy link

System information

Type Version/Name
Distribution Name Gentoo
Distribution Version
Linux Kernel 4.12.0-rc1
Architecture amd64
ZFS Version 0.7.0-rc4_20_gf871ab6e
SPL Version 0.7.0-rc4_1_g8f87971

Describe the problem you're observing

Only one zfs filesystem can be mounted at the same time, even with multiple pools.

Describe how to reproduce the problem

Build a 4.12.0-rc1 kernel and try to mount more than one filesystem.

monolith ~ # zpool list
NAME       SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
testpool   992M   152K   992M         -     0%     0%  1.00x  ONLINE  -
monolith ~ # zpool status
  pool: testpool
 state: ONLINE
  scan: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	testpool    ONLINE       0     0     0
	  loop0     ONLINE       0     0     0

errors: No known data errors
monolith ~ # zfs list
NAME         USED  AVAIL  REFER  MOUNTPOINT
testpool     129K   864M    23K  /testpool
testpool/a    23K   864M    23K  /testpool/a
testpool/b    23K   864M    23K  /testpool/b
monolith ~ # zfs mount testpool/a
monolith ~ # zfs mount testpool/b
filesystem 'testpool/b' can not be mounted due to error 17
cannot mount 'testpool/b': Invalid argument

Include any warning/errors/backtraces from the system logs

[ 1069.907662] sysfs: cannot create duplicate filename '/devices/virtual/bdi/zfs'
[ 1069.907666] ------------[ cut here ]------------
[ 1069.907670] WARNING: CPU: 1 PID: 3334 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x56/0x70
[ 1069.907670] Modules linked in: loop rfcomm bnep zfs(PO) zunicode(PO) zavl(PO) icp(PO) amdkfd amd_iommu_v2 snd_hda_codec_realtek snd_hda_codec_generic amdgpu snd_hda_codec_hdmi snd_hda_intel zcommon(PO) btusb mfd_core btrtl snd_hda_codec ttm znvpair(PO) btbcm btintel fuse snd_hwdep spl(O) edac_mce_amd drm_kms_helper bluetooth snd_hda_core syscopyarea kvm_amd sysfillrect snd_pcm sysimgblt mxm_wmi ecdh_generic fb_sys_fops igb kvm drm snd_timer ptp snd joydev irqbypass pps_core mousedev evdev soundcore alx i2c_algo_bit input_leds dca i2c_piix4 mdio acpi_cpufreq tpm_infineon i2c_designware_platform 8250_dw wmi tpm_tis i2c_designware_core tpm_tis_core button tpm sch_fq_codel it87(O) hwmon_vid ext4 crc16 jbd2 fscrypto mbcache sd_mod hid_lenovo led_class hid_generic usbhid hid crct10dif_pclmul crc32_pclmul
[ 1069.907694]  crc32c_intel ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd glue_helper cryptd xhci_pci ahci xhci_hcd libahci libata ccp usbcore rng_core scsi_mod usb_common serio dm_mirror dm_region_hash dm_log dm_mod dax
[ 1069.907702] CPU: 1 PID: 3334 Comm: mount.zfs Tainted: P        W  O    4.12.0-rc1 #2
[ 1069.907702] Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming K7/AX370-Gaming K7, BIOS F4a 05/08/2017
[ 1069.907703] task: ffff88040b6a9b80 task.stack: ffffc9000ddbc000
[ 1069.907704] RIP: 0010:sysfs_warn_dup+0x56/0x70
[ 1069.907705] RSP: 0018:ffffc9000ddbfab0 EFLAGS: 00010282
[ 1069.907706] RAX: 0000000000000042 RBX: ffff8804081a7000 RCX: 0000000000000000
[ 1069.907706] RDX: 0000000000000000 RSI: ffff88041ec4db88 RDI: ffff88041ec4db88
[ 1069.907706] RBP: ffffc9000ddbfac8 R08: 0000000000000773 R09: 0000000000000004
[ 1069.907707] R10: 0000000000000000 R11: 0000000000000001 R12: ffff88040c5b06a0
[ 1069.907707] R13: ffff88040c0b1e10 R14: ffff8803f9d65000 R15: 0000000000000000
[ 1069.907708] FS:  00007fb35166a780(0000) GS:ffff88041ec40000(0000) knlGS:0000000000000000
[ 1069.907708] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1069.907709] CR2: 00007fb34fc2bb6e CR3: 0000000387778000 CR4: 00000000003406e0
[ 1069.907709] Call Trace:
[ 1069.907712]  sysfs_create_dir_ns+0x77/0x90
[ 1069.907714]  kobject_add_internal+0xaa/0x2b0
[ 1069.907715]  kobject_add+0x71/0xd0
[ 1069.907716]  ? refcount_inc+0x9/0x30
[ 1069.907718]  device_add+0x107/0x620
[ 1069.907719]  device_create_groups_vargs+0xe4/0xf0
[ 1069.907720]  device_create_vargs+0x16/0x20
[ 1069.907722]  bdi_register_va.part.1+0x28/0x180
[ 1069.907723]  bdi_register_va+0x1b/0x20
[ 1069.907724]  super_setup_bdi_name+0x87/0xe0
[ 1069.907736]  ? dmu_objset_rele+0x42/0x60 [zfs]
[ 1069.907748]  ? dsl_prop_get+0x7b/0xb0 [zfs]
[ 1069.907750]  ? spl_kmem_free+0x2a/0x40 [spl]
[ 1069.907760]  zfs_domount+0x110/0x370 [zfs]
[ 1069.907769]  ? zpl_mount+0x50/0x50 [zfs]
[ 1069.907779]  ? zpl_mount+0x50/0x50 [zfs]
[ 1069.907788]  zpl_fill_super+0x2c/0x40 [zfs]
[ 1069.907789]  mount_nodev+0x4d/0xa0
[ 1069.907798]  zpl_mount+0x34/0x50 [zfs]
[ 1069.907799]  mount_fs+0x32/0x150
[ 1069.907801]  vfs_kern_mount.part.7+0x5d/0x110
[ 1069.907802]  do_mount+0x528/0xc50
[ 1069.907803]  ? __check_object_size+0x12c/0x1a2
[ 1069.907804]  SyS_mount+0x5a/0xe0
[ 1069.907806]  entry_SYSCALL_64_fastpath+0x1a/0xa5
[ 1069.907807] RIP: 0033:0x7fb35094e4ca
[ 1069.907807] RSP: 002b:00007fff25cbe1d8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
[ 1069.907808] RAX: ffffffffffffffda RBX: 00000000017d0060 RCX: 00007fb35094e4ca
[ 1069.907808] RDX: 00000000004023e6 RSI: 00007fff25cc22f0 RDI: 00007fff25cc444c
[ 1069.907809] RBP: 00000000017d1180 R08: 00007fff25cbf2f0 R09: 00007fb3509913a0
[ 1069.907809] R10: 0000000001000000 R11: 0000000000000206 R12: 00007fff25cbf2f0
[ 1069.907809] R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000
[ 1069.907810] Code: 85 c0 48 89 c3 74 12 b9 00 10 00 00 48 89 c2 31 f6 4c 89 ef e8 9c c9 ff ff 4c 89 e2 48 89 de 48 c7 c7 80 14 94 81 e8 d9 67 ef ff <0f> ff 48 89 df e8 40 c2 f5 ff 5b 41 5c 41 5d 5d c3 66 0f 1f 84 
[ 1069.907823] ---[ end trace 58c8ea15857b8a77 ]---
[ 1069.907824] kobject_add_internal failed for zfs with -EEXIST, don't try to register things with the same name in the same directory.
[ 1069.907826] ------------[ cut here ]------------
[ 1069.907827] WARNING: CPU: 1 PID: 3334 at lib/kobject.c:240 kobject_add_internal+0x269/0x2b0
[ 1069.907828] Modules linked in: loop rfcomm bnep zfs(PO) zunicode(PO) zavl(PO) icp(PO) amdkfd amd_iommu_v2 snd_hda_codec_realtek snd_hda_codec_generic amdgpu snd_hda_codec_hdmi snd_hda_intel zcommon(PO) btusb mfd_core btrtl snd_hda_codec ttm znvpair(PO) btbcm btintel fuse snd_hwdep spl(O) edac_mce_amd drm_kms_helper bluetooth snd_hda_core syscopyarea kvm_amd sysfillrect snd_pcm sysimgblt mxm_wmi ecdh_generic fb_sys_fops igb kvm drm snd_timer ptp snd joydev irqbypass pps_core mousedev evdev soundcore alx i2c_algo_bit input_leds dca i2c_piix4 mdio acpi_cpufreq tpm_infineon i2c_designware_platform 8250_dw wmi tpm_tis i2c_designware_core tpm_tis_core button tpm sch_fq_codel it87(O) hwmon_vid ext4 crc16 jbd2 fscrypto mbcache sd_mod hid_lenovo led_class hid_generic usbhid hid crct10dif_pclmul crc32_pclmul
[ 1069.907841]  crc32c_intel ghash_clmulni_intel pcbc aesni_intel aes_x86_64 crypto_simd glue_helper cryptd xhci_pci ahci xhci_hcd libahci libata ccp usbcore rng_core scsi_mod usb_common serio dm_mirror dm_region_hash dm_log dm_mod dax
[ 1069.907846] CPU: 1 PID: 3334 Comm: mount.zfs Tainted: P        W  O    4.12.0-rc1 #2
[ 1069.907846] Hardware name: Gigabyte Technology Co., Ltd. AX370-Gaming K7/AX370-Gaming K7, BIOS F4a 05/08/2017
[ 1069.907847] task: ffff88040b6a9b80 task.stack: ffffc9000ddbc000
[ 1069.907847] RIP: 0010:kobject_add_internal+0x269/0x2b0
[ 1069.907848] RSP: 0018:ffffc9000ddbfb00 EFLAGS: 00010286
[ 1069.907848] RAX: 0000000000000078 RBX: ffff8803f9d65010 RCX: 0000000000000006
[ 1069.907849] RDX: 0000000000000000 RSI: 0000000000000086 RDI: ffff88041ec4db80
[ 1069.907849] RBP: ffffc9000ddbfb30 R08: 00000000000007a8 R09: 0000000000000004
[ 1069.907849] R10: ffffea0010206800 R11: 0000000000000001 R12: ffff88041e905960
[ 1069.907850] R13: 00000000ffffffef R14: ffff8803f9d65000 R15: 0000000000000000
[ 1069.907850] FS:  00007fb35166a780(0000) GS:ffff88041ec40000(0000) knlGS:0000000000000000
[ 1069.907851] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1069.907851] CR2: 00007fb34fc2bb6e CR3: 0000000387778000 CR4: 00000000003406e0
[ 1069.907851] Call Trace:
[ 1069.907852]  kobject_add+0x71/0xd0
[ 1069.907853]  ? refcount_inc+0x9/0x30
[ 1069.907854]  device_add+0x107/0x620
[ 1069.907855]  device_create_groups_vargs+0xe4/0xf0
[ 1069.907856]  device_create_vargs+0x16/0x20
[ 1069.907857]  bdi_register_va.part.1+0x28/0x180
[ 1069.907858]  bdi_register_va+0x1b/0x20
[ 1069.907858]  super_setup_bdi_name+0x87/0xe0
[ 1069.907868]  ? dmu_objset_rele+0x42/0x60 [zfs]
[ 1069.907880]  ? dsl_prop_get+0x7b/0xb0 [zfs]
[ 1069.907882]  ? spl_kmem_free+0x2a/0x40 [spl]
[ 1069.907892]  zfs_domount+0x110/0x370 [zfs]
[ 1069.907901]  ? zpl_mount+0x50/0x50 [zfs]
[ 1069.907910]  ? zpl_mount+0x50/0x50 [zfs]
[ 1069.907920]  zpl_fill_super+0x2c/0x40 [zfs]
[ 1069.907920]  mount_nodev+0x4d/0xa0
[ 1069.907930]  zpl_mount+0x34/0x50 [zfs]
[ 1069.907931]  mount_fs+0x32/0x150
[ 1069.907932]  vfs_kern_mount.part.7+0x5d/0x110
[ 1069.907933]  do_mount+0x528/0xc50
[ 1069.907933]  ? __check_object_size+0x12c/0x1a2
[ 1069.907935]  SyS_mount+0x5a/0xe0
[ 1069.907936]  entry_SYSCALL_64_fastpath+0x1a/0xa5
[ 1069.907936] RIP: 0033:0x7fb35094e4ca
[ 1069.907937] RSP: 002b:00007fff25cbe1d8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
[ 1069.907937] RAX: ffffffffffffffda RBX: 00000000017d0060 RCX: 00007fb35094e4ca
[ 1069.907937] RDX: 00000000004023e6 RSI: 00007fff25cc22f0 RDI: 00007fff25cc444c
[ 1069.907938] RBP: 00000000017d1180 R08: 00007fff25cbf2f0 R09: 00007fb3509913a0
[ 1069.907938] R10: 0000000001000000 R11: 0000000000000206 R12: 00007fff25cbf2f0
[ 1069.907938] R13: 0000000000000005 R14: 0000000000000000 R15: 0000000000000000
[ 1069.907939] Code: 49 89 c4 48 85 ff 0f 84 44 fe ff ff 48 83 c7 18 e9 01 fe ff ff 48 8b 13 48 c7 c6 70 7c 84 81 48 c7 c7 f8 81 94 81 e8 86 45 e7 ff <0f> ff e9 92 fe ff ff 0f ff eb a5 0f ff eb 98 41 bd fe ff ff ff 
[ 1069.907952] ---[ end trace 58c8ea15857b8a78 ]---

@arachnist
Copy link
Author

@arachnist
Copy link
Author

Just tested #6148 and it fixed the issue for me.

behlendorf pushed a commit that referenced this issue May 25, 2017
Provide a format parameter to super_setup_bdi_name() so we don't
create duplicate names in '/devices/virtual/bdi' sysfs namespace which
would prevent us from mounting more than one ZFS filesystem at a time.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6147
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Jun 5, 2017
Provide a format parameter to super_setup_bdi_name() so we don't
create duplicate names in '/devices/virtual/bdi' sysfs namespace which
would prevent us from mounting more than one ZFS filesystem at a time.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes openzfs#6147
tonyhutter pushed a commit that referenced this issue Jun 9, 2017
Provide a format parameter to super_setup_bdi_name() so we don't
create duplicate names in '/devices/virtual/bdi' sysfs namespace which
would prevent us from mounting more than one ZFS filesystem at a time.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant