[PATCH] Add btrfs ioctl support.

2016-05-04 Thread jeffm
From: Jeff Mahoney * btrfs.c: New file. * file_ioctl.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h [LINUX] (btrfs_ioctl): New function. * ioctls.c (ioctl_decode) [LINUX]: Use it to decode BTRFS_* ioctls. * configure.ac: Add check for struct btrfs_ioctl_feature_flags. Add check f

[PATCH 3/4] test: add testing for FS_IOC_FIEMAP

2016-05-18 Thread jeffm
From: Jeff Mahoney * tests/file_ioctl.c: New file. * tests/file_ioctl.test: New file. * tests/Makefile.am: Add it. This is limited to FIEMAP. FICLONE* and FIDEDUPERANGE originated in btrfs and will be tested there. --- tests/Makefile.am | 2 ++ tests/file_ioctl.c| 32 +

[PATCH 2/4] ioctl: add decoding for FS_IOC_FIEMAP

2016-05-18 Thread jeffm
From: Jeff Mahoney * file_ioctl.c: Add it. * ioctl.c: Add special handling for 'f' code ioctls. --- file_ioctl.c | 68 ioctl.c | 11 +- 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/file_ioctl.c b/file_ioc

[PATCH 0/4 v5] Add btrfs ioctl support

2016-05-18 Thread jeffm
From: Jeff Mahoney Hi all - This patch adds support for the btrfs ioctls and some generic file ioctls. Thanks, Dmitry, for the review. Changes since v4: - Added test cases, including verbose and writeable cases - Added support for FS_IOC_FIEMAP, since it was required to test BTRFS_IOC_LOGICA

[PATCH 1/4] ioctl: add decoding support for btrfs ioctls

2016-05-18 Thread jeffm
From: Jeff Mahoney * btrfs.c: New file. * file_ioctl.c: New file. * Makefile.am (strace_SOURCES): Add it. * ioctls.c (ioctl_decode) [LINUX]: Use it to decode new ioctls. * configure.ac: Add check for struct btrfs_ioctl_feature_flags. Add check for struct btrfs_ioctl_fs_info_args.nodesize. Add

[PATCH 4/4] tests: add testing for btrfs ioctls

2016-05-18 Thread jeffm
From: Jeff Mahoney * tests/btrfs.c: New file. * tests/btrfs.test: New file. * tests/btrfs-v.test: New file. * tests/Makefile.am: Add it. --- tests/Makefile.am |3 + tests/btrfs-v.test | 15 + tests/btrfs.c | 1848 tests/btrfs.test

[PATCH 4/5] tests: check decoding of btrfs RDWR ioctls returned data

2016-05-26 Thread jeffm
From: Jeff Mahoney * tests/btrfs-vw.test: New file. * tests/btrfs-w.test: New file. * tests/Makefile.am (DECODER_TESTS): Add btrfs-w.test and btrfs-vw.test. --- tests/Makefile.am | 2 ++ tests/btrfs-vw.test | 29 + tests/btrfs-w.test | 29 +

[PATCH 1/5] btrfs.c: fix print_array usage in btrfs_print_logical_ino_container

2016-05-26 Thread jeffm
From: Jeff Mahoney * btrfs.c: (btrfs_print_logical_ino_container) Fix the element count to reflect the number of records rather than the number of items. --- btrfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs.c b/btrfs.c index c1c9592..af0645c 100644 --- a/btrfs.c

[PATCH 2/5] btrfs.c: don't use print_array in btrfs_print_tree_search

2016-05-26 Thread jeffm
From: Jeff Mahoney * btrfs.c (btrfs_print_tree_search): don't use print_array. The buffer represents a series of variable sized records, not an array. --- btrfs.c | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/btrfs.c b/btrfs.c

[PATCH 0/5] btrfs decoding fixes

2016-05-26 Thread jeffm
From: Jeff Mahoney After submitting the last patch, I hunted down the last of the test case failures. These are all failures in the output side of a RW ioctl and those test cases weren't easily runnable. They are now, provided a btrfs file system is made available to them via a BTRFS_MOUNTPOINT

[PATCH 5/5] file_ioctl.c: fix FIDEDUPERANGE output

2016-05-26 Thread jeffm
From: Jeff Mahoney * file_ioctl.c (file_ioctl): initialize rc to true in FIDEDUPERANGE. Otherwise we'll never show the output data in abbrev mode. --- file_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file_ioctl.c b/file_ioctl.c index b065db9..26b1d9f 100644 ---

[PATCH 3/5] tests/btrfs.c: fix live btrfs_test_search_ioctls output

2016-05-26 Thread jeffm
From: Jeff Mahoney * tests/btrfs.c (btrfs_test_search_ioctls): use print_tree_search_buf for BTRFS_IOC_TREE_SEARCH and fix missing whitespace --- tests/btrfs.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/btrfs.c b/tests/btrfs.c index d2b1637..f1dee55 100644