lklhaikufs: features galore

Blog post by lucian on Fri, 2010-07-16 21:02

The LKL-based Haiku driver has progressed well in the last few weeks.

The set of features already implemented:

  • mounting and unmounting ext3, ext4 disk images*, both read-only and read-write
  • listing file system attributes (read-only/read-write, file system size, number of files created, number of files remaining to be created, etc.)
  • browsing the contents of any folder on the file system
  • listing file permissions, owner, group, type (directory, symlink, regular file, etc.)
  • opening/closing existing files, and creating new files
  • reading and writing data into files
  • creating new directories

What still needs to be done:

  • renaming files
  • deleting files and directories

* I only tested ext3 and ext4, other should work as well. There's a limitation in the ext4 support in LKL, not related to this driver in particular that needs to be fixed.

Comments

Re: lklhaikufs: features galore

Does lklhaikufs work just like the Linux kernel which I know it is but is sort of a wierd situation. I mean can file system modules be loaded and unloaded say for instance I want to add reiserfs support or build the ZFS Linux port and have it work?

Another possibly interesting case might be improving the Linux BeFS implementation while actually running it as lkhaikufs on Haiku?

Re: lklhaikufs: features galore

For the moment I haven't implemented loading of external modules inside LKL. I think it is possible to do this but it's going to take some work.

At this stage you have two solutions:

  • build an LKL with all the file systems you want to support
  • build many smaller LKLs each one with one file system in it, and create corresponding lklhaikufs-ext3, lklhaikufs-ext4, lklhaikufs-reiserfs. Haiku's file system loaders are advanced enough to keep in memory only the file system driver images that are used. However, this means that a lot of code and data, common to both file systems will be duplicated

Yes, you could add features to the Linux BeFS code (I have no idea how advanced it's implementation is) and test them.

But LKL permits you do to even more fun stuff: you can build user-space applications based on it, and you can debug them with gdb (it's pretty neat, you learn much about the interactions between kernel subsystems this way).

Re: lklhaikufs: features galore

Great work. I was wondering, will this also support FAT32, NTFS later on and replace the (in my experience) currently flakey implementations? Also, how much of a performance hit does this incur compared to a Haiku native implementation?

Re: lklhaikufs: features galore

Yep, FAT (DosFS), VFAT (The Windows 95 and forwards FAT with filenames longer than 8.3) and NTFS should be supported through LKL.

I haven't had the time to do a performance review for lklhaikufs vs. ext2, reiserfs, NTFS, FAT, but when the driver will be feature complete, be sure I'll address this too.

Re: lklhaikufs: features galore

Very nice, keep up the great work! As for the speed penalty, unless it's severe I don't see it as a problem. The important thing is for Haiku to have stable access to foreign filesystems.

Re: lklhaikufs: features galore

I think that having separate builds for each supported fs would be a better / more eloquent solution! and you could optimize each build to the given file system! This is fantastic work and can not wait to have it all up and running! Well done.

Re: lklhaikufs: features galore

Hi Lucian,

Can you please take some time and provide an update on any progress you have made since your last post here? Is there anything that we can alpha test?

Regards,
Andrew