/net in Linux: project log

A Glendix project

Learning to write a Systhetic Filesystem on Linux

Week 4:-

Before I start with /net, I wanted to try implementing a sample FS. I thank lwn.net for providing that piece of documentation. I implemented the lwnfs.c in my home folder like they mentioned. NOTE:- A patch is needed on newer kernel versions.

My Makefile looks something like:

ifneq ($(KERNELRELEASE),)
obj-m   := lwnfs.o
else
KDIR    := /lib/modules/$(shell uname -r)/build
PWD     := $(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
endif

Remember, once the filesystem compiles, you need to mount the fs.
i.e. rahul@Glendix$ mount -t lwnfs none /lwnfs

Cant wait for the day when “mount -t net none /net” works!

February 19, 2009 - Posted by | Glendix, libfs, Linux kernel, vfs

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.