From: levin li <xingke.lwp at taobao.com> This module provides function for users to take sheepdog VDIs as block devices in linux, users can register a VDI to its kernel space, it just like that a new hard disk is added to the computer, users can create partitions for the disk, format the disk or mount the disk, it provides users a efficient way to use sheepdog as distributed storage system. The usage is easy, after install the module sheepdev.ko, it creates a proc entry '/proc/entry', you can write into the proc entry file to control the driver. Add a new block device from an existing sheepdog VDI: # echo "add 127.0.0.1:7070 a5d05d" > /proc/sheep It would create a block device /dev/sheepa, you can format/mount this device: # mkfs.ext4 /dev/sheepa # mount -t ext4 /sheep/sheepa test Remove a block device from the kernel: # echo "del sheepa" > /proc/sheep levin li (2): sheepdev: linux kernel module of block device driver for sheepdog sheepdev: add kbuild and Makefile.in Makefile.am | 4 + configure.ac | 9 + sheepdev/Kbuild | 12 + sheepdev/Makefile.in | 8 + sheepdev/connect.c | 178 ++++++++++++ sheepdev/module.c | 726 ++++++++++++++++++++++++++++++++++++++++++++++ sheepdev/sheep.c | 136 +++++++++ sheepdev/sheep.h | 88 ++++++ sheepdev/sheepdog_proto.h | 290 ++++++++++++++++++ 9 files changed, 1451 insertions(+) create mode 100644 sheepdev/Kbuild create mode 100644 sheepdev/Makefile.in create mode 100644 sheepdev/connect.c create mode 100644 sheepdev/module.c create mode 100644 sheepdev/sheep.c create mode 100644 sheepdev/sheep.h create mode 100644 sheepdev/sheepdog_proto.h -- 1.7.11.7 |