mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-02 04:46:41 -05:00
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.
This commit is contained in:
parent
19a7d43b31
commit
93f7d7d927
18 changed files with 424 additions and 127 deletions
|
|
@ -16,12 +16,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace fs
|
||||
{
|
||||
int clonefile(const int fdin,
|
||||
const int fdout);
|
||||
int clonefile(const std::string &from,
|
||||
const std::string &to);
|
||||
int
|
||||
clonefile(const int src_fd_,
|
||||
const int dst_fd_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue