
WinBtrfs – A Windows driver for the next-generation Linux filesystem Btrfs - doener
https://github.com/maharmstone/btrfs
======
alfredxing
What's interesting to me is that there doesn't seem to be a modern filesystem
that works across all major platforms. btrfs has Linux and this (unofficial)
Windows driver; ZFS has Linux and OS X support but nothing for Windows. NTFS
is pretty much Windows and Linux only for good write access, and APFS is
macOS-only.

I realize that designing a filesystem and writing drivers for it are very
difficult tasks, but surely it would be extremely beneficial to have at least
1 open source filesystem that has good support across all platforms?

~~~
awalton
> surely it would be extremely beneficial to have at least 1 open source
> filesystem that has good support across all platforms

The comedy of this is that there are actually plenty of FSes common to all
three of these OSes, they're just not considered "modern"; FAT32 is still the
most commonly used FS for interop, even as it shows its age with poor support
for very large files (2+GB) and file systems, but you also have ISO(9660) and
(the best answer we currently have) UDF supported by all three OSes natively
and openly without patents or other licensing restrictions. The latter two are
not commonly used as read/write filesystems, but have zero inherent
restrictions on being able to be used in such a way.

However, the problem has been largely supplanted by having a fast and well-
functioning network and people moving to "The Cloud" for, well, everything.
It's hard to know how much of the Great Cloud Migration is _caused_ by these
kinds of intentionally engineered interoperability fails, especially the
monumentally stupid exFAT patent... It's interesting to ponder given the
people likely to complain the most about filesystems today are people who want
to move large files (4+GB) between OSes without anguish, where the network is
still just too slow to handle the task well.

~~~
pmurT
ISO 9660 is not at all a general purpose filesystem. Although fairly trivial
to reason about and implement, little and big endian systems required entirely
separate structures written to disc or files would not be accessible.

Myth 2 was a popular testing media in those days due to Apple and PC endian
differences. As I recall Bungie did some clever crafting on the structures to
share some of the media between platforms while keeping binaries separated.
Even had a fun picture of soulblighter in Finder through icon trickery.

-wrote commercial CD mastering and storage software many many moons ago

------
newscracker
This seems like a good start, and it could help provide more choice in cross-
platform data storage and data exchange. Recently I looked once again, as I
usually do once every few years, at options for exchanging data through
external drives between Windows, macOS and Linux (I prefer USB drives, which
are faster than speeds I can attain over the network). Shockingly, it seemed
to me like NTFS was the easier filesystem to go with (Linux has good support
for it, and macOS needs a third party driver for write support)!

Back to this project, I feel there is a strong need to have a set of GUI tools
(beyond Windows Shell Extensions) to take advantage of the btrfs filesystem
features (like creating snapshots, sending snapshots to backup storage, etc.).
I use btrfs on Linux, and the lack of good, up-to-date GUI tools to use its
feature set has been a source of frustration (yes, I can use the command line,
but then that would restrict the usage only to me, leaving out the other not-
so-tech-savvy people around).

~~~
teddyh
> _options for exchanging data through external drives between Windows, macOS
> and Linux_

How is the UDF support on macOS? I ask since I relatively recently chose UDF
as the Windows/Linux common HDD file system format, but I did not consider
macOS.

~~~
cmurf
The trick for cross platform UDF is formatting the whole stick as UDF, without
partitioning (no MBR, GPT, or APM). In that case, it works, I tested this just
last week on Windows 10, Fedora 26, macOS 10.12.

It's totally sane. It's "like" FAT32 except you don't have the 2G filesize
limitation. NTFS might also be sane, but out of the box macOS doesn't have
write support.

------
pjc50
Nice work. I've starred this simply because examples of Windows filesystem
driver source are extremely rare. As are people familiar with both Windows and
Linux development, which have very differnt styles and conventions.

------
_benj
This should have been done by Microsoft long ago, even before their little
"Microsoft <3 Linux" gimmick with bash.

Still, a step in the right direction, at least on my book. My shared drives
are all exFAT and that seems to work fine out of the box for Linux, Win and
macOS.

~~~
mjevans
That and ext4 support (at the very least).

------
gerdesj
"What's interesting to me is that there doesn't seem to be a modern filesystem
that works across all major platforms."

What's interesting to me is that there is no modern filesystem that has a
useful ACL mechanism. Say you have a tree of say 100M files and subdirs: now
give rights at various points - it takes ages.

Your complaint can be worked around by remounting via an intermediary system
and VMs are cheap. Mine is not really a complaint - per se - but a challenge:
Why on earth can NSS (off of the 90s) do rich, recursive perms based on a
"trustee assignment" on the fly but NTFS and Unix's finest not?

~~~
ptman
Nss? Can you elaborate? Point to some documentation?

~~~
pjc50
[https://en.wikipedia.org/wiki/Novell_Storage_Services](https://en.wikipedia.org/wiki/Novell_Storage_Services)

------
joshstrange
I'm using BTRFS on my SSD and while it has some neat features the need to
rebalance periodically or you can "run out of space" while using less than
half the SSD drives me crazy.

~~~
cmurf
Kernel 4.8 and newer have a new ticketed enospc infrastructure that should
avoid this, there's also earlier changes where empty block groups are
deallocated automatically. If you're already using 4.8+ then try 4.12.6 or
newer, which includes commit 4a309747.

Due to past long standing enospc challenges, more experienced users are in the
(bad) habit of micro-managing Btrfs manually with filtered balance, e.g.
-dusage=15 -musage=15. Really we kinda need to stop doing that to find and fix
the remaining edge cases; or worst case upstream should deploy a systemd timer
/ cron job to do these partial balances maybe once a week.

Anyway I don't balance at all on my drives and haven't run into enospc in
quite a while. So chances are you're hitting an edge case, and there's a bug
that needs to be tracked down if you're already using 4.12.6+.

~~~
joshstrange
When I get home I'll have to check. I'm using it via UnRAID so I don't have as
much control over the version I run but they are pretty good about releasing
updates, I'm just bad about applying them and restarting because taking down
Plex is a sin punishable by death lol

~~~
cmurf
Looks like that same 4.12.6 fix is in 4.9.42.

------
rkeene2
Oh the humanity. As someone switching away from BtrFS everywhere, everytime
I've tried it over the years, I can just imagine what a Windows port "feels"
like.

~~~
madez
Why did you switch away from btrfs?

~~~
rkeene2
Terrible performance, constant bugs, data loss.

------
brian_herman
Why is it a reimplementation from scratch? Why not use the linux kernel
source?

~~~
awalton
Why not reimplement it and prove the filesystem _can_ be reimplemented sanely,
and furthermore now has multiple implementations to test the specification
against?

------
sabujp
great, so when do we get xfs natively in windows?

~~~
oneplane
Probably never. We don't even have ext3 or ext4 support, only some bare ext2.
And then there is the dozen or so other filesystems that would be handy to
have. Microsoft doesn't care, they also don't have a business case for it, and
they rather reinvent the wheel instead, using their own fs.

The FOSS community doesn't really care that much either, mostly because Linux
can deal with NTFS, and the other way around happens far less, so no real push
has been made for it.

------
jhack
Anyone know if there are any implementations for OSX/macOS? I tried OpenZFS
and that worked great (tested on an SD card with LZ4 compression) but I didn't
like the memory pressure it was putting on my system, even after tweaking. I
really wish APFS supported transparent compression.

------
lordkrandel
Wasn't BTRFS deprecated?
[https://www.phoronix.com/scan.php?page=news_item&px=Red-
Hat-...](https://www.phoronix.com/scan.php?page=news_item&px=Red-Hat-
Deprecates-Btrfs-Again)

~~~
usefulcat
That just means that RedHat is not interested in offering support for it in
the future.

------
sebazzz
Looks interesting. If this is possible, I wonder why a driver for a much more
common filesystem like ext hasn't picked of (e2fs driver does not count, that
is ext2 only).

Why do you also check the artifacts in?

~~~
metafex
There is ext2fsd
([https://sourceforge.net/projects/ext2fsd](https://sourceforge.net/projects/ext2fsd)).
Worked like a charm last time I had to use it. Last version is even from July.

edit: Unsupported features: 1, journal: log-based operations, external journal
2, EA (extended attributes), ACL support

~~~
seiferteric
Ya I am using this and works with ext3/4 as well, but as you mentioned, there
are some unsupported features. Unfortunately that means that it messes with
some metadata or something and I have to run e2fsck when I reboot into linux.
You can read about it here [https://askubuntu.com/questions/849872/how-can-i-
prevent-win...](https://askubuntu.com/questions/849872/how-can-i-prevent-
windows-10-from-corrupting-the-ext4-superblock-every-time)

------
jsiepkes
Really cool! Does anyone know of the other way around; An open source Windows
next gen FS (ReFS) driver for Linux?

~~~
mdip
I suspect someone is already playing the idea of implementing support for it,
but if NTFS is any indication, it'll take a long time before anything stable
exists.

There's also less motivation for implementing this filesystem in Linux at this
point. It's available only on Server and Windows 10 Workstation (at least for
creating -- I believe Win10 is able to read/work with ReFS in any version).
It's not feature-complete yet[0], missing some important ones like
deduplication. It's quite new, so there isn't a lot of it in the wild,
reducing the need to make a compatible implementation for interoperability
(probably the #1 reason for making a compatible version; #2 being to have a
cool new filesystem with features that don't exist in currently available
offerings). And being proprietary, it will almost certainly be a very
difficult thing to write -- much like NTFS is/was.

[0] Not a show stopper - NTFS evolved over time, as all filesystems seem to.

------
cmurf
Would this be easier, or harder if it were FUSE based?

~~~
Xophmeister
FUSE is a Unix thing. I believe there is a port/similar thing for Windows, but
I guess it would suffer the same kinds of limitations; namely performance,
because everything is translated through userspace. That said, isn't it true
that Windows drivers are userspace-based, anyway?

~~~
invokestatic
All file system drivers must be kernel-mode on Windows. While Windows does
have usermode drivers (UMDF), it's significantly gimped. Mostly just simple
USB drivers or WDDM display drivers.

There have been a few projects to try to bring FUSE-like functionality to
Windows like Dokan but I believe these are still too immature.

~~~
icebraining
WinFsp seems pretty good: [https://github.com/billziss-
gh/winfsp](https://github.com/billziss-gh/winfsp)

------
ehutch79
I thought btrfs was being phased out in linux distros?

~~~
georgyo
The smallest btrfs contributer, redhat, phased out support. They were the only
ones to do so.

~~~
agumonkey
What has been the reaction from the rest of the "team" ? "doesnt matter" ?

~~~
fleetfox
SUSE uses btrfs as default and they posted this
[https://www.suse.com/communities/blog/butter-bei-die-
fische/](https://www.suse.com/communities/blog/butter-bei-die-fische/) as
response

