Browse Source

Merge pull request #473 from trapexit/version

version bumps and calculation fixes
pull/474/head 2.24.0
trapexit 7 years ago
committed by GitHub
parent
commit
89200a0ab8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      Makefile
  2. 2
      README.md
  3. 2
      libfuse/configure.ac
  4. 62
      man/mergerfs.1
  5. 2
      src/getxattr.cpp
  6. 13
      src/option_parser.cpp
  7. 16
      tools/update-version

14
Makefile

@ -84,7 +84,7 @@ help:
@echo "usage: make"
@echo "make XATTR_AVAILABLE=0 - to build program without xattrs functionality (auto discovered otherwise)"
$(TARGET): src/version.hpp obj/obj-stamp libfuse/lib/.libs/libfuse.a $(OBJ)
$(TARGET): version obj/obj-stamp libfuse/lib/.libs/libfuse.a $(OBJ)
cd libfuse && make
$(CXX) $(CFLAGS) $(OBJ) -o $@ libfuse/lib/.libs/libfuse.a -ldl $(LDFLAGS)
@ -102,15 +102,7 @@ ifeq ($(GIT_REPO),1)
endif
version:
ifeq ($(GIT_REPO),1)
$(eval VERSION := $(shell $(GIT) describe --always --tags --dirty))
@echo "$(VERSION)" > VERSION
endif
src/version.hpp: version
$(eval VERSION := $(shell cat VERSION))
@echo "#pragma once" > src/version.hpp
@echo "static const char MERGERFS_VERSION[] = \"$(VERSION)\";" >> src/version.hpp
tools/update-version
obj/obj-stamp:
$(MKDIR) -p obj
@ -229,6 +221,6 @@ endif
libfuse/lib/.libs/libfuse.a: libfuse_Makefile
cd libfuse && $(MAKE)
.PHONY: all clean install help
.PHONY: all clean install help version
-include $(DEPS)

2
README.md

@ -1,6 +1,6 @@
% mergerfs(1) mergerfs user manual
% Antonio SJ Musumeci <trapexit@spawn.link>
% 2017-05-26
% 2018-03-09
# NAME

2
libfuse/configure.ac

@ -1,4 +1,4 @@
AC_INIT(fuse, 2.9.7)
AC_INIT(fuse, 2.9.8-mergerfs)
AC_PREREQ(2.59d)
AC_CONFIG_MACRO_DIR([m4])

62
man/mergerfs.1

@ -1,7 +1,7 @@
.\"t
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "mergerfs" "1" "2017\-05\-26" "mergerfs user manual" ""
.TH "mergerfs" "1" "2018\-03\-09" "mergerfs user manual" ""
.hy
.SH NAME
.PP
@ -85,7 +85,7 @@ These options seem to provide the best performance.
.IP \[bu] 2
\f[B]allow_other\f[]: a libfuse option which allows users besides the
one which ran mergerfs to see the filesystem.
This is is required for most use\-cases.
This is required for most use\-cases.
.IP \[bu] 2
\f[B]direct_io\f[]: causes FUSE to bypass caching which can increase
write speeds at the detriment of reads.
@ -115,6 +115,12 @@ than libfuse.
While not a default it is generally recommended it be enabled so that
hard linked files share the same inode value.
.IP \[bu] 2
\f[B]hard_remove\f[]: force libfuse to immedately remove files when
unlinked.
This can have a very minor performance impact in some cases but is
generally recommended since there are subtle race conditions which can
occur when removing large sets of files & directories.
.IP \[bu] 2
\f[B]dropcacheonclose=true|false\f[]: when a file is requested to be
closed call \f[C]posix_fadvise\f[] on it first to instruct the kernel
that we no longer need the data and it can drop its cache.
@ -207,8 +213,8 @@ tools use \f[B]/etc/fstab\f[].
.IP
.nf
\f[C]
#\ <file\ system>\ \ \ \ \ \ \ \ <mount\ point>\ \ <type>\ \ \ \ \ \ \ \ \ <options>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <dump>\ \ <pass>
/mnt/disk*:/mnt/cdrom\ \ /media/drives\ \ fuse.mergerfs\ \ defaults,allow_other,use_ino\ \ 0\ \ \ \ \ \ \ 0
#\ <file\ system>\ \ \ \ \ \ \ \ <mount\ point>\ \ <type>\ \ \ \ \ \ \ \ \ <options>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <dump>\ \ <pass>
/mnt/disk*:/mnt/cdrom\ \ /media/drives\ \ fuse.mergerfs\ \ defaults,allow_other,use_ino,hard_remove\ \ 0\ \ \ \ \ \ \ 0
\f[]
.fi
.PP
@ -981,8 +987,8 @@ done
.fi
.SH TIPS / NOTES
.IP \[bu] 2
The recommended options are
\f[B]defaults,allow_other,direct_io,use_ino\f[].
The recommended base options are
\f[B]defaults,allow_other,direct_io,use_ino,hard_remove\f[].
(\f[B]use_ino\f[] will only work when used with mergerfs 2.18.0 and
above.)
.IP \[bu] 2
@ -999,7 +1005,7 @@ all the underlying directories.
Use \f[C]mergerfs.fsck\f[] to audit the drive for out of sync
permissions.
.IP \[bu] 2
Do \f[I]not\f[] use \f[C]direct_io\f[] if you expect applications (such
Do \f[B]not\f[] use \f[C]direct_io\f[] if you expect applications (such
as rtorrent) to mmap (http://linux.die.net/man/2/mmap) files.
It is not currently supported in FUSE w/ \f[C]direct_io\f[] enabled.
Enabling \f[C]dropcacheonclose\f[] is recommended when
@ -1019,7 +1025,7 @@ can use directory mtime (http://linux.die.net/man/2/stat) to more
efficiently determine whether to scan for new content rather than simply
performing a full scan.
If using the default \f[B]getattr\f[] policy of \f[B]ff\f[] its possible
\f[B]Kodi\f[] will miss an update on account of it returning the first
those programs will miss an update on account of it returning the first
directory found\[aq]s \f[B]stat\f[] info and its a later directory on
another mount which had the \f[B]mtime\f[] recently updated.
To fix this you will want to set \f[B]func.getattr=newest\f[].
@ -1285,6 +1291,23 @@ mergerfs\[aq] options.
Should be placed after \f[C]defaults\f[] if it is used since it will
turn them on.
This however is not guaranteed to work.
.SS rm: fts_read failed: No such file or directory
.PP
Not \f[I]really\f[] a bug.
The FUSE library will move files when asked to delete them as a way to
deal with certain edge cases and then later delete that file when its
clear the file is no longer needed.
This however can lead to two issues.
One is that these hidden files are noticed by \f[C]rm\ \-rf\f[] or
\f[C]find\f[] when scanning directories and they may try to remove them
and they might have disappeared already.
There is nothing \f[I]wrong\f[] about this happening but it can be
annoying.
The second issue is that a directory might not be able to removed on
account of the hidden file being still there.
.PP
Using the \f[B]hard_remove\f[] option will make it so these temporary
files are not used and files are deleted immedately.
.SH FAQ
.SS Can mergerfs be used with drives which already have data / are in
use?
@ -1363,6 +1386,13 @@ While aufs can offer better peak performance mergerfs provides more
configurability and is generally easier to use.
mergerfs however does not offer the overlay / copy\-on\-write (CoW)
features which aufs and overlayfs have.
.SS Why use mergerfs over unionfs?
.PP
UnionFS is more like aufs then mergerfs in that it offers overlay / CoW
features.
If you\[aq]re just looking to create a union of drives and want
flexibility in file/directory placement then mergerfs offers that
whereas unionfs is more for overlaying RW filesystems over RO ones.
.SS Why use mergerfs over LVM/ZFS/BTRFS/RAID0 drive concatenation /
striping?
.PP
@ -1520,14 +1550,24 @@ email: trapexit\@spawn.link
.IP \[bu] 2
twitter: https://twitter.com/_trapexit
.SS Support development
.PP
This software is free to use and released under a very liberal license.
That said if you like this software and would like to support its
development donations are welcome.
.IP \[bu] 2
Bitcoin (BTC): 12CdMhEPQVmjz3SSynkAEuD5q9JmhTDCZA
.IP \[bu] 2
BitCoin: 12CdMhEPQVmjz3SSynkAEuD5q9JmhTDCZA
Bitcoin Cash (BCH): 1AjPqZZhu7GVEs6JFPjHmtsvmDL4euzMzp
.IP \[bu] 2
Ethereum (ETH): 0x09A166B11fCC127324C7fc5f1B572255b3046E94
.IP \[bu] 2
Litecoin (LTC): LXAsq6yc6zYU3EbcqyWtHBrH1Ypx4GjUjm
.IP \[bu] 2
Ripple (XRP): rNACR2hqGjpbHuCKwmJ4pDpd2zRfuRATcE
.IP \[bu] 2
PayPal: trapexit\@spawn.link
.IP \[bu] 2
Patreon: https://www.patreon.com/trapexit
.IP \[bu] 2
Gratipay: https://gratipay.com/~trapexit
.SH LINKS
.IP \[bu] 2
http://github.com/trapexit/mergerfs

2
src/getxattr.cpp

@ -148,6 +148,8 @@ void
_getxattr_controlfile_version(string &attrvalue)
{
attrvalue = MERGERFS_VERSION;
if(attrvalue.empty())
attrvalue = "unknown_possible_problem_with_build";
}
static

13
src/option_parser.cpp

@ -305,15 +305,6 @@ usage(void)
<< std::endl;
}
static
void
version(void)
{
std::cout << "mergerfs version: "
<< MERGERFS_VERSION
<< std::endl;
}
static
int
option_processor(void *data,
@ -344,7 +335,9 @@ option_processor(void *data,
break;
case MERGERFS_OPT_VERSION:
version();
std::cout << "mergerfs version: "
<< (MERGERFS_VERSION[0] ? MERGERFS_VERSION : "unknown")
<< std::endl;
fuse_opt_add_arg(outargs,"--version");
break;

16
tools/update-version

@ -0,0 +1,16 @@
#!/bin/sh
GIT=$(which git)
if [ "${GIT}" = "" ]; then
exit 0
fi
VERSION=$(git describe --always --tags --dirty)
echo -n "${VERSION}" > VERSION
grep -q \"${VERSION}\" src/version.hpp
RV=$?
if [ $RV -ne 0 ]; then
echo "#pragma once" > src/version.hpp
echo "static const char MERGERFS_VERSION[] = \"${VERSION}\";" >> src/version.hpp
fi
Loading…
Cancel
Save