[PATCH] tests/puzzlefs: add a ktest for PuzzleFS

2024-07-02 Thread Ariel Miculas
From: Ariel Miculas This test builds a PuzzleFS image using the PuzzleFS user space tools, builds a Linux kernel with PuzzleFS enabled, mounts the PuzzleFS image using the kernel driver and then compares the two filesystems: the source filesystem used when building the PuzzleFS image and the

[PATCH v2 2/4] Fix performance regression of update_inode

2024-06-14 Thread Ariel Miculas
This kernel commit: 65bd442397274347e721a89c2c4882a392bae982 removes BTREE_ITER_cached from bch2_btree_insert_trans, which causes the update_inode function to take a long time (~20s). Add this flag back in the update_inode function. Signed-off-by: Ariel Miculas --- c_src/posix_to_bcachefs.c | 2

[PATCH v2 4/4] Preserve directory {a,m,c} times by calling copy_times() after the recursion

2024-06-14 Thread Ariel Miculas
Otherwise the directory {a,m,c} times will be modified by the recursive copy of the directory tree. Signed-off-by: Ariel Miculas --- c_src/posix_to_bcachefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c index c66b9734

[PATCH v2 3/4] Fix incomplete file copy due to copy_data misuse

2024-06-14 Thread Ariel Miculas
The copy_data function takes a start and an end parameter as the range of bytes to copy, but it was called with a start and a length parameter. This resulted in incomplete file copies. Fix it by passing the end of the range instead of the length. Signed-off-by: Ariel Miculas --- c_src

[PATCH v2 1/4] bcachefs: allow initializing a bcachefs filesystem from a source directory

2024-06-14 Thread Ariel Miculas
: Ariel Miculas --- c_src/cmd_format.c| 29 +++ c_src/cmd_migrate.c | 472 +- c_src/libbcachefs.h | 2 + c_src/posix_to_bcachefs.c | 460 + c_src/posix_to_bcachefs.h | 54 + libbcachefs/bkey.h

Re: [PATCH 1/4] bcachefs: allow initializing a bcachefs filesystem from a source directory

2024-06-14 Thread Ariel Miculas
On Thu, Jun 13, 2024 at 9:40 PM Kent Overstreet wrote: > > On Tue, Jun 04, 2024 at 10:43:22AM +0300, Ariel Miculas wrote: > > Add a new source command line argument which specifies the directory > > tree that will be copied onto the newly formatted bcachefs filesystem. > &

[PATCH] tests/bcachefs/single_device: test bcachefs format from source

2024-06-06 Thread Ariel Miculas
- add a function which checks rsync's --itemize-changes output - pass the --hard-links options to rsync when comparing changes - avoid creating hardlinks for symlinks Signed-off-by: Ariel Miculas --- tests/bcachefs/single_device.ktest | 101 +++-- 1 file change

[PATCH 4/4] Preserve directory {a,m,c} times by calling copy_times() after the recursion

2024-06-04 Thread Ariel Miculas
Otherwise the directory {a,m,c} times will be modified by the recursive copy of the directory tree. Signed-off-by: Ariel Miculas --- c_src/posix_to_bcachefs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/posix_to_bcachefs.c b/c_src/posix_to_bcachefs.c index 52105be1

[PATCH 3/4] Fix incomplete file copy due to copy_data misuse

2024-06-04 Thread Ariel Miculas
The copy_data function takes a start and an end parameter as the range of bytes to copy, but it was called with a start and a length parameter. This resulted in incomplete file copies. Fix it by passing the end of the range instead of the length. Signed-off-by: Ariel Miculas --- c_src

[PATCH 1/4] bcachefs: allow initializing a bcachefs filesystem from a source directory

2024-06-04 Thread Ariel Miculas
: Ariel Miculas --- c_src/cmd_format.c| 29 +++ c_src/cmd_migrate.c | 472 +- c_src/libbcachefs.h | 2 + c_src/posix_to_bcachefs.c | 460 + c_src/posix_to_bcachefs.h | 54 + libbcachefs/bkey.h

[PATCH 2/4] Fix performance regression of update_inode

2024-06-04 Thread Ariel Miculas
This kernel commit: 65bd442397274347e721a89c2c4882a392bae982 removes BTREE_ITER_cached from bch2_btree_insert_trans, which causes the update_inode function to take a long time (~20s). Add this flag back in the update_inode function. Signed-off-by: Ariel Miculas --- c_src/posix_to_bcachefs.c | 2

[PATCH] bcachefs: bch2_btree_insert() - add btree iter flags

2024-06-03 Thread Ariel Miculas
insert, so the users can specify iter update trigger flags, such as BTREE_ITER_cached. Signed-off-by: Ariel Miculas --- fs/bcachefs/btree_update.c | 6 -- fs/bcachefs/btree_update.h | 5 +++-- fs/bcachefs/recovery.c | 2 +- fs/bcachefs/subvolume.c| 6 +++--- fs/bcachefs/tests.c

[PATCH v2] bcachefs: bch2_dir_emit() - fix directory reads in the fuse driver

2024-05-30 Thread Ariel Miculas
pos, but in the fuse implementation nobody updates it. Signed-off-by: Ariel Miculas --- V1 -> V2: - added a comment explaining why the update to ctx->pos is necessary fs/bcachefs/dirent.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/bcachefs/dirent.c b/fs/bcache

[PATCH] bcachefs: bch2_dir_emit() - fix directory reads in the fuse driver

2024-05-30 Thread Ariel Miculas
pos, but in the fuse implementation nobody updates it. Signed-off-by: Ariel Miculas --- fs/bcachefs/dirent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c index c67460d8205d..f1d5ee19e5ea 100644 --- a/fs/bcachefs/dirent.c +++ b/fs/bcachefs/dirent.