Commit Graph

26 Commits

Author SHA1 Message Date
Antonio SJ Musumeci
8def16a811 Fix infinite loop in mfs action policy 2021-08-29 12:33:52 -04:00
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.
2021-01-14 21:02:10 -05:00
Antonio SJ Musumeci
fc3453932a branches: add per branch minfreespace w/ original value as default
example: /mnt/disk0=RW,1G:/mnt/disk1=RW,2G
2020-09-04 21:04:45 -04:00
Antonio SJ Musumeci
2696079601 break fs.hpp up into separate files 2020-08-18 19:28:36 -04:00
Antonio SJ Musumeci
ec15872a1f cleanup function signatures and definitions 2020-08-18 19:28:36 -04:00
Antonio SJ Musumeci
6cc6524997 change category to enum class 2020-08-18 19:28:36 -04:00
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
2020-06-18 18:54:25 -04:00
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).
2019-01-22 09:21:15 -05:00
Antonio SJ Musumeci
7524e57262 rename NW (no write) to NC (no create) 2018-11-01 23:37:45 -04:00
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.
2018-11-01 23:13:49 -04:00
Antonio SJ Musumeci
9e0ab1f518 misc cleanups 2018-10-24 22:38:36 -04:00
Antonio SJ Musumeci
8a48b74cb4 policy return cleanup 2018-10-15 19:03:02 -04:00
Antonio SJ Musumeci
7e423cd9ce small tweaks to build on Debian kFreeBSD 2016-09-14 08:36:06 -04:00
Antonio SJ Musumeci
43cbd9c670 move size calculations to use uint64_t. fixes #287 2016-07-11 09:04:47 -04:00
Antonio SJ Musumeci
f7d3e8bf47 create lus (least used space) policy. closes #273 2016-05-07 14:59:42 -04:00
Antonio SJ Musumeci
4ecf3c5797 clearly separate usage of statvfs from stat for file existance
Used statvfs to also check for existance vs lstat. On dead symlinks
this resulted in ENOENT making certain functions fail.

closes #239
2016-02-29 23:04:59 -05:00
Antonio SJ Musumeci
5813d1e477 ignore drives mounted as readonly from create policies. closes #224 2016-02-21 14:34:40 -05:00
Antonio SJ Musumeci
b3248a8f78 simplify policies 2016-02-15 02:06:58 -05:00
Antonio SJ Musumeci
6086620e23 use references to srcmounts rather than copies 2016-02-11 21:09:31 -05:00
Antonio SJ Musumeci
242af777be move from MIT to ISC license. closes #194 2016-01-14 16:56:38 -05:00
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.
2015-09-25 15:14:17 -04:00
Antonio SJ Musumeci
f130d07fd8 config get and struct naming cleanup 2015-08-05 09:28:53 -04:00
Antonio SJ Musumeci
b2cd79154a stop auto calculating and storing fullpath in policies 2015-07-03 10:40:47 -04:00
Antonio SJ Musumeci
0c60701b29 create different policies based on category of use 2015-07-03 08:53:36 -04:00
Antonio SJ Musumeci
51b6d3f647 add category to policies so as to distinguish between creates and searches 2015-07-03 08:51:19 -04:00
Antonio SJ Musumeci
6ca43893ea separate policies into individual modules 2015-06-23 22:27:01 -04:00