mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
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.
This commit is contained in:
parent
d4eecf3b56
commit
3ec137c4ad
11 changed files with 696 additions and 69 deletions
|
|
@ -39,6 +39,9 @@ const std::vector<Policy> Policy::_policies_ =
|
|||
(POLICY(lfs,DOESNT_PRESERVE_PATH))
|
||||
(POLICY(lus,DOESNT_PRESERVE_PATH))
|
||||
(POLICY(mfs,DOESNT_PRESERVE_PATH))
|
||||
(POLICY(msplfs,PRESERVES_PATH))
|
||||
(POLICY(msplus,PRESERVES_PATH))
|
||||
(POLICY(mspmfs,PRESERVES_PATH))
|
||||
(POLICY(newest,DOESNT_PRESERVE_PATH))
|
||||
(POLICY(rand,DOESNT_PRESERVE_PATH));
|
||||
|
||||
|
|
@ -59,6 +62,9 @@ CONST_POLICY(ff);
|
|||
CONST_POLICY(lfs);
|
||||
CONST_POLICY(lus);
|
||||
CONST_POLICY(mfs);
|
||||
CONST_POLICY(msplfs);
|
||||
CONST_POLICY(msplus);
|
||||
CONST_POLICY(mspmfs);
|
||||
CONST_POLICY(newest);
|
||||
CONST_POLICY(rand);
|
||||
|
||||
|
|
@ -83,4 +89,3 @@ Policy::find(const Policy::Enum::Type i)
|
|||
|
||||
return invalid;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue