GSoC 2020 Project: Adding XFS file system in Haiku

Blog post by CruxBox on Mon, 2020-05-11 23:35

Sorry for the late post, but here we go!

Introduction:

I am Shubham Bhagat, a sophomore, currently majoring in Computer Science Engineering from Indian Institute of Information Technology, Sricity, India. I came across Haiku, last November (2019), while I was looking for an operating system I could contribute to. My interest to contribute came from a mini college course. I knew Haiku was also part of GSoC for many years now, so getting the chance to work as an intern and learn here was a no brainer. So THANK YOU for selecting me as a mentee!


About the project:

My project proposes to begin support for the v4 of XFS File System. We currently have no support for it. The goal is to get the read-only part setup for now. If time permits we can do more :)

Project plan:

I was spending time reading a lot of the specs and the code I had written for the past few days(it’s been over a month since I did any work because of university commitments). At the moment, I think the initial step is to be able to read small directories. The way the inode manages data is in a hierarchical way depending on the size of the data. For example, directories, depending on the number of entries, could be:

  • Completely stored in the inode (unsorted linear fashion)

  • Extents could be used (Similar to block_run in BFS)

  • Use B+Trees instead of extents (records are still the same though)

This applies for files as well (except that files can’t be stored completely in an inode. It’s a proposed feature though). Likewise, links have their own story as well. So at the moment it makes sense to be able to read the root dir, and maybe some more directories inside it. I could then work on the files and move back to bigger directories. This makes sense to me but if you have other suggestions please let me know in the comments :D

Work done till now:

  • Built Xfs_shell

  • The FS can be mounted, superblock check passes

  • read_fs_info() works.

  • Some code on the Free Space Management (Only to now realize that it’s not needed :man_facepalming: )

You can find it here: https://review.haiku-os.org/q/owner:shubhambhagat111%2540yahoo.com


Expectations from myself:

I hope to be a great mentee and hope that this period will make me turn from a kid with few months of experience with OS to a Haiku Developer :) (Yeah one would say FS is quite high level but I have to start somewhere right? :P)