go-fuse icon indicating copy to clipboard operation
go-fuse copied to clipboard

go-fuse uses FUSE 7.8 on macOS, while OSXFUSE only accepts invalidations when requesting 7.12 or higher

Open EdSchouten opened this issue 5 years ago • 6 comments

During handshaking, OSXFUSE announces protocol version 7.19. go-fuse, however, negotiates to version 7.8 instead (_OUR_MINOR_VERSION == 8). This is inconvenient, as support for sending invalidation requests is only part of protocol versions 7.12 and later. OSXFUSE is pretty strict about that, denying any invalidation requests when negotiating to an older protocol version with error EINVAL.

Experience has shown that it's safe to bump _MINIMUM_MINOR_VERSION and _OUR_MINOR_VERSION to 12, as long as the following structures are updated as well:

  • Attr
  • GetAttrIn
  • OpenIn
  • MknodIn
  • ReadIn
  • WriteIn

Doing so also has the advantage of making the programming experience of go-fuse more consistent between Linux and macOS, as it brings the structure layouts closer in sync.

EdSchouten avatar Nov 08 '19 12:11 EdSchouten

what does "as long as the following structures are updated as well:" mean ?

hanwen avatar Nov 08 '19 14:11 hanwen

Between protocol version 7.8 and 7.12, support for a couple of new features as added:

  • Block sizes
  • GetAttr calls with dedicated file handle values
  • Create with umask
  • File locks

EdSchouten avatar Nov 08 '19 14:11 EdSchouten

i don't have a mac. I'd be grateful if you could contribute a change

hanwen avatar Nov 08 '19 14:11 hanwen

@SnoozeThis https://github.com/hanwen/go-fuse/pull/427

Jille avatar May 14 '22 17:05 Jille

(https://snoozeth.is/5IEmjmYIfW0) I will wait until https://github.com/hanwen/go-fuse/pull/427 is merged and then add a comment.

SnoozeThis avatar May 14 '22 17:05 SnoozeThis

An error occurred while snoozing: Pull request was closed without being merged

SnoozeThis avatar Jul 20 '22 09:07 SnoozeThis

this was fixed with bf8e510474e49a47cd278f0d885ecc86badbd947

hanwen avatar Apr 09 '23 17:04 hanwen