#include "xlat/btrfs_features_compat_ro.h"
#include "xlat/btrfs_features_incompat.h"
#include "xlat/btrfs_key_types.h"
+#include "xlat/btrfs_logical_ino_args_flags.h"
#include "xlat/btrfs_qgroup_ctl_cmds.h"
#include "xlat/btrfs_qgroup_inherit_flags.h"
#include "xlat/btrfs_qgroup_limit_flags.h"
if (entering(tcp)) {
tprintf("logical=%" PRI__u64 ", size=%" PRI__u64,
args.logical, args.size);
+
+ tprintf(", flags=");
+ printflags64(btrfs_logical_ino_args_flags,
+#ifdef HAVE_STRUCT_BTRFS_IOCTL_LOGICAL_INO_ARGS_FLAGS
+ args.flags
+#else
+ args.reserved[3]
+#endif
+ , "BTRFS_LOGICAL_INO_ARGS_???");
tprints(", inodes=");
printaddr64(args.inodes);
tprints("}");
struct btrfs_ioctl_feature_flags.compat_flags,
struct btrfs_ioctl_fs_info_args.nodesize,
struct btrfs_ioctl_defrag_range_args.start,
- struct btrfs_ioctl_search_args_v2.buf_size
+ struct btrfs_ioctl_search_args_v2.buf_size,
+ struct btrfs_ioctl_logical_ino_args.flags
]),,, [ #include <stdio.h>
#include <linux/btrfs.h>])
AC_CHECK_DECLS(m4_normalize([BTRFS_COMPRESS_NONE, BTRFS_COMPRESS_ZLIB,
.fspath = 0,
};
+#ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
+ args.flags =
+#else
+ args.reserved[3] =
+#endif
+ 0xdeadc0defacefeeeULL;
+
+
ioctl(-1, BTRFS_IOC_INO_PATHS, NULL);
printf("ioctl(-1, BTRFS_IOC_INO_PATHS, NULL) = -1 EBADF (%m)\n");
args.fspath = 0;
ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args);
printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64
- ", size=%" PRI__u64", inodes=NULL}) = -1 EBADF (%m)\n",
+ ", size=%" PRI__u64
+ ", flags=0xdeadc0defacefeee /* BTRFS_LOGICAL_INO_ARGS_??? */"
+ ", inodes=NULL}) = -1 EBADF (%m)\n",
args.inum, args.size);
args.fspath = (uintptr_t) buf;
+#ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
+ args.flags =
+#else
+ args.reserved[3] =
+#endif
+ 1;
+
+ ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args);
+ printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64
+ ", size=%" PRI__u64
+ ", flags=BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET"
+ ", inodes=0x%" PRI__x64 "}) = -1 EBADF (%m)\n",
+ args.inum, args.size, args.fspath);
+
+#ifdef HAVE_BTRFS_IOCTL_LOGICAL_INO_ARGS
+ args.flags =
+#else
+ args.reserved[3] =
+#endif
+ 0;
+
ioctl(-1, BTRFS_IOC_LOGICAL_INO, &args);
printf("ioctl(-1, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64
- ", size=%" PRI__u64", inodes=0x%" PRI__x64
+ ", size=%" PRI__u64", flags=0, inodes=0x%" PRI__x64
"}) = -1 EBADF (%m)\n", args.inum, args.size, args.fspath);
#ifdef HAVE_LINUX_FIEMAP_H
args.inum = fiemap->fm_extents[0].fe_physical;
printf("ioctl(%d, BTRFS_IOC_LOGICAL_INO, {logical=%" PRI__u64
- ", size=%" PRI__u64", inodes=0x%" PRI__x64"}",
+ ", size=%" PRI__u64", flags=0, inodes=0x%" PRI__x64"}",
fd, args.inum, args.size, args.fspath);
ioctl(fd, BTRFS_IOC_LOGICAL_INO, &args);
printf(" => {inodes={bytes_left=%u, bytes_missing=%u, elem_cnt=%u, elem_missed=%u, val=",