Antonio SJ Musumeci
1c7de2d83e
fix minor integer casting issues
2015-10-13 23:33:33 -04:00
Antonio SJ Musumeci
58446f9124
misc fixes to compile on older platforms
2015-10-12 19:51:57 -04:00
Antonio SJ Musumeci
40f569be37
rewrite gid cache system
...
Uses fixed storage so as to not require C++11 local thread storage or memory allocation.
2015-10-11 15:01:57 -04:00
Antonio SJ Musumeci
53e3284b26
remove usage of UINT32_MAX macro
2015-10-01 10:26:12 -04:00
Antonio SJ Musumeci
09ffc8c903
provide usage text and version info. closes #146
2015-09-29 07:29:10 -04: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
a960a7ef46
cleanup controlfile manipulation
2015-09-14 22:40:49 -04:00
Antonio SJ Musumeci
e0cf97261c
include default_permissions in default arguments
...
closes #130
2015-09-14 22:12:24 -04:00
Antonio SJ Musumeci
3163258a33
make changing credentials opportunistic + per thread setgroups cache
...
closes #129,#131
2015-09-14 19:00:07 -04:00
Antonio SJ Musumeci
ce9352987c
realpath'ize all source mount points. closes #117
2015-09-06 18:24:36 -04:00
Antonio SJ Musumeci
2d899479c3
fix non-suffixed setxattr of user.mergerfs.minfreespace
2015-09-05 23:08:11 -04:00
Antonio SJ Musumeci
b22528bac4
add user.mergerfs.version xattr
2015-09-05 21:48:15 -04:00
Antonio SJ Musumeci
e377d54c93
add user.mergerfs.policies xattr
2015-09-05 19:49:08 -04:00
Antonio SJ Musumeci
8178bf518c
refactor and simplify getxattr for user.mergerfs.\*
2015-09-03 16:56:54 -04:00
Antonio SJ Musumeci
bc77b0fd2a
add minfreespace check to epmfs create policy
2015-09-01 22:28:35 -04:00
Antonio SJ Musumeci
1f1e481075
rework rename
...
Return EXDEV if directories of tragets differ. If the old and new path exist in the same directory first rename each old found by the policy and then unlink/rmdir any new on a drive which didn't rename. The unlink/rmdir will occur only if there were no rename errors. Any failures of unlink/rmdir are ignored. The last rename error is returned.
2015-09-01 18:32:31 -04:00
Antonio SJ Musumeci
7a93198d4a
forgot to add einval to policy
2015-08-30 17:08:24 -04:00
Antonio SJ Musumeci
bbc75f6ff1
create errno policies for simulating errors. closes #107
2015-08-27 22:38:23 -04:00
Antonio SJ Musumeci
126df0fbf1
fix epmfs failing to pick the existing path. closes #102
2015-08-24 15:51:17 -04:00
Antonio SJ Musumeci
8767db971a
remove unused variable
2015-08-05 11:59:39 -04:00
Antonio SJ Musumeci
838c081b8c
Merge pull request #94 from trapexit/config-cleanup
...
config get and struct naming cleanup
2015-08-05 11:51:33 -04:00
Antonio SJ Musumeci
267f2d291c
move requesting of FUSE flags to init from cli args
2015-08-05 11:50:21 -04:00
Antonio SJ Musumeci
f130d07fd8
config get and struct naming cleanup
2015-08-05 09:28:53 -04:00
Antonio SJ Musumeci
52d80299b5
passthrough ioctl args without processing. closes #90
2015-08-05 09:18:34 -04:00
Antonio SJ Musumeci
c60d03831f
use gte rather than gt for mtime comparisons. fixes #91
2015-08-04 14:03:44 -04:00
Antonio SJ Musumeci
80b2c35175
add creation of full path for open
2015-07-16 16:57:01 -04:00
Antonio SJ Musumeci
983fa9100d
change fuse functions to use the fuse namespace
2015-07-15 10:53:13 -04:00
Antonio SJ Musumeci
efadd2c8d8
Merge pull request #86 from trapexit/readdir-cleanup
...
remove unused readdir function
2015-07-15 10:51:43 -04:00
Antonio SJ Musumeci
e5359ebd05
remove unused readdir function
2015-07-15 10:50:25 -04:00
Antonio SJ Musumeci
f00cd1467e
use pthread_getugid_np instead of gete{u,g}id on OSX. fixes #84
2015-07-15 10:39:47 -04:00
Antonio SJ Musumeci
4d605388a4
ignore ENOTSUP errors when cloning paths. fixes #82
2015-07-13 12:20:19 -04:00
Antonio SJ Musumeci
aafc1e9394
add str to size_t conversion code
2015-07-05 21:02:42 -04:00
Antonio SJ Musumeci
b3109ac506
add minfreespace to xattr interface
2015-07-05 19:36:23 -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
Antonio SJ Musumeci
3c8f12281f
move policy function type from fs to policy
2015-06-23 00:24:14 -04:00
Antonio SJ Musumeci
2bd44568a1
move Path object to separate file
2015-06-22 23:22:51 -04:00
Antonio SJ Musumeci
8e5b79647b
create lfs policy. closes #73
2015-06-22 11:06:36 -04:00
Antonio SJ Musumeci
58167c3636
first w/ free space policy. closes #72
2015-06-22 10:53:39 -04:00
Antonio SJ Musumeci
ccb22c1fbe
create minfreespace option. closes #71
2015-06-22 09:59:16 -04:00
Antonio SJ Musumeci
45b73e53be
fix calling of lgetxattr. closes #68
2015-06-04 09:31:43 -04:00
Antonio SJ Musumeci
5fb277529f
attempt to set priority to -10 on startup. closes #65
2015-03-17 20:39:20 -04:00
Antonio SJ Musumeci
4b204b8fba
restrict who can setxattr the pseudo file. closes #64
2015-03-13 20:31:02 -04:00
Antonio SJ Musumeci
33c837a560
provide 'defaults' option. closes #58
2015-03-11 18:21:28 -04:00
Antonio SJ Musumeci
951b22b671
set FUSE subtype to 'mergerfs'. closes #59
2015-03-11 14:00:47 -04:00
Antonio SJ Musumeci
08366a35be
match cli options to xattrs
2015-03-10 18:44:45 -04:00
Antonio SJ Musumeci
91671d7364
remove FileInfo and keep only file descriptor
2015-03-05 22:15:54 -05:00
Antonio SJ Musumeci
c022741ffb
revert removal of 'all' policy and relevant behavior. closes #54
2015-03-05 21:01:22 -05:00
Antonio SJ Musumeci
12f393a55e
per FUSE function policies. closes #52 , #53
2015-02-23 20:02:50 -05:00
Antonio SJ Musumeci
283a2b2285
Try RLIMIT_INFINITY first, then cur = max, then loop and try to increase till error. closes #50
2015-02-17 11:46:54 -05:00
Antonio SJ Musumeci
1a1c9db37b
close file after getting ioc flags. closes #48
2015-02-17 00:28:27 -05:00
Antonio SJ Musumeci
d30cae217b
add user.mergerfs.allpaths and user.mergerfs.relpath to getxattr
2015-02-07 18:27:47 -05:00
Antonio SJ Musumeci
2e95c6e78e
merge action and search category
2015-02-05 18:23:01 -05:00
Antonio SJ Musumeci
b411c63df1
Remove 'all' policy and simplify logic
2015-02-02 23:59:45 -05:00
Antonio SJ Musumeci
1f90203025
use standard platform macros. closes #43
2015-02-02 21:30:31 -05:00
Antonio SJ Musumeci
c2cbb93c25
elevate privileges when calling clonepath. closes #41
2015-01-29 14:28:38 -05:00
Antonio SJ Musumeci
6276ce9779
handle EEXIST while cloning a path. closes #40
2015-01-29 14:28:38 -05:00
Antonio SJ Musumeci
d1f3bd82e8
add clonepath tool
2015-01-29 14:28:34 -05:00
Antonio SJ Musumeci
031b87f674
slight refactoring
2015-01-27 16:08:13 -05:00
Antonio SJ Musumeci
5dd072962b
remove longest common prefix from fsname. closes #38
2015-01-22 16:30:12 -05:00
Antonio SJ Musumeci
90b0fcd5f5
Merge pull request #35 from trapexit/dttoif
...
provide stat to readdir filler. closes #32
2014-11-10 21:11:17 -05:00
Antonio SJ Musumeci
6c3ff01a0a
pass const strings by reference. closes #33
2014-11-10 21:01:20 -05:00
Antonio SJ Musumeci
d7ede20abe
provide stat to readdir filler. closes #32
2014-11-10 07:41:15 -05:00
Antonio SJ Musumeci
613b996296
support RHEL6. closes #29
2014-11-04 13:52:04 -05:00
Antonio SJ Musumeci
075d62d647
add support for ioctl on directories. closes #27
2014-09-26 18:33:20 -04:00
Antonio SJ Musumeci
cfe7609bcd
find functions now return errors. closes #24
2014-08-23 11:44:40 -04:00
Antonio SJ Musumeci
8f35406000
use lstat to confirm file existance instead of eaccess. closes #25
2014-08-22 17:54:38 -04:00
Antonio SJ Musumeci
4ea1adbf96
use f_frsize rather than f_bsize for mfs calculations. closes #26
2014-08-22 17:06:59 -04:00
Antonio SJ Musumeci
7e9ccd0317
support runtime setting of srcmounts. closes #12
2014-08-08 10:20:27 -04:00
Antonio SJ Musumeci
b82db46e29
getxattr for user.mergerfs.{base,full}path returns the source paths. closes #23
2014-07-30 15:26:49 -04:00
Antonio SJ Musumeci
7b0d703f00
only allow manipulation of runtime settings via xattrs. closes #22
2014-07-29 09:26:11 -04:00
Antonio SJ Musumeci
45cec2d301
use int instead of long for ioctl. fixes #21
2014-07-22 07:07:25 -04:00
Antonio SJ Musumeci
2295714548
on ENOENT try cloning the dest path to source drive. closes #20
2014-07-07 21:54:38 -04:00
Antonio SJ Musumeci
ccb0ac1463
generate the controlfile data on the fly. closes #19
2014-06-25 15:17:26 -04:00
Antonio SJ Musumeci
15a0416eed
don't flush if it's the .mergerfs pseudo file. closes #18
2014-06-25 14:40:07 -04:00
Antonio SJ Musumeci
ec38a9c783
fix rename'ing to local device
2014-06-24 16:13:49 -04:00
Antonio SJ Musumeci
3b6c74878c
use geteuid syscall as well
2014-06-23 12:17:09 -04:00
Antonio SJ Musumeci
0e12d79659
platform specific code to deal with sete{u,g}id. closes #17
2014-06-17 19:12:09 -04:00
Antonio SJ Musumeci
716453596a
add flush callback. closes #16
2014-06-13 11:04:26 -04:00
Antonio SJ Musumeci
dd666079b6
add {read,write}_buf functions. closes #15
2014-06-13 11:02:46 -04:00
Antonio SJ Musumeci
45a2e09fbe
reverse source and destination mount points to match fstab requirements. closes #13
2014-06-05 07:30:04 -04:00
Antonio SJ Musumeci
645c823778
source mount paths can contain globing. closes #10
2014-05-31 17:54:18 -04:00
Antonio SJ Musumeci
18358261af
fsname set to list of src mounts. closes #9
2014-05-30 23:23:45 -04:00
Antonio SJ Musumeci
e2e0359eb2
fix free space calculations. closes #8
2014-05-30 18:41:42 -04:00
Antonio SJ Musumeci
36887e456f
when readdir's filler returns non-zero return ENOMEM. closes #7
2014-05-28 18:04:38 -04:00
Antonio SJ Musumeci
652a299ac1
add fgetattr. closes #5
2014-05-28 06:35:08 -04:00
Antonio SJ Musumeci
aab90b0503
rework policy code
2014-05-28 05:35:58 -04:00
Antonio SJ Musumeci
345d0bbdc4
use eaccess to determine permissions for ffwp. closes #2
2014-05-27 18:17:54 -04:00
Antonio SJ Musumeci
4c7095ccf6
remove stat'ing of files in readdir. closes #3
2014-05-27 12:41:40 -04:00
Antonio SJ Musumeci
bbc4b594fe
fs::make_path should check for forward slashes, add if missing
2014-05-27 07:17:32 -04:00
Antonio SJ Musumeci
16fe0cf90c
remove statfs policy
2014-05-23 07:28:05 -04:00
Antonio SJ Musumeci
29ed2bca01
add FS_IOC_{GET}VERSION to ioctl
2014-05-20 13:48:46 -04:00
Antonio SJ Musumeci
243a193e66
use long instead of int to limit possibility of overflow in switch, closes #1
2014-05-20 10:40:13 -04:00
Antonio SJ Musumeci
97ce6f5f21
use {get,list,set}xattr to modify runtime
2014-05-19 23:37:18 -04:00
Antonio SJ Musumeci
7f640c4d9e
fix building without libattr
2014-05-19 09:34:31 -04:00
Antonio SJ Musumeci
bb7a966296
initial code commit
2014-05-19 07:05:53 -04:00