From nobody Mon Mar 03 21:04:44 2025 X-Original-To: hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Z6BCk4S37z5ngxF for ; Mon, 03 Mar 2025 21:05:06 +0000 (UTC) (envelope-from paige@paige.bio) Received: from pv50p00im-ztdg10011901.me.com (pv50p00im-ztdg10011901.me.com [17.58.6.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z6BCk3LQ3z45Qj for ; Mon, 03 Mar 2025 21:05:06 +0000 (UTC) (envelope-from paige@paige.bio) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paige.bio; s=sig1; bh=MyYKn5Dipd5VKVad1Y3tkiIV0ubYPwmZ0i6GMXgaUz0=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:To:x-icloud-hme; b=ZM3zlWBvRzadbGi7LoS6KdrmSsy6xr5pHpSL2s4qq36nVR+rL/9a8nyoANSCHrzWG m9g4qdplwqs8XtY7IduyCh3P3yFAUGmoc3+6QUrQZjzl0IJQJ6Bf9rUga5P5S07ZeG 8yj5sgWii8SpnoclaFigI5elnw+86CcR6iMrZQe/WHEPT060futAj4NrGFblkvnYHC B/qHroatFU8tP1OqY1a6kHSjTXUjVS4NX3IdSa0wyLAd9AjyfUCnptWBOeqxuBhWGt Swhjdxw+4bhJIKI4xE1QmU790xVV2u4gwo25/v0yU6oYQjNHXL/rQCKwUEG7NozCYC t+wh1hicyYCSw== Received: from smtpclient.apple (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10011901.me.com (Postfix) with ESMTPSA id 693403A0927; Mon, 3 Mar 2025 21:04:56 +0000 (UTC) From: paige@paige.bio Message-Id: <88C34907-1525-4927-8105-153B389BFA55@paige.bio> Content-Type: multipart/alternative; boundary="Apple-Mail=_A1A8C444-DEB1-4B75-B124-BA035FCBB607" List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: Porting BeFS to FreeBSD for GSoC2025 Date: Mon, 3 Mar 2025 13:04:44 -0800 In-Reply-To: <1150935855.6567926.1741010692744@mail.yahoo.com> Cc: hackers@freebsd.org, Krutarth Patel To: Pedro Giffuni References: <1150935855.6567926.1741010692744@mail.yahoo.com> X-Mailer: Apple Mail (2.3826.400.131.1.6) X-Proofpoint-GUID: 9bqnrvhEGEbNnXsT-5lj-XdFvf9Ax6_V X-Proofpoint-ORIG-GUID: 9bqnrvhEGEbNnXsT-5lj-XdFvf9Ax6_V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-03_10,2025-03-03_04,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 spamscore=0 clxscore=1030 mlxlogscore=999 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2503030163 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:714, ipnet:17.58.0.0/20, country:US] X-Rspamd-Queue-Id: 4Z6BCk3LQ3z45Qj X-Spamd-Bar: ---- --Apple-Mail=_A1A8C444-DEB1-4B75-B124-BA035FCBB607 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I=E2=80=99ve collectively been making an ExFAT native driver (uses VFS = instead of fuse)=20 https://github.com/paigeadelethompson/exfat And I=E2=80=99ve been using an LLM to do it. I recommend using something = like Claude if you can, not sure when I=E2=80=99ll be done with this but = if you want some advice:=20 - start with newfs and use a known good chkdsk or fsck program on = another computer; macOS is good starting point if you can get befs.fsck = there otherwise plan on having to copy stuff back and forth a bit. If you use an LLM and can get this converted to text: = https://www.nobius.org/dbg/practical-file-system-design.pdf it will help = you a lot=20 ExFAT is documented extensively on MSDN and Claude-3.5-sonnet seems to = have pretty decent RAG. In any case I recommend having a look through my = README and making heavy use of bootverbose.. but you will also want to = enable the various kernel level options in my readme, VFS is a little = tricky but once you get through this initial mount trace: = https://github.com/paigeadelethompson/exfat/commit/187c6694c68554f7961b427= 501373984a0742366 The rest shouldn=E2=80=99t be as bad.. you can see the snippet of = bootverbose messages have the function name that its calling from (very = helpful to have honestly especially if you=E2=80=99re using an LLM) but = be prepared to drop into DDB and reset / retry a few dozen or a hundred = times until you figure out VFS in any case xD At least with lock debugging enabled in the kernel it=E2=80=99s a little = more actionable.=20 Sent from my iPhone > On Mar 3, 2025, at 6:05=E2=80=AFAM, Pedro Giffuni = wrote: >=20 > =EF=BB=BF > Hello Krutarth; >=20 > Thank you for the interest! >=20 > Yes, the idea is still open. In all honesty FreeBSD does have much = better filesystems than openBFS, but we don't have a "true" journalling = filesystem and BFS is rather well documented with an open implementation = so it could still be a nice to have. >=20 > At a time I spoke with some Haiku guys and Bruno was interested in = co-mentoring this project. >=20 > As I mentioned in private, you are probably better of checking the = ext2fs sources (sys/fs/ext2fs), for a simplified UFS. We don't have any = open issues AFAICT, but maybe fedor@ has something pending. >=20 > For documentation "The Design and Implementation of the FreeBSD OS", = seems pretty much compulsory. >=20 > Pedro. >=20 > ps. I am somewhat retired from FreeBSD, if such a thing exists, but if = no one else steps in I would co-mentor. >=20 >=20 > On Monday, March 3, 2025 at 12:53:00 AM GMT-5, Krutarth Patel = wrote: >=20 >=20 > Hello, >=20 > I am interested in porting BeFS from Haiku. I see that it is listed as = one of the GSoC ideas. >=20 > I have done some contributions in the PCI subsystem over at Haiku and = have some Linux kernel debugging experience.=20 >=20 > I am new to FreeBSD( not entirely, I am in the process of porting a = driver from FreeBSD to Haiku) and filesystems in general( I have an idea = of the basic terminologies like inode, block etc. but thats about it). = But I am willing to learn. >=20 > Here are my questions: >=20 > Is the idea still open? > Are there any smaller issues I can resolve to get myself familiar with = codebase?( something related to UFS/ZFS would be perfect) > Where is the UFS and ZFS implementation in the source tree? > Any recommended resources for learning about filesystems( specifically = FreeBSD, I am reading a guide about BeFS )? > Looking forward to hearing from you >=20 >=20 >=20 >=20 --Apple-Mail=_A1A8C444-DEB1-4B75-B124-BA035FCBB607 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
I=E2=80=99ve collectively been making an ExFAT native = driver (uses VFS instead of fuse) 


And I=E2=80=99ve = been using an LLM to do it. I recommend using something like Claude if = you can, not sure when I=E2=80=99ll be done with this but if you want = some advice: 

- start with newfs and use a = known good chkdsk or fsck program on another computer; macOS is good = starting point if you can get befs.fsck there otherwise plan on having = to copy stuff back and forth a bit.

If you use = an LLM and can get this converted to text: https= ://www.nobius.org/dbg/practical-file-system-design.pdf it will = help you a lot 
ExFAT is documented extensively on MSDN = and Claude-3.5-sonnet seems to have pretty decent RAG. In any case I = recommend having a look through my README and making heavy use of = bootverbose.. but you will also want to enable the various kernel level = options in my readme, VFS is a little tricky but once you get through = this initial mount trace:


The = rest shouldn=E2=80=99t be as bad.. you can see the snippet of = bootverbose messages have the function name that its calling from (very = helpful to have honestly especially if you=E2=80=99re using an LLM) but = be prepared to drop into DDB and reset / retry a few dozen or a hundred = times until you figure out VFS in any case xD

At least with lock = debugging enabled in the kernel it=E2=80=99s a little more = actionable. 

Sent from = my iPhone

On Mar 3, 2025, at 6:05=E2=80=AFAM, Pedro Giffuni = <pfg@freebsd.org> wrote:

=EF=BB=BF
Hello Krutarth;

Thank you for the interest!

Yes, the idea is still open. In all honesty = FreeBSD does have much better filesystems than openBFS, but we don't = have a "true" journalling filesystem and BFS is rather well documented = with an open implementation so it could still be a nice to = have.

At a = time I spoke with some Haiku guys and Bruno was interested in = co-mentoring this project.

As = I mentioned in private, you are probably better of checking the ext2fs = sources (sys/fs/ext2fs), for a simplified UFS. We don't have any open = issues AFAICT, but maybe fedor@ has something pending.

For documentation "The Design and Implementation = of the FreeBSD OS", seems pretty much compulsory.

Pedro.

ps. I am somewhat retired from FreeBSD, if such a = thing exists, but if no one else steps in I would = co-mentor.


=20
=20
On Monday, March 3, 2025 at 12:53:00 AM GMT-5, = Krutarth Patel <krutarthpatel929@gmail.com> wrote:


=20 =20

Hello,

I am interested in porting BeFS from Haiku. I = see that it is listed as one of the GSoC ideas.

I have done some = contributions in the PCI subsystem over at Haiku and have some Linux = kernel debugging experience. 

I am new to FreeBSD( not = entirely, I am in the process of porting a driver from FreeBSD to Haiku) = and filesystems in general( I have an idea of the basic terminologies = like inode, block etc. but thats about it).  But I am willing to = learn.

Here are my questions:

  • Is the idea still open?
  • Are there any smaller issues I = can resolve to get myself familiar with codebase?( something related to = UFS/ZFS would be perfect)
  • Where is the UFS and ZFS = implementation in the source tree?
  • Any recommended resources for = learning about filesystems( specifically FreeBSD, I am reading a guide = about BeFS )?

Looking forward to hearing from = you



= --Apple-Mail=_A1A8C444-DEB1-4B75-B124-BA035FCBB607--