Skip to content
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 21 commits into from Sep 10, 2013
Merged

Merge demon-fuse2.9 branch #14

merged 21 commits into from Sep 10, 2013

Conversation

demonfoo
Copy link
Collaborator

Merge FUSE 2.9 feature branch into master.

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.
@ghost ghost assigned demonfoo Sep 10, 2013
demonfoo added a commit that referenced this pull request Sep 10, 2013
@demonfoo demonfoo merged commit 683bef1 into master Sep 10, 2013
@demonfoo demonfoo deleted the demon-fuse2.9 branch September 10, 2013 13:13
@dpavlin
Copy link
Owner

dpavlin commented 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
Labels
None yet
Projects
None yet
2 participants