Skip to contentSkip to conversation

btrfs-convert: permit support for non-ext2 FSs

PATCH In review Sean Bartell 1 participant 1 message Mar 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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
index 525676e..755cc24 100644
@@ -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