Wednesday, October 20, 2021

User-space file systems – now for Windows too! Linux Fu: User-space file systems, now also for Windows

Must Read

One of the nice things about the Unix philosophy that Linux inherited is that the filesystem is very modular. That’s good, too, because a typical system might want a choice of filesystems like ext4, reiserfs, btrfs, and even network systems like nfs. Besides that, there are fake file systems like /sys and /dev that help Linux make everything look like a file. The downside is that building a filesystem required changing the kernel or, at least, writing a loadable module. That’s not as hard as it sounds, but it is a little more difficult than writing a normal program. Then came FUSE — file system in user space. This is a single file system module that allows you to create new file systems by writing ordinary code.

sshfs – Mount a remote filesystem using nothing more than ssh access
rclone – Rclone can access and mount many remote file systems
tagassistant – Store files with a unique tag access method
fuse-zip – Mount zip files
gitfs – Mount with git
There are many others. You can find systems to work with, for example, NTFS and a slew of cloud service providers.

MY FAVORITE FUSES
There are several FUSE filesystems that are really useful. Here are some of my favorites:

WHAT ABOUT WINDOWS?
If this is such a great idea, is there a Windows equivalent? Yes, there is. Winfsp looks like a great way to get the same effect under Windows, although it isn’t just plug-and-play compatible with FUSE. There is a FUSE compatibility wrapper that lets you more easily port existing FUSE code. In fact, there are two FUSE wrappers, one for version 2.8 and another for version 3.2.

AND SO?
If you have a favorite FUSE system, it is probably open source and you could try porting it to Windows, if you were so inclined. If you don’t use Windows, and you want to write your own FUSE system, these systems offer you a way to possibly easily move your work to Windows.

This is a newer project, but there is also Dokan which also claims to have a FUSE wrapper for their API. According to the Winfsp-provided benchmarks, though, Winfsp performs better.

For example, you might have a data logger and want to expose its data as a file system. It isn’t that hard to do. There’s a data structure to fill in, and you don’t have to fill all of it in. You provide functions that the data structure points to that read and write things like directories and file data. Here’s an example in C. Or try a C++ wrapper that enables you to write one with even fewer lines of code. The example has just four simple functions.

News Summary:

  • User-space file systems – now for Windows too! Linux Fu: User-space file systems, now also for Windows
  • Check all news and articles from the latest Security news updates.
Disclaimer: If you need to update/edit this article then please visit our help center. For Latest Updates Follow us on Google News

More Articles Like This

Latest News