Commit Graph

19 Commits

Author SHA1 Message Date
Antonio SJ Musumeci
2a075ead92 fall back to other file copy methods in clonefile 2019-04-13 15:08:13 -04:00
Antonio SJ Musumeci
9d9ee7b71d general code cleanup 2019-01-31 22:47:09 -05:00
Antonio SJ Musumeci
85026d5780 add FICLONE and copy_file_range to clonefile
If available FICLONE and copy_file_range will be tried in addition to sendfile
when copying data between two files. The fallback is a tradition read/write
loop. On systems that support these it should improve performance.
2018-10-12 10:18:49 -04:00
Antonio SJ Musumeci
93f7d7d927 add link_cow feature
When enabled if a regular file is opened which has a link count > 1 it will
copy the file to a temporary file and rename over the original. Effectively
breaking the link. This behavior is similar to cow-shell and other LD_PRELOAD
based "CoW" solutions.
2018-10-06 22:05:05 -04:00
Antonio SJ Musumeci
ccaa458739 better handle incomplete reads/writes in copying files 2017-04-13 12:55:34 -04:00
Antonio SJ Musumeci
1a1fa06aa3 fadvise cleanup 2017-04-11 09:02:05 -04:00
Antonio SJ Musumeci
9d0798dbfb restructure fadvise 2017-04-07 00:12:57 -04:00
Antonio SJ Musumeci
e2acffe55b restructure fallocate abstraction 2017-04-06 23:35:31 -04:00
Antonio SJ Musumeci
492d895632 check metadata on chown/chmod errors when cloning 2017-02-15 09:08:27 -05:00
Antonio SJ Musumeci
157dae0d2f define O_LARGEFILE and O_NOATIME if needed 2016-10-28 22:04:15 -04:00
Antonio SJ Musumeci
00c814dc58 consolidate and simplify utime 2016-10-28 22:04:09 -04:00
Antonio SJ Musumeci
d0b6cd1f38 further abstraction of system calls 2016-10-20 16:51:49 -04:00
Antonio SJ Musumeci
1dc7bff6e6 wrap most posix filesystem functions 2016-10-19 16:58:52 -04:00
Antonio SJ Musumeci
7e423cd9ce small tweaks to build on Debian kFreeBSD 2016-09-14 08:36:06 -04:00
Antonio SJ Musumeci
1513c92cbc abstract posix_fadvise 2016-09-13 17:36:28 -04:00
Antonio SJ Musumeci
49474f01ca make futimes crossplatform 2016-08-07 14:42:54 -04:00
Antonio SJ Musumeci
cb35a374ac rework fallocate logic 2016-05-11 13:19:44 -04: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