From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org, dsterba@suse.com
Subject: [PATCH 0/2] provide fsid in sysfs devinfo
Date: Tue, 19 Oct 2021 08:22:08 +0800 [thread overview]
Message-ID: <cover.1634598572.git.anand.jain@oracle.com> (raw)
btrfs-progs tries to read the fsid from the super-block for a missing
device and, it fails. It needs to find out if the device is a seed
device. It does it by comparing the device's fsid with the fsid of the
mounted filesystem. To help this scenario introduce a new sysfs file to
read the fsid from the kernel.
/sys/fs/btrfs/<fsid>/devinfo/<devid>/fsid
Patch 1 is a cleanup converts scnprtin()f and snprintf() to sysfs_emit()
Patch 2 introduces the new sysfs interface as above
The other implementation choice is to add another parameter to the
struct btrfs_ioctl_dev_info_args and use BTRFS_IOC_DEV_INFO ioctl. But
then backward kernel compatibility with the newer btrfs-progs is more
complicated. If needed, we can add that too.
Related btrfs-progs patches:
btrfs-progs: prepare helper device_is_seed
btrfs-progs: read fsid from the sysfs in device_is_seed
Anand Jain (2):
btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit
btrfs: sysfs add devinfo/fsid to retrieve fsid from the device
fs/btrfs/sysfs.c | 113 +++++++++++++++++++++++++----------------------
1 file changed, 60 insertions(+), 53 deletions(-)
--
2.31.1
next reply other threads:[~2021-10-19 0:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 0:22 Anand Jain [this message]
2021-10-19 0:22 ` [PATCH 1/2] btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit Anand Jain
2021-10-21 13:35 ` [btrfs] 0f80799866: WARNING:at_fs/sysfs/file.c:#sysfs_emit kernel test robot
2021-10-21 15:30 ` Anand Jain
2021-10-21 16:06 ` David Sterba
2021-10-21 16:18 ` Anand Jain
2021-10-21 16:00 ` [PATCH 1/2] btrfs: sysfs convert scnprintf and snprintf to use sysfs_emit David Sterba
2021-10-21 16:15 ` Anand Jain
2021-10-19 0:22 ` [PATCH 2/2] btrfs: sysfs add devinfo/fsid to retrieve fsid from the device Anand Jain
2021-10-20 18:59 ` David Sterba
2021-10-21 4:03 ` Anand Jain
2021-10-21 8:55 ` Anand Jain
2021-10-19 13:57 ` [PATCH 0/2] provide fsid in sysfs devinfo Josef Bacik
2021-10-20 2:26 ` Anand Jain
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=cover.1634598572.git.anand.jain@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.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