mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-01 20:36:37 -05:00
Misc doc updates
This commit is contained in:
parent
d3770802b1
commit
6472ac51e9
5 changed files with 102 additions and 40 deletions
|
|
@ -9,9 +9,9 @@ handled.
|
|||
|
||||
`rename` and `link` are arguably the most complicated functions to
|
||||
create in a union filesystem. `rename` only works within a single
|
||||
filesystem or device. If a rename can't be done due to the source and
|
||||
destination paths existing on different mount points it will return
|
||||
**-1** with **errno = EXDEV** (cross device / improper link). So if a
|
||||
filesystem or device. If a `rename` can not be done due to the source
|
||||
and destination paths existing on different mount points it will
|
||||
return an error (EXDEV, cross device / improper link). So if a
|
||||
`rename`'s source and target are on different filesystems within the
|
||||
pool it creates an issue.
|
||||
|
||||
|
|
@ -24,31 +24,32 @@ v1.20.3 and prior, Finder / CIFS/SMB client in Apple OSX 10.9+,
|
|||
NZBGet, Samba's recycling bin feature.
|
||||
|
||||
As a result a compromise was made in order to get most software to
|
||||
work while still obeying mergerfs' policies. Below is the basic logic.
|
||||
work while still obeying mergerfs' policies. The behavior is explained
|
||||
below.
|
||||
|
||||
* If using a **create** policy which tries to preserve directory paths (epff,eplfs,eplus,epmfs)
|
||||
* Using the **rename** policy get the list of files to rename
|
||||
* For each file attempt rename:
|
||||
* If failure with ENOENT (no such file or directory) run **create** policy
|
||||
* If create policy returns the same branch as currently evaluating then clone the path
|
||||
* Re-attempt rename
|
||||
* If **any** of the renames succeed the higher level rename is considered a success
|
||||
* If **no** renames succeed the first error encountered will be returned
|
||||
* On success:
|
||||
* Remove the target from all branches with no source file
|
||||
* Remove the source from all branches which failed to rename
|
||||
* Using the **rename** policy get the list of files to rename
|
||||
* For each file attempt rename:
|
||||
* If failure with ENOENT (no such file or directory) run **create** policy
|
||||
* If create policy returns the same branch as currently evaluating then clone the path
|
||||
* Re-attempt rename
|
||||
* If **any** of the renames succeed the higher level rename is considered a success
|
||||
* If **no** renames succeed the first error encountered will be returned
|
||||
* On success:
|
||||
* Remove the target from all branches with no source file
|
||||
* Remove the source from all branches which failed to rename
|
||||
* If using a **create** policy which does **not** try to preserve directory paths
|
||||
* Using the **rename** policy get the list of files to rename
|
||||
* Using the **getattr** policy get the target path
|
||||
* For each file attempt rename:
|
||||
* If the source branch != target branch:
|
||||
* Clone target path from target branch to source branch
|
||||
* Rename
|
||||
* If **any** of the renames succeed the higher level rename is considered a success
|
||||
* If **no** renames succeed the first error encountered will be returned
|
||||
* On success:
|
||||
* Remove the target from all branches with no source file
|
||||
* Remove the source from all branches which failed to rename
|
||||
* Using the **rename** policy get the list of files to rename
|
||||
* Using the **getattr** policy get the target path
|
||||
* For each file attempt rename:
|
||||
* If the source branch != target branch:
|
||||
* Clone target path from target branch to source branch
|
||||
* rename
|
||||
* If **any** of the renames succeed the higher level rename is considered a success
|
||||
* If **no** renames succeed the first error encountered will be returned
|
||||
* On success:
|
||||
* Remove the target from all branches with no source file
|
||||
* Remove the source from all branches which failed to rename
|
||||
|
||||
The removals are subject to normal entitlement checks. If the unlink
|
||||
fails it will fail silently.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue