Skip to contentSkip to conversation

btrfs-progs: use the correct struct for BTRFS_IOC_LOGICAL_INO

PATCH In review Hans van Kranenburg 2 participants 3 messages Jul 3, 2016 – Jul 4, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs-progs: use the correct struct for BTRFS_IOC_LOGICAL_INO

BTRFS_IOC_LOGICAL_INO takes a btrfs_ioctl_logical_ino_args as argument, not a btrfs_ioctl_ino_path_args. The lines were probably copy/pasted when the code was written.

Since btrfs_ioctl_logical_ino_args and btrfs_ioctl_ino_path_args have the same size, the actual IOCTL definition here does not change.

But, it makes the code less confusing for the reader.

---
 ioctl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ioctl.h +1 -1
index 5f18bcb..620dd3d 100644
@@ -685,7 +685,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
 #define BTRFS_IOC_INO_PATHS _IOWR(BTRFS_IOCTL_MAGIC, 35, \
 					struct btrfs_ioctl_ino_path_args)
 #define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \
-					struct btrfs_ioctl_ino_path_args)
+					struct btrfs_ioctl_logical_ino_args)
 #define BTRFS_IOC_SET_RECEIVED_SUBVOL _IOWR(BTRFS_IOCTL_MAGIC, 37, \
 				struct btrfs_ioctl_received_subvol_args)
 #define BTRFS_IOC_SEND _IOW(BTRFS_IOCTL_MAGIC, 38, struct btrfs_ioctl_send_args)
Signature · 1 line
2.8.1
#1 lore raw
Quoted 10 lines · Hans van Kranenburg

BTRFS_IOC_LOGICAL_INO takes a btrfs_ioctl_logical_ino_args as argument, not a btrfs_ioctl_ino_path_args. The lines were probably copy/pasted when the code was written.

Since btrfs_ioctl_logical_ino_args and btrfs_ioctl_ino_path_args have the same size, the actual IOCTL definition here does not change.

But, it makes the code less confusing for the reader.

Applied, thanks. Same fix is needed for kernel, care to send a patch?

#2 lore raw
Quoted 5 lines · David Sterba
Quoted 4 lines · Hans van Kranenburg

BTRFS_IOC_LOGICAL_INO takes a btrfs_ioctl_logical_ino_args as argument, not a btrfs_ioctl_ino_path_args. The lines were probably copy/pasted when the code was written.

Quoted 8 lines
Quoted 6 lines

Since btrfs_ioctl_logical_ino_args and btrfs_ioctl_ino_path_args have the same size, the actual IOCTL definition here does not change.

But, it makes the code less confusing for the reader.

Applied, thanks. Same fix is needed for kernel, care to send a patch?

Apparenly you did that, sorry.