4
\$\begingroup\$

Is there a USB alternative to Mass Storage which works at the filesystem layer?

The goal is to be make a USB device which is mountable as a filesystem, not a block device.

The difference is that working at the filesystem layer would allow the device to coordinate writes to it's backing storage that happen both from the host OS and from the device itself.

Interfacing at the block device layer, means that the device would have to stop writing as soon as it was mounted on the host OS (as SD cards in phones used to).

I'm interested in support in the big three OSs (Linux, OSX and Windows 7+), but not Andriod, iOS or other Unix variants.

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

The Media Transfer Protocol device class is pretty close to what you're looking for. It's not always exposed as a "normal" filesystem in all operating systems, but it does implement operations at the file level, rather than at the block level, like you're asking for.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Yes... but there are apparently a lot of compatibility issues. \$\endgroup\$ Nov 21, 2014 at 23:09
2
\$\begingroup\$

The most direct way to do what you're suggesting is to implement your USB device so that it looks like a network interface to the host system. Internally, your device would "pretend" to be a USB-to-Ethernet adapter talking to a remote filsystem using, say, NFS or CIFS protocol.

The major operating systems already have drivers to support this type of operation, and if you're using some sort of Linux in your device, most of the the code for that side already exists, too.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.