Antonio SJ Musumeci
46ce28b149
Error when given invalid policy names
3 years ago
Antonio SJ Musumeci
538467b86d
config: rework global config, remove rwlock, make branches RCU like
Also added unit tests. Should have done separately but found a number of bugs.
4 years ago
Antonio SJ Musumeci
fc3453932a
branches: add per branch minfreespace w/ original value as default
example: /mnt/disk0=RW,1G:/mnt/disk1=RW,2G
4 years ago
Antonio SJ Musumeci
046844083f
add {,ep,msp}pfrd policies
Percentage Free Random Distribution
Chooses a random branch based on the available space percentage free.
IE: if branch A has 1G free and branch B has 2G then B should be chosen
twice as often.
4 years ago
Antonio SJ Musumeci
2696079601
break fs.hpp up into separate files
4 years ago
Antonio SJ Musumeci
6cc6524997
change category to enum class
4 years ago
Antonio SJ Musumeci
3ec137c4ad
policy: add "most shared path" policies
Like path preserving but walks back the path till a match is found. Should
cover the usecase where someone wants a "less strict" form of path
preservation.
5 years ago
Antonio SJ Musumeci
54c41c4994
rework config management
* Add standard way to do str2val and val2str conversion
* Add support for a config file
* Add support for reading and writing settings via ioctl
5 years ago
Antonio SJ Musumeci
7a057daa0c
add policy cache for 'open'
A fusepath -> basepath cache for `open` to limit the overhead of FUSE in 'open, read/write, close' patterns (such as Transmission).
6 years ago
Antonio SJ Musumeci
b55ebba4ed
add tagging branches RW/RO/NW
This allows users to tag a branch as readonly or not for writing regardless
of how the filesystem is mounted. Should simplify deployments and offer
more flexibility.
6 years ago
Antonio SJ Musumeci
8a48b74cb4
policy return cleanup
6 years ago
Antonio SJ Musumeci
a7b126cb48
use pragma once in headers
8 years ago
Antonio SJ Musumeci
0fceb8e0a3
add epall and eprand policies
9 years ago
Antonio SJ Musumeci
a93ab6c2f5
add existing path first found policy. closes #289
9 years ago
Antonio SJ Musumeci
43cbd9c670
move size calculations to use uint64_t. fixes #287
9 years ago
Antonio SJ Musumeci
be6341e6f0
create eplus (existing path, least used space) policy. closes #273
9 years ago
Antonio SJ Musumeci
f7d3e8bf47
create lus (least used space) policy. closes #273
9 years ago
Antonio SJ Musumeci
779143f4b6
add minfreespace checks to policy ff's create and remove fwfs
fwfs is now covered by ff with the minfreespace and readonly checks
9 years ago
Antonio SJ Musumeci
7c85cd906a
ff policy tweaks
9 years ago
Antonio SJ Musumeci
d4ec341c4f
remove unnecessary policies
9 years ago
Antonio SJ Musumeci
b3248a8f78
simplify policies
9 years ago
Antonio SJ Musumeci
7bf1ca45e4
add existing path, least free space policy. closes #216
9 years ago
Antonio SJ Musumeci
6086620e23
use references to srcmounts rather than copies
9 years ago
Antonio SJ Musumeci
242af777be
move from MIT to ISC license. closes #194
9 years ago
Antonio SJ Musumeci
eb6d1a1bc2
change to using template for policy class
9 years ago
Antonio SJ Musumeci
5808ab7795
move on enospc when writing feature. closes #141
This feature mimics the standard mhddfs behavior but is more thorough.
If a write fails and the errno is set to ENOSPC then mergerfs will (if
the feature is enabled) attempt to move the file to the drive with
the most free space but only if it has enough room for the file plus
the amount to be written. If that transfer is successful it will then
unlink the original file and attempt the previously failed write again.
The copy includes copying the path and file including the acls, owners,
attributes, extended attributes, and timestamps.
9 years ago
Antonio SJ Musumeci
e377d54c93
add user.mergerfs.policies xattr
9 years ago
Antonio SJ Musumeci
7a93198d4a
forgot to add einval to policy
9 years ago
Antonio SJ Musumeci
bbc75f6ff1
create errno policies for simulating errors. closes #107
9 years ago
Antonio SJ Musumeci
b2cd79154a
stop auto calculating and storing fullpath in policies
10 years ago
Antonio SJ Musumeci
51b6d3f647
add category to policies so as to distinguish between creates and searches
10 years ago
Antonio SJ Musumeci
6ca43893ea
separate policies into individual modules
10 years ago
Antonio SJ Musumeci
3c8f12281f
move policy function type from fs to policy
10 years ago
Antonio SJ Musumeci
8e5b79647b
create lfs policy. closes #73
10 years ago
Antonio SJ Musumeci
58167c3636
first w/ free space policy. closes #72
10 years ago
Antonio SJ Musumeci
c022741ffb
revert removal of 'all' policy and relevant behavior. closes #54
10 years ago
Antonio SJ Musumeci
b411c63df1
Remove 'all' policy and simplify logic
10 years ago
Antonio SJ Musumeci
6c3ff01a0a
pass const strings by reference. closes #33
10 years ago
Antonio SJ Musumeci
aab90b0503
rework policy code
11 years ago
Antonio SJ Musumeci
16fe0cf90c
remove statfs policy
11 years ago
Antonio SJ Musumeci
bb7a966296
initial code commit
11 years ago