Super block operations are established at the time of mounting. The operation tables for inodes and files are set when the inode is accessed. The initial step before accessing an inode involves a lookup process. The inode for a file is identified by invoking the lookup handler of the parent inode.
- Directories: create, remove, list, rename;
- Regular files: create, remove, read/write (through page cache), rename;
- Symbolic links (also symlink or soft link): create, remove, rename;
- Mknod files;
- No extended attribute support;
Install linux kernel header in advance.
$ sudo apt install linux-headers-$(uname -r)You can build the kernel module and tool with make.
Generate test image via make test.img, which creates a zeroed file of 50 MiB.
You can then mount this image on a system with the kxcspacefs kernel module installed. Let's test kernel module:
$ sudo insmod kxcspacefs.koCorresponding kernel message:
kxcspacefs: module loaded
Generate test image by creating a zeroed file of 50 MiB. We can then mount this image on a system with the kxcspacefs kernel module installed.
$ mkdir -p test
$ dd if=/dev/zero of=test.img bs=1M count=50
$ ./mkfs.kxcspacefs test.img $(sectorsize)
$ sudo mount -o loop -t KXCSpaceFS test.img testYou shall get the following kernel messages:
kxcspacefs: '/dev/loop?' mount success
Here /dev/loop? might be loop1, loop2, loop3, etc.
Perform regular file system operations: (as root)
$ echo "Hello World" > test/hello
$ cat test/hello
$ ls -lRRemove kernel mount point and module:
$ sudo umount test
$ sudo rmmod kxcspacefskxcspacefs is released under the GPL v3 clause licence. Use of this source code
is governed by a GPL-style license that can be found in the LICENSE file.
simplefs is released under the BSD 2 clause license. Use of this source code
is governed by a BSD-style license that can be found in the LICENSE.old file.