public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/4] btrfs: sysfs, add UUID/devinfo kobject
Date: Tue, 14 Jan 2020 19:32:57 +0100	[thread overview]
Message-ID: <20200114183257.GI3929@twin.jikos.cz> (raw)
In-Reply-To: <20191205112706.8125-3-anand.jain@oracle.com>

On Thu, Dec 05, 2019 at 07:27:04PM +0800, Anand Jain wrote:
> Preparatory patch creates kobject /sys/fs/btrfs/UUID/devinfo to hold
> btrfs_fs_devices::dev_state attribute.
> 
> This is being added in the mount context, that means we don't see
> UUID/devinfo before the mount (yet).
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

There's a report about duplicate directory created:

btrfs/064

[ 1782.480622] sysfs: cannot create duplicate filename '/fs/btrfs/3f26615b-afcd-4008-8aed-44e714be257c/devices/0'                                                                                               │··
[ 1782.486942] CPU: 1 PID: 1983 Comm: btrfs Not tainted 5.5.0-rc5-default+ #932                                                                                                                                 │··
[ 1782.490425] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014                                                                               │··
[ 1782.494584] Call Trace:                                                                                                                                                                                      │··
[ 1782.495588]  dump_stack+0x71/0xa0                                                                                                                                                                            │··
[ 1782.497531]  sysfs_warn_dup.cold+0x17/0x2d                                                                                                                                                                   │··
[ 1782.499626]  sysfs_create_dir_ns+0xb6/0xd0                                                                                                                                                                   │··
[ 1782.501732]  kobject_add_internal+0xbb/0x2d0                                                                                                                                                                 │··
[ 1782.504346]  kobject_init_and_add+0x71/0xa0                                                                                                                                                                  │··
[ 1782.505694]  ? lockdep_init_map+0x43/0x1d0                                                                                                                                                                   │··
[ 1782.506800]  btrfs_sysfs_add_device_link+0xb5/0x100 [btrfs]                                                                                                                                                  │··
[ 1782.508356]  ? rwsem_wake.isra.0+0x6c/0x90                                                                                                                                                                   │··
[ 1782.510070]  btrfs_dev_replace_start+0x2cf/0x380 [btrfs]                                                                                                                                                     │··
[ 1782.511663]  btrfs_dev_replace_by_ioctl+0x35/0x60 [btrfs]                                                                                                                                                    │··
[ 1782.513177]  btrfs_ioctl+0x1d72/0x2560 [btrfs]                                                                                                                                                               │··
[ 1782.514375]  ? do_sigaction+0x5f/0x240                                                                                                                                                                       │··
[ 1782.515867]  ? do_vfs_ioctl+0x56e/0x770                                                                                                                                                                      │··
[ 1782.517276]  do_vfs_ioctl+0x56e/0x770                                                                                                                                                                        │··
[ 1782.518577]  ? do_sigaction+0xf8/0x240                                                                                                                                                                       │··
[ 1782.519898]  ksys_ioctl+0x3a/0x70                                                                                                                                                                            │··
[ 1782.521171]  ? trace_hardirqs_off_thunk+0x1a/0x1c                                                                                                                                                            │··
[ 1782.522783]  __x64_sys_ioctl+0x16/0x20                                                                                                                                                                       │··
[ 1782.524064]  do_syscall_64+0x50/0x210                                                                                                                                                                        │··
[ 1782.525313]  entry_SYSCALL_64_after_hwframe+0x49/0xbe                                                                                                                                                        │··
[ 1782.526818] RIP: 0033:0x7feafcbd5387                                                                                                                                                                         │··
[ 1782.528154] Code: 00 00 90 48 8b 05 f9 9a 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d c9 9a 0c 00 f7 d8 64 89│··
 01 48                                                                                                                                                                                                          │··
[ 1782.533927] RSP: 002b:00007ffcb14eea88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010                                                                                                                           │··
[ 1782.536483] RAX: ffffffffffffffda RBX: 00007ffcb14f11b0 RCX: 00007feafcbd5387                                                                                                                                │··
[ 1782.538983] RDX: 00007ffcb14ef8f0 RSI: 00000000ca289435 RDI: 0000000000000003                                                                                                                                │··
[ 1782.541339] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000                                                                                                                                │··
[ 1782.543809] R10: 0000000000000008 R11: 0000000000000246 R12: 0000000000000003                                                                                                                                │··
[ 1782.545906] R13: 0000000000000001 R14: 0000000000000000 R15: 00005641a71d02e0                                                                                                                                │··
[ 1782.548347] kobject_add_internal failed for 0 with -EEXIST, don't try to register things with the same name in the same directory.

  reply	other threads:[~2020-01-14 18:33 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 11:27 [PATCH 0/4] btrfs, sysfs cleanup and add dev_state Anand Jain
2019-12-05 11:27 ` [PATCH 1/4] btrfs: sysfs, use btrfs_sysfs_remove_fsid in fail return in add_fsid Anand Jain
2019-12-05 11:27 ` [PATCH 2/4] btrfs: sysfs, add UUID/devinfo kobject Anand Jain
2020-01-14 18:32   ` David Sterba [this message]
2020-02-03 10:40     ` Anand Jain
2019-12-05 11:27 ` [PATCH v2 3/4] btrfs: sysfs, rename device_link add,remove functions Anand Jain
2019-12-05 11:27 ` [PATCH 4/4] btrfs: sysfs, add devid/dev_state kobject and attribute Anand Jain
2019-12-05 14:10   ` David Sterba
2019-12-05 14:38     ` Anand Jain
2019-12-05 14:21   ` David Sterba
2019-12-05 14:38     ` Anand Jain
2019-12-05 15:14       ` David Sterba
2019-12-06 13:49         ` Anand Jain
2019-12-09 14:05           ` Anand Jain
2019-12-09 18:31             ` David Sterba
2019-12-13 16:43             ` David Sterba
2019-12-13 17:02               ` David Sterba
2019-12-14  0:26                 ` Anand Jain
2020-01-06 16:00                   ` David Sterba
2019-12-09 14:06   ` [PATCH v2 " Anand Jain
2019-12-19 10:41     ` [PATCH v3 " Anand Jain
2020-01-06 11:38   ` [PATCH v4] " Anand Jain
2020-01-09 15:20     ` [PATCH v4 4/4] " David Sterba
2020-01-10  1:03       ` Anand Jain
2019-12-05 15:00 ` [PATCH 0/4] btrfs, sysfs cleanup and add dev_state David Sterba
2019-12-06 13:46   ` Anand Jain
2019-12-09 14:09     ` Anand Jain
2019-12-09 22:48 ` Anand Jain
2019-12-10 16:41   ` David Sterba
2020-01-14 18:39 ` David Sterba
2020-01-15  8:22   ` [PATCH] btrfs: update devid after replace Anand Jain
2020-01-15 16:17     ` David Sterba
2020-01-20 19:10     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200114183257.GI3929@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox