New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge demon-fuse2.9 branch #14
Merged
Merged
Conversation
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
Since the FUSE includes don't have a define for the micro version number, and the 'fallocate' operation is new as of FUSE 2.9.1, add a bit to the Makefile.PL to split up the version number into major, minor and micro numbers and add -D defines for the build to pass them in. Altered fuse_version() to provide separate major/minor/micro version numbers if called in array context. Added support for fallocate() and flock(). Also stubbed out read_buf() and write_buf(). Added support for the 'nopath' and 'utime_omit_ok' flags. Also, added implementations to access the UTIME_NOW and UTIME_OMIT constants. Added basic docs for fallocate() and flock(). Added change note to Changes file.
Exported UTIME_NOW and UTIME_OMIT under 'ALL' and 'utime' tags. Implemented read_buf() operation, and added an implementation in example/loopback.pl. Only tested with memory, not with FD based mode. Fixed fallocate() wrapper to use the correct callback number. Altered testing infrastructure to pass logfile name to loopback.pl, and have it open the logfile, instead of trying to open it in test/s/mount.t, as since loopback.pl's daemonize() reopens stdout/stderr only /dev/null normally, the logfile is worthless. This makes it functional again.
Added accessors for the FUSE_BUF_* constants, and exported them under the 'zerocopy' and 'all' tags. Removed unnecessary detritus from the read_buf() wrapper.
If a handler function with a name that isn't known is supplied to Fuse::main(), instead of croak, use carp. There are legitimate situations where a function (like one of the FUSE 2.8/2.9 specific ops) is passed, but isn't available due to the underlying libfuse being too old to use them, so they're just not available, and it's better to whine but not die over them.
Made alterations to read_buf() wrapper to use an array, instead of a single item, to accommodate different strategies. Altered loopback.pl to support write_buf, and to use the modified read_buf semantics. Also changed open() use in daemonize() inside loopback.pl to 3-operand calling syntax, because it's just the right thing to do.
Fix up read_buf docs. Change order of arguments for write_buf, to make it more consistent with read_buf. Fix up loopback.pl to use the new argument order for write_buf.
Instead of using newSVpvn(), make an SV around the passed buffer, so we can skip unnecessary data copying. This makes the write buffer SV read-only. The only possible problem is if the write() implementation tries to hang onto the SV; I'm thinking about making a "zerocopy" option flag and using this path only when that option is enabled.
Cast buf as (char *) to prevent a warning in the write() wrapper. Handle positive returns properly in read_buf(). Returning 0 seems to work okay, but we're supposed to return the total read size. An extra little bit for the changelog.
The 'mem' member in the destination element should only be updated if that element is a memory buffer, not an FD buffer.
Use heredoc instead of quoted text for about, and improve output.
Small tweak to README.
ghost
assigned demonfoo
Sep 10, 2013
Thanks for your good work. I can confirm that it works nicely for me with fuse 2.9.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge FUSE 2.9 feature branch into master.