summaryrefslogtreecommitdiff
path: root/c_src/posix_to_bcachefs.c
AgeCommit message (Collapse)Author
2024-06-16Preserve directory {a,m,c} times by calling copy_times() after the recursionAriel Miculas
Otherwise the directory {a,m,c} times will be modified by the recursive copy of the directory tree. Signed-off-by: Ariel Miculas <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-16Fix incomplete file copy due to copy_data misuseAriel 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 <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-16Fix performance regression of update_inodeAriel 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 <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-16bcachefs: allow initializing a bcachefs filesystem from a source directoryAriel Miculas
Add a new source command line argument which specifies the directory tree that will be copied onto the newly formatted bcachefs filesystem. This commit also fixes an issue in copy_link where uninitialized data is copied into the symlink because of a round_up of the buffer size. Signed-off-by: Ariel Miculas <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>