repo/checkout: Verify early if src/destination are on same device
At least in all Linux kernels up to today, one can never `link()` across devices, so we might as well verify that up front. This will help for a future patch to add a new type of union-add checkout, since Linux checks for `EEXIST` before `EXDEV`. Closes: #714 Approved by: jlebon
This commit is contained in:
1 parent
3219a5d0ee
commit
ff34810097
2 files changed
+22
-1
No files matched your search
@@ -78,6 +78,6 @@ assert_file_has_content mnt/test2-checkout-copy-fallback/anewfile-for-fuse anewf
|
||||
if ${CMD_PREFIX} ostree --repo=repo checkout -UH test2 mnt/test2-checkout-copy-hardlinked 2>err.txt; then
|
||||
assert_not_reached "Checking out via hardlinks across mountpoint unexpectedly succeeded!"
|
||||
fi
|
||||
assert_file_has_content err.txt "Invalid cross-device link"
|
||||
assert_file_has_content err.txt "Unable to do hardlink checkout across devices"
|
||||
|
||||
echo "ok checkout copy fallback"
|
||||
Reference in new issue
Block a user