logoalt Hacker News

F* file system – file search that reads SSD directly bypassing OS kernel

40 pointsby neogooselast Sunday at 8:44 PM31 commentsview on HN

Comments

watusernameyesterday at 11:43 PM

> bypassing OS kernel

> reading a raw device node (e.g. /dev/rdisk*)

That's... not bypassing the kernel. Time to integrate SPDK so it actually bypasses the kernel :)

https://spdk.io

neogooselast Sunday at 8:44 PM

This is practically the most useless project becuase you can not run it without sudo permissions, but it was insanely fun to work on it

supports ext4, btrfs, and apfs. Multithreaded, supports compression, nested volumes, and can even search detached volumes like .iso and .dmg without mounting

An interesting bonus point: you can't really vibe code it cause clankers can not run sudo commands

show 9 replies
Retr0idyesterday at 10:29 PM

It might bypass the fs, but it does not bypass the kernel. Cool, though!

kasabaliyesterday at 10:28 PM

Dumb title.

It works by reading the block device in /dev directly, wouldn't it also work on an HDD, flash drive or a memory card?

show 1 reply
4petesakeyesterday at 10:15 PM

But can it match the speed and reliability of the venerable Windows Search?

wk_endyesterday at 10:57 PM

Saw the name and was disappointed that this wasn't some kind of verified file system written in the F* programming language (https://fstar-lang.org).

I don't think I'd ever trust or use this, but still, good job OP :)

porridgeraisintoday at 1:39 AM

Run this once per boot:

  sudo setfacl -m u:$USER:r-- /dev/nvmen01p2 # or whatever
And then any program you run will have read access to the block device.

Or if you want to only give fff access,

  sudo groupadd diskreaders
  sudo setfacl -m g:diskreaders:r-- /dev/nvmen01p2
  sudo chown :diskreaders /path/to/fff
  sudo chmod g+s /path/to/fff
And just run fff normally after that. Here too, the facl command has to be run every boot. Just crontab it. Everything else runs once.

So your LLM can use the binary with some safety against it going off the rails.

ameliusyesterday at 9:52 PM

But can it bypass the magic performed by the SSD controller?

In particular, can it be certain that a flush is really a flush?

show 1 reply
lunar_roveryesterday at 11:47 PM

The repo summary has multiple typos.

drewg123yesterday at 10:47 PM

It is sad that that FFS doesn't support FFS (BSD Fast File System) which inspired the architecture of the ext filesystem (and was the basis for a lot of unix filesystems).