Okay, maybe I wasn't clear. LeanFS spec is pretty good, that's why I'm interested in it. But to my experience the spec isn't enough to implement a read-write driver.
BenLunt wrote:
So, why the LeanFS? There are no other utilities or driver code. I have to make everything myself. From scratch. It is the enjoyment of doing so.
I agree, the problem here is, there must be a way a validate if your generated image (or partition) actually complies with the spec and validates as a correct LeanFS. Without you can't be sure that your driver is correct.
BenLunt wrote:
You know about
my (open source) utility, but yes it is Windows only.
Yes, it's a pretty amazing tool, and my only issue with it is that I don't use Windows, only Open Source. Have you ever thought about porting it to GTK for example? Pure X11 would be the best, but that's a lot to ask I know, as that is a low-level library.
BenLunt wrote:
However, on that same page is an image (or two) that has a LeanFS partition. You could easily test your code with it. If you need another image, please let me know what kind of details you would like on it, and I will create it and post it.
Thank you very much, but it's the other way around. Comparing my image to a known-to-be good image is just the first step, what I'm actually interested in is testing and dumping my images. (While for me it's okay to generate a dozen test images per hour and compare them to my own generated image, it would be overwhelming to ask someone else to do that for me. You see, I don't know in advance what part I want to test, I generate the "compare with" images as the test goes.)
BenLunt wrote:
I recommended the LeanFS to the
original post in the hope that the poster would try something that isn't already done by every other project here, that they might get the satisfaction of creating something new, rather than stealing someone else's code. I learn(ed) a lot more when I start from scratch, coding the project myself, than copying someone else's code, and simply modifying it for my taste.
I absolutely and 100% percent agree. I don't want to use someone else's code, I need it to test my image (or put a bunch of printfs in it as well as in my code too, and compare the outputs). For example with ext2, I've created an empty image with mke2fs. Then I adjusted my code until I could generate the same bit by bit (wasn't trivial, because the ext2 doc does not say how to calculate the maximum number of inodes for example, and that inode 6 (undelete) isn't actually used for "lost+found" etc.) Then when I could generate a perfect empty image, I started to add contents and checked the image with debugfs and dumpfs. I'm looking for similar tools for LeanFS.
BenLunt wrote:
Yes, the original author of the LeanFS has moved on to other projects. I don't blame him. In fact, if it wasn't for my persuasion, he probably wouldn't have even got as far as he did. However, when I have the time (and interest), I come back to it and add function to my code. Therefore, if you need help with your implementation, I am more than happy to answer any questions you have, look over your code, and run my tests on your image(s).
Thank you very much, I might take on your word
I'm planning to add LeanFS in my disk image creator. So far it can generate almost every
Beginner filesystems. The exception is BMFS, I like very much how it was done, there's a separate library, fuse driver, etc., but it's so limited that I don't really think anybody would want to use it for real (the lack of directories is pretty awkward these days.)
BenLunt wrote:
The term "re-inventing the wheel" has been used a lot in this forum over the years, but I believe that if we build a new wheel for ourselves, we can learn how to do it and possibly make it better. Why not start with the LeanFS?
Exactly that was my thought! I want to add LeanFS to my image creator because if a beginner thinks the same way, then I want to provide a tool for them that can generate such partitions out of a directory, so they can focus implementing their drivers. Actually I find LeanFS pretty good for beginners, because it's featured enough (everything that an OS might need is supported, like UNIX privileges, fragmentation, symbolic links etc.), yet it's a lot simpler than ext2 for example. FAT is easy to implement, but lacking way too many features (protection bits, hardlinks, symlinks, etc.) I would say LeanFS gets the best of both the FAT and i-node worlds, that's why I'm interested in it.
BenLunt wrote:
Anyway, thank you for your interest. As the original author has told me many times, and I agree, this file system has been an enjoyment for the both of us. It would be exciting for myself, as with the original author, if others would implement this file system in their own projects, giving feedback throughout.
Let's see how far I can get with the specification alone, without validating the results. The imager tool is
here, and I'm planning to call the partition type with this format "lean" if that's okay with you (and the original author). FYI, I have also wanted to add SFS because it's OSDev.org's file system, and with your help and example images I could implement a read-only driver (in the boot loader), however I've would the specification insufficient for creating a proper image creator. At first glimpse this won't be the case with LeanFS, as it's much better documented.
Cheers,
bzt