btrfs-convert: permit support for non-ext2 FSs
Subsystems (2)
PATCH 3/4 btrfs-convert: permit support for non-ext2 FSs
Filesystems need to provide a function open_blah that fills a struct convert_fs with some information and three function pointers. The function pointers are:
- cache_free_extents, which takes a struct extent_io_tree and marks all extents not being used by the filesystem as DIRTY
- copy_inodes, which copies the contents of the filesystem into a btrfs_root using CoW.
- close
There's a void* in struct convert_fs for private use by the filesystem.
libblkid is used to determine the filesystem.
--- Makefile | 2 +- convert.c | 184 +++++++++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 126 insertions(+), 60 deletions(-)
Makefile +1 -1
@@ -75,7 +75,7 @@ quick-test: $(objects) quick-test.o gcc $(CFLAGS) -o quick-test $(objects) quick-test.o $(LDFLAGS) $(LIBS) convert: $(objects) convert.o - gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs $(LDFLAGS) $(LIBS) + gcc $(CFLAGS) -o btrfs-convert $(objects) convert.o -lext2fs -lblkid $(LDFLAGS) $(LIBS) ioctl-test: $(objects) ioctl-test.o gcc $(CFLAGS) -o ioctl-test $(objects) ioctl-test.o $(LDFLAGS) $(LIBS)
convert.c +125 -59
411 lines not on this page · raw message
Signature · 1 line
1.6.4.4