Skip to content

Commit 8a687cf

Browse files
trofikdave
authored andcommitted
kernel-shared: uapi: fix BTRFS_IOC_SCAN_DEV defiintion
Without the change `BTRFS_IOC_SCAN_DEV` aliased with `BTRFS_IOC_FORGET_DEV`. It's a regression introduced in fcd9142 "btrfs-progs: docs: formatting, fixups, updates". It manifests as a sudden device disappearance when device is scanned: machine # [ 4.095032] Btrfs loaded, crc32c=crc32c-intel, zoned=no, fsverity=no machine # ERROR: device scan failed on '/dev/vdb': No such file or directory machine # ERROR: device scan failed on '/dev/vdc': No such file or directory (finished: must succeed: mkfs.btrfs -d raid0 /dev/vdb /dev/vdc, in 10.31 seconds) Issue: #704 Pull-request: #706 Reported-by: Atemu <[email protected]> Bug: NixOS/nixpkgs#265668 Author: Sergei Trofimovich <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent f992584 commit 8a687cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel-shared/uapi/btrfs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ enum btrfs_err_code {
11711171
struct btrfs_ioctl_vol_args)
11721172
#define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \
11731173
struct btrfs_ioctl_vol_args)
1174-
#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 5, \
1174+
#define BTRFS_IOC_SCAN_DEV _IOW(BTRFS_IOCTL_MAGIC, 4, \
11751175
struct btrfs_ioctl_vol_args)
11761176
#define BTRFS_IOC_FORGET_DEV _IOW(BTRFS_IOCTL_MAGIC, 5, \
11771177
struct btrfs_ioctl_vol_args)

0 commit comments

Comments
 (0)