-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
So it turns out that some people want to use libfuse 2 still, even though it's been obsoleted by libfuse 3 for nearly a decade. This turns out to be not terribly difficult! There are two major changess that impact us (ignoring the options- parsing thing fixed in the last commit): - libfuse 2 has a 'channel' abstraction in which the fd to the kernel is nested. libfuse 3 dropped it because it turned out there was only ever one of them so the abstraction was redundant, but that makes it easy for us to pick the fd out: we can grab the fuse_session_next_chan() without ever worrying that we might have to call that function more than once or deal with more than one channel. This changes the main read loop() enough that we can just implement it twice. - that's good because of another annoying difference: OL carries a NUMA-aware API which actually changes the public API of libfuse's fuse_session_receive_buf function. This is hard to check for because the extra functions you need to call to actually turn this behaviour on were never added to the symbol version file, so you can't link with them. So we detect these functions using the macros just added to do straight compilation checking, with no linking, and use their presence as a clue that fuse_session_receive_buf has the NUMA-aware API change. (We don't use the NUMA stuff: it's only useful if you're using a multithreaded event loop, which we're not.) We currently handle systems with both libfuse 2 and 3 by checking that libfuse 3 is available, and if not, falling back to libfuse 2 (and if that isn't present either you get a link failure). Thus libfuse 3 is preferred if both are present. There is an additional libfuse2=yes build option if you want to force the use of the old libfuse even when the newer one is present. One extra bit of complexity: we call pkg-config on whatever libfuse we hope is present, and this emits very noisy multi-line error messages if it isn't present: so suppress execution of all the dtprobed build rules until the tree is configured and we have some idea of which libfuse is there. Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
1 parent
c47002c
commit 7ff38c7
Showing
5 changed files
with
133 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters