Userspace driver for developing filesystems
- Basic FUSE driver
- Read functions
- Write functions
- IOCTL functions
- Startup functions
- Status functions
- ext2 demo
- Lazy loading
- Buffer cache emulation
- SSD Wear emulation
FUSED enables you to map any raw image and expose a device driver interface through 4 functions:
read_diskwrite_diskioctl_diskget_disk_statusinit_disk
First create the build directory structure with make setup
You can start by creating a test scenario by simply running make testsetup
Then you may build the test program by runnin make fuse and running it by make run
Or simply do the last two steps with make
For this you will have to:
-
Set the config variables in
config.hto your liking (comment them to disable) Note:LAZY MODE (EAGER COMMENTED)is unfinished -
(Optional) modify the stubs in
dependencies.handdependencies.cto suit your environment (they start by __fuse_) -
Start implementing your fs by including
primitives.h -
In the code used to test your fs implementation include
bfuse.hand register the device to the driver by running:register_drive("./path/to/image.img", "mount point string", 512); // 512 is the sector size -
After that, you are golden, now you can run call the driver in your fs, remember to identify the device throgh the mount string
make setup- Creates the build directory structuremake testsetup- Creates a test scenario with two files (empty and ext2 formatted)make demo- Creates a demo file that can be used to test the drivermake reset- Resets the test scenario imagesmake test- Runs the full test scenariomake cleantest- Undo testsetupmake cleansetup- Undo setup
make pull- Refreshes the repositorymake upload- Uploads the repository to the remote
make- Cleans, builds and runs the test programmake all- Same as abovemake fuse- Builds the programmake clean- Deletes all compiled files
make run- Runs the programmake debug- Launches GDB
