TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Writing a file system from scratch in Rust

215 点作者 georgehill超过 1 年前

6 条评论

loeg超过 1 年前
This is sort of similar in design to the old school Unix Filesystem (UFS), moreso than Ext4 (which grew out of similar ideas and of course, still has inodes and data blocks and a superblock, but also has a lot of other things going on).<p>In a production Rust filesystem, I would not use libc types lid uid_t and gid_t in defining the on-disk format -- they may vary from libc to libc, but you probably want your filesystem to be portable between systems.
didgetmaster超过 1 年前
The use of direct, indirect, double indirect, etc. pointers to data blocks shows how antiquated some file system designs are. When files that can be fragmented regularly reach sizes in the gigabytes, using extents is the best way to track their data blocks in an efficient manner.
评论 #38522940 未加载
SairajK19超过 1 年前
Hi, I did not understand the arithmetic behind indirect pointers and the file size it can store.<p>It says &quot;A single indirect pointer can point - (12 + 1024) * 4 KiB&quot; that is 4MiB file.<p>My question is, what does 1024 represent. I understand 12 is the number of direct pointers and we are multiplying it by 4 considering a pointer takes 4 bytes of space. Would help if anyone explains it.<p>Might be a silly question, sorry about that. But ya, thanks for the help!
评论 #38513298 未加载
评论 #38513318 未加载
评论 #38513300 未加载
trumpeta超过 1 年前
Interesting article. I wonder if the FS abstraction is not too large, maybe it could be split into various layers, such as the Physical layer (block KV store), intermediate with building files from blocks and last UI layer with FS or Object Store type access. Kind of similar to what&#x27;s happening in the database space with Query Engines like DataFusion.
mkesper超过 1 年前
(2020)
anon-3988超过 1 年前
Did you get here from Phil Eaton&#x27;s tweet?
评论 #38512885 未加载