Article View: muc.lists.freebsd.hackers
Article #29FemtoFS
From: Andrea Cocito
Date: Thu, 15 Oct 2026 06:55
Date: Thu, 15 Oct 2026 06:55
98 lines
9392 bytes
9392 bytes
--Apple-Mail=_87C232B2-557B-4CC2-84D6-E740E48965F3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, As a weekend project I am working on a small filesystem.=20 The idea is to have a read-only filesystem focused at efficiency useable = for =E2=80=9Cfirmare images=E2=80=9D or projects like NanoBSD or mfsBSD, = where using a full UFS image is a waste of space and resources. I am at a point where I have it more or less working (see = git@github.com:puffetto/FemtoFS.git / = https://github.com/puffetto/FemtoFS.git ); but need advice and a second = opinion about a design issue. Currently the code, when mounting an image off md(4), duplicates the = whole memory area to have a private copy. To avoid this I see two options: a. Add two hooks in md(4): md_image_hold(*consumer, **address, *size) = and md_image_release(*consumer) which basically tell md(4): =E2=80=9CThis = image is now locked for my use, don=E2=80=99t touch it=E2=80=9D and = =E2=80=9CHere is it, it's back yours=E2=80=9D. b. Implement a separate (and simplified) =E2=80=9Crmd=E2=80=9D driver = which exposes those two hooks in a simplified =E2=80=9Cmd=E2=80=9D = provider. I think that option =E2=80=98a.=E2=80=99 is cleaner, but I wonder = if/when a small patch providing those hooks would ever make it into the = FreeBSD tree.=20 Opinions? While here if anyone wants to take a look at the specification and code = and report me any issue, mistake or bug they find it would be great. A = lot of work, admittedly, was done by Codex. All the best, A. --Apple-Mail=_87C232B2-557B-4CC2-84D6-E740E48965F3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html aria-label=3D"message body"><head><meta http-equiv=3D"content-type" = content=3D"text/html; charset=3Dutf-8"></head><body = style=3D"overflow-wrap: break-word; -webkit-nbsp-mode: space; = line-break: after-white-space;">Hello,<div><br></div><div>As a weekend = project I am working on a small = filesystem. </div><div><br></div><div>The idea is to have a = read-only filesystem focused at efficiency useable for =E2=80=9Cfirmare = images=E2=80=9D or projects like NanoBSD or mfsBSD, where using a full = UFS image is a waste of space and resources.</div><div><br></div><div>I = am at a point where I have it more or less working (see = git@github.com:puffetto/FemtoFS.git / <a = href=3D"https://github.com/puffetto/FemtoFS.git">https://github.com/puffet= to/FemtoFS.git</a> ); but need advice and a second opinion about a = design issue.</div><div><br></div><div>Currently the code, when mounting = an image off md(4), duplicates the whole memory area to have a private = copy.</div><div><br></div><div>To avoid this I see two = options:</div><div><br></div><div>a. Add two hooks in md(4): = md_image_hold(*consumer, **address, *size) and = md_image_release(*consumer) which basically tell md(4): =E2=80=9CThis = image is now locked for my use, don=E2=80=99t touch it=E2=80=9D and = =E2=80=9CHere is it, it's back yours=E2=80=9D.</div><div><br></div><div>b.= Implement a separate (and simplified) =E2=80=9Crmd=E2=80=9D driver = which exposes those two hooks in a simplified =E2=80=9Cmd=E2=80=9D = provider.</div><div><br></div><div>I think that option =E2=80=98a.=E2=80=99= is cleaner, but I wonder if/when a small patch providing those hooks = would ever make it into the FreeBSD = tree. </div><div><br></div><div>Opinions?</div><div><br></div><div>Wh= ile here if anyone wants to take a look at the specification and code = and report me any issue, mistake or bug they find it would be great. A = lot of work, admittedly, was done by Codex.</div><div><br></div><div>All = the = best,</div><div><br></div><div>A.</div><div><br></div><div><br></div><div>= <br></div><div><br></div><div><br></div><div><br></div></body></html>= --Apple-Mail=_87C232B2-557B-4CC2-84D6-E740E48965F3-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<A0D65A6D-110F-47C0-B36F-DC03CA2E632A@cocito.eu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Andrea Cocito <andrea@cocito.eu>
Newsgroups: muc.lists.freebsd.hackers
Subject: FemtoFS
Date: Thu, 15 Oct 2026 08:55:49 +0200
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-hackers@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <A0D65A6D-110F-47C0-B36F-DC03CA2E632A@cocito.eu>
MIME-Version: 1.0 (Mac OS X Mail 16.0 \(3864.700.51.1.1\))
Content-Type: multipart/alternative;
boundary="Apple-Mail=_87C232B2-557B-4CC2-84D6-E740E48965F3"
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
logging-data="64258"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1792047368; h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:mime-version:mime-version:
content-type:content-type:list-id:list-help:list-owner:
list-unsubscribe:list-subscribe:list-post;
bh=yyA5oGKKWKs4IQ2jv1SB7gqEVouUJxKIBpsyvoD487I=;
b=ZdNYPYAwBOc10/MAQpLBAG/0ViYpbh4FF/jTG1foLQCja/YGbsSvN99lVnQB649jX74v7Q
kRXIHyanXzme6bVBk557uBEWAmvg1/ahAAcZ/O582XW9CPFbVq83JX2CDV8caUiEhdugQU
WvpVTOv+Ze7Oudg3+iSVELiLk5d3o6RCCJQpksx2kJUrzL1ijb1clrYGStQYths95cFyTe
TgK566k0yf6MCdDXUN0RGirS6xLR3t7hUR+tOJmiPBTTC098zDsPD2InIyjmUvaIpM+GZl
fPyeYwBah72EriS/5XMexWKtt9NEYHDq/th3kN1ouNAK1o2hwZbZGburiiS/9w==
X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
dkim=pass header.d=cocito-eu.20251104.gappssmtp.com header.s=20251104 header.b=TKzPXdAd;
spf=pass (mx1.freebsd.org: domain of andrea@cocito.eu designates 2a00:1450:4864:20::435 as permitted sender) smtp.mailfrom=andrea@cocito.eu;
dmarc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=cocito-eu.20251104.gappssmtp.com; s=20251104; t=1792047363; x=1792652163; darn=freebsd.org;
h=to:date:message-id:subject:mime-version:content-type:from:from:to
:cc:subject:date:message-id:reply-to:content-type;
bh=yyA5oGKKWKs4IQ2jv1SB7gqEVouUJxKIBpsyvoD487I=;
b=TKzPXdAdhpPX4nseORkLt6qleyA+eRoUP/pw/nJJQg9y0XGMQW/TinMyHWTg+gW2A8
vgBaz+czFXgePNV05fnHG6G1rqAwfSw+C/rKgizG6I71rGGasDMY9473GQTqBgrpKQvq
OUhJmXQ10JbWc3cVt1BOhIwCWL2i+zZOAsuOueeFBR8jfzqDKyUzTDduG9NeU5lbxA4X
YLbi0usk2GOqRKHC8vii+TJjc4FUl3k5fTIbi1fj/OH5MyZnANbevo3r+WlqBILS1Nse
ffMPlgvOhM+f/6dcjExz6wsMuy6Bn5QXAN836eyH0o3fkadik+BNM7HtSq5nWtFOrHuJ
/ihw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792047363; x=1792652163;
h=to:date:message-id:subject:mime-version:content-type:from:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=yyA5oGKKWKs4IQ2jv1SB7gqEVouUJxKIBpsyvoD487I=;
b=z9tLUITYe/YmOFBknJVjRMqQNghjQ/bw6C69dq5QSOHh5axg79xLotSCS/0CN/R7db
zn6hcXp7dsoynlp2EVjluPdadUVr+OHV/V29vh9saOb+wPr1ZdmyV93PrREF+N7N6i5g
geZVtqXQYVc1XwRLLxlH1p02NH4CNlUfUKJs/mbMEMYlLoqoB1BDNflX/paLuBZAjL8K
VUTfgsSvEMwOOjM0ME6FRGCS+fuqOc9ecIfQkncfYCZ8EDUDmn3raPANWYQZ+byzCe+z
8BTBKssmpiE7y0HaBG7H5XjyLB0mc2yCm5gJUtXbTesEf18Zjv/YNPhke/cZMq3zerzW
nfCg==
X-Gm-Message-State: AFq9FYKQW7riITjB5DmnuSHrih1ARnr2ccZww1QXlSGq3TUlKcpTN611
v00E7XzYByjMH9dWv02Ueswrhzc7PuPJVVt5Z3AygE8kZpM5+mXdJ9U7mPbkEg97PL5QC8UiyTM
Qo7inYbY=
X-Gm-Gg: AYBFou0zViTRb5v6GKfl1tnDg8AP4SS0mRctjqv6yBKv6y4FDkr5d9PFNLSdnMKlpnP
ocxLf/N8pvcpK2+q/ILP0JeFjxTitqG8Av/UyW8jTj1b4ioeDMXk4Hl83Kq9Uz0YswBR7+bnkBI
7ncs5NLm46uisCX6w/V9DrbtdTxDOC5ABqbyJLlZoou4K9G7sSckp+htAAjePdHCKL+TsSfGFqN
OfzcjKdoTjePUmg/Eg+EFSOEoI1UvQjjQfJ2jN7MaPnX6aBdq+G0TL9V9OYPq5uA8/RdaxPL1Kp
1fxWENuo49V2QDeyv2ybt4cBCIW9Tm0La3TN68pbAjxYHhaZ8tv4H/8Uy4YfELvHAxylrf9e18u
gvVY2wqypLb/iXLZx4n9+acg9ILWXJFVwRpDheWk4tFhbaK/INb0kgbgMYxKEu98Y/W4lG5kG+j
8Elevv5qkWy9Atb2EOBIfhFb3bnwEvechSKPyyLKJkdrmRbtPqxpxPVM5uGbDgFKTLFe1CKqSe/
KuWUU2LSrSc0w==
Precedence: list
X-Spamd-Bar: /
X-Spamd-Result: default: False [0.00 / 15.00];
MV_CASE(0.50)[];
R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4864::/56];
R_DKIM_ALLOW(-0.20)[cocito-eu.20251104.gappssmtp.com:s=20251104];
MIME_GOOD(-0.10)[multipart/alternative,text/plain];
FROM_HAS_DN(0.00)[];
DMARC_NA(0.00)[cocito.eu];
RCVD_VIA_SMTP_AUTH(0.00)[];
ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
RCPT_COUNT_ONE(0.00)[1];
ARC_NA(0.00)[];
MIME_TRACE(0.00)[0:+,1:+,2:~];
MID_RHS_MATCH_FROM(0.00)[];
MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org];
RCVD_TLS_LAST(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
FROM_EQ_ENVFROM(0.00)[];
RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::435:from];
TO_DN_NONE(0.00)[];
PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DKIM_TRACE(0.00)[cocito-eu.20251104.gappssmtp.com:+]
X-Rspamd-Queue-Id: 4j4zPK21yNz3PDp
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes