mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-03-30 23:15:13 +08:00
Merge pull request #473 from trapexit/version
version bumps and calculation fixes
This commit is contained in:
commit
89200a0ab8
14
Makefile
14
Makefile
@ -84,7 +84,7 @@ help:
|
|||||||
@echo "usage: make"
|
@echo "usage: make"
|
||||||
@echo "make XATTR_AVAILABLE=0 - to build program without xattrs functionality (auto discovered otherwise)"
|
@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
|
cd libfuse && make
|
||||||
$(CXX) $(CFLAGS) $(OBJ) -o $@ libfuse/lib/.libs/libfuse.a -ldl $(LDFLAGS)
|
$(CXX) $(CFLAGS) $(OBJ) -o $@ libfuse/lib/.libs/libfuse.a -ldl $(LDFLAGS)
|
||||||
|
|
||||||
@ -102,15 +102,7 @@ ifeq ($(GIT_REPO),1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
version:
|
version:
|
||||||
ifeq ($(GIT_REPO),1)
|
tools/update-version
|
||||||
$(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
|
|
||||||
|
|
||||||
obj/obj-stamp:
|
obj/obj-stamp:
|
||||||
$(MKDIR) -p obj
|
$(MKDIR) -p obj
|
||||||
@ -229,6 +221,6 @@ endif
|
|||||||
libfuse/lib/.libs/libfuse.a: libfuse_Makefile
|
libfuse/lib/.libs/libfuse.a: libfuse_Makefile
|
||||||
cd libfuse && $(MAKE)
|
cd libfuse && $(MAKE)
|
||||||
|
|
||||||
.PHONY: all clean install help
|
.PHONY: all clean install help version
|
||||||
|
|
||||||
-include $(DEPS)
|
-include $(DEPS)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
% mergerfs(1) mergerfs user manual
|
% mergerfs(1) mergerfs user manual
|
||||||
% Antonio SJ Musumeci <trapexit@spawn.link>
|
% Antonio SJ Musumeci <trapexit@spawn.link>
|
||||||
% 2017-05-26
|
% 2018-03-09
|
||||||
|
|
||||||
# NAME
|
# NAME
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
AC_INIT(fuse, 2.9.7)
|
AC_INIT(fuse, 2.9.8-mergerfs)
|
||||||
|
|
||||||
AC_PREREQ(2.59d)
|
AC_PREREQ(2.59d)
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
.\"t
|
.\"t
|
||||||
.\" Automatically generated by Pandoc 1.16.0.2
|
.\" 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
|
.hy
|
||||||
.SH NAME
|
.SH NAME
|
||||||
.PP
|
.PP
|
||||||
@ -85,7 +85,7 @@ These options seem to provide the best performance.
|
|||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
\f[B]allow_other\f[]: a libfuse option which allows users besides the
|
\f[B]allow_other\f[]: a libfuse option which allows users besides the
|
||||||
one which ran mergerfs to see the filesystem.
|
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
|
.IP \[bu] 2
|
||||||
\f[B]direct_io\f[]: causes FUSE to bypass caching which can increase
|
\f[B]direct_io\f[]: causes FUSE to bypass caching which can increase
|
||||||
write speeds at the detriment of reads.
|
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
|
While not a default it is generally recommended it be enabled so that
|
||||||
hard linked files share the same inode value.
|
hard linked files share the same inode value.
|
||||||
.IP \[bu] 2
|
.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
|
\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
|
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.
|
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
|
.IP
|
||||||
.nf
|
.nf
|
||||||
\f[C]
|
\f[C]
|
||||||
#\ <file\ system>\ \ \ \ \ \ \ \ <mount\ point>\ \ <type>\ \ \ \ \ \ \ \ \ <options>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <dump>\ \ <pass>
|
#\ <file\ system>\ \ \ \ \ \ \ \ <mount\ point>\ \ <type>\ \ \ \ \ \ \ \ \ <options>\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ <dump>\ \ <pass>
|
||||||
/mnt/disk*:/mnt/cdrom\ \ /media/drives\ \ fuse.mergerfs\ \ defaults,allow_other,use_ino\ \ 0\ \ \ \ \ \ \ 0
|
/mnt/disk*:/mnt/cdrom\ \ /media/drives\ \ fuse.mergerfs\ \ defaults,allow_other,use_ino,hard_remove\ \ 0\ \ \ \ \ \ \ 0
|
||||||
\f[]
|
\f[]
|
||||||
.fi
|
.fi
|
||||||
.PP
|
.PP
|
||||||
@ -981,8 +987,8 @@ done
|
|||||||
.fi
|
.fi
|
||||||
.SH TIPS / NOTES
|
.SH TIPS / NOTES
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
The recommended options are
|
The recommended base options are
|
||||||
\f[B]defaults,allow_other,direct_io,use_ino\f[].
|
\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
|
(\f[B]use_ino\f[] will only work when used with mergerfs 2.18.0 and
|
||||||
above.)
|
above.)
|
||||||
.IP \[bu] 2
|
.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
|
Use \f[C]mergerfs.fsck\f[] to audit the drive for out of sync
|
||||||
permissions.
|
permissions.
|
||||||
.IP \[bu] 2
|
.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.
|
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.
|
It is not currently supported in FUSE w/ \f[C]direct_io\f[] enabled.
|
||||||
Enabling \f[C]dropcacheonclose\f[] is recommended when
|
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
|
efficiently determine whether to scan for new content rather than simply
|
||||||
performing a full scan.
|
performing a full scan.
|
||||||
If using the default \f[B]getattr\f[] policy of \f[B]ff\f[] its possible
|
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
|
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.
|
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[].
|
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
|
Should be placed after \f[C]defaults\f[] if it is used since it will
|
||||||
turn them on.
|
turn them on.
|
||||||
This however is not guaranteed to work.
|
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
|
.SH FAQ
|
||||||
.SS Can mergerfs be used with drives which already have data / are in
|
.SS Can mergerfs be used with drives which already have data / are in
|
||||||
use?
|
use?
|
||||||
@ -1363,6 +1386,13 @@ While aufs can offer better peak performance mergerfs provides more
|
|||||||
configurability and is generally easier to use.
|
configurability and is generally easier to use.
|
||||||
mergerfs however does not offer the overlay / copy\-on\-write (CoW)
|
mergerfs however does not offer the overlay / copy\-on\-write (CoW)
|
||||||
features which aufs and overlayfs have.
|
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 /
|
.SS Why use mergerfs over LVM/ZFS/BTRFS/RAID0 drive concatenation /
|
||||||
striping?
|
striping?
|
||||||
.PP
|
.PP
|
||||||
@ -1520,14 +1550,24 @@ email: trapexit\@spawn.link
|
|||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
twitter: https://twitter.com/_trapexit
|
twitter: https://twitter.com/_trapexit
|
||||||
.SS Support development
|
.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
|
.IP \[bu] 2
|
||||||
BitCoin: 12CdMhEPQVmjz3SSynkAEuD5q9JmhTDCZA
|
Bitcoin (BTC): 12CdMhEPQVmjz3SSynkAEuD5q9JmhTDCZA
|
||||||
|
.IP \[bu] 2
|
||||||
|
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
|
.IP \[bu] 2
|
||||||
PayPal: trapexit\@spawn.link
|
PayPal: trapexit\@spawn.link
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
Patreon: https://www.patreon.com/trapexit
|
Patreon: https://www.patreon.com/trapexit
|
||||||
.IP \[bu] 2
|
|
||||||
Gratipay: https://gratipay.com/~trapexit
|
|
||||||
.SH LINKS
|
.SH LINKS
|
||||||
.IP \[bu] 2
|
.IP \[bu] 2
|
||||||
http://github.com/trapexit/mergerfs
|
http://github.com/trapexit/mergerfs
|
||||||
|
@ -148,6 +148,8 @@ void
|
|||||||
_getxattr_controlfile_version(string &attrvalue)
|
_getxattr_controlfile_version(string &attrvalue)
|
||||||
{
|
{
|
||||||
attrvalue = MERGERFS_VERSION;
|
attrvalue = MERGERFS_VERSION;
|
||||||
|
if(attrvalue.empty())
|
||||||
|
attrvalue = "unknown_possible_problem_with_build";
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -305,15 +305,6 @@ usage(void)
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
void
|
|
||||||
version(void)
|
|
||||||
{
|
|
||||||
std::cout << "mergerfs version: "
|
|
||||||
<< MERGERFS_VERSION
|
|
||||||
<< std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
option_processor(void *data,
|
option_processor(void *data,
|
||||||
@ -344,7 +335,9 @@ option_processor(void *data,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MERGERFS_OPT_VERSION:
|
case MERGERFS_OPT_VERSION:
|
||||||
version();
|
std::cout << "mergerfs version: "
|
||||||
|
<< (MERGERFS_VERSION[0] ? MERGERFS_VERSION : "unknown")
|
||||||
|
<< std::endl;
|
||||||
fuse_opt_add_arg(outargs,"--version");
|
fuse_opt_add_arg(outargs,"--version");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
16
tools/update-version
Executable file
16
tools/update-version
Executable file
@ -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…
x
Reference in New Issue
Block a user