When compiling, it met this error:
>In file included from /usr/local/include/fuse/fuse.h:19:0,
> from client/fuse_ll.cc:17:
>/usr/local/include/fuse/fuse_common.h:474:4: error: #error only API
>version 30 or greater is supported
Update FUSE_USE_VERSION from 26 to 30.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
- In "includes", inttypes.h was cluttering the system's one. This caused
random build errors on some systems/in some conditions. Renaming it.
- Add emergency defs of PRI*64 headers when int_types.h does not define
them (which, unfortunately, can happen on some systems).
Signed-off-by: Roald J. van Loon <roaldvanloon@gmail.com>
Remove uninitialized usage of 'int i' as i++ from 'for' loop.
The variale 'i' is never used in this loop and initialized
before the next use with 0.
Related warning from clang++:
rbd_fuse/rbd-fuse.c:141:36: warning: variable 'i' is uninitialized
when used here [-Wuninitialized]
for (im = rbd_images; im != NULL; i++, im = im->next) {
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix printf format for off_t and size_t to print the same on 32 and 64bit
systems. Use PRI* macros from inttypes.h.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix usage of conn->want and FUSE_CAP_BIG_WRITES. Both need libfuse
version >= 2.8. Encapsulate the related code line into a check for
the needed FUSE_VERSION as already done in ceph-fuse in some cases.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Currently written in C on FUSE hi-level interfaces, so error reporting
could be better. No serious work done for performance. But it's
usable as it stands.
Specify -c <conf> and a mountpoint, and images show up as files in
that mountpoint. You can create new images; they'll be created
with attributes stored in xattrs:
user.rbdfuse.imagesize: default 1GB
user.rbdfuse.imageorder: default 22
user.rbdfuse.imagefeatures: default 1 (layering)
Images may be truncated or extended by rewriting. Currently
once an image is opened, it's not closed, so it can't be deleted
or changed outside of the fuse path.
Signed-off-by: Dan Mick <dan.mick@inktank.com>