From 336c11d82e3b547e7d93f58055ec18700311efd0 Mon Sep 17 00:00:00 2001 From: XUranus <2257238649wdx@gmail.com> Date: Fri, 29 Dec 2023 13:52:33 +0800 Subject: [PATCH] add mount read-only interface --- cli/vcopymount.cpp | 31 +- include/VolumeCopyMountProvider.h | 2 + include/VolumeProtector.h | 2 +- include/native/FileSystemAPI.h | 4 - .../linux/LinuxDeviceMapperMountProvider.h | 15 +- .../native/linux/LinuxLoopbackMountProvider.h | 2 + include/native/linux/LinuxMountAPI.h | 0 include/native/linux/LinuxMountUtils.h | 27 ++ src/VolumeCopyMountProvider.cpp | 8 +- src/native/FileSystemAPI.cpp | 41 -- .../linux/LinuxDeviceMapperMountProvider.cpp | 48 +-- .../linux/LinuxLoopbackMountProvider.cpp | 20 +- src/native/linux/LinuxMountUtils.cpp | 365 ++++++++++++++++++ 13 files changed, 458 insertions(+), 107 deletions(-) delete mode 100644 include/native/linux/LinuxMountAPI.h create mode 100644 include/native/linux/LinuxMountUtils.h create mode 100644 src/native/linux/LinuxMountUtils.cpp diff --git a/cli/vcopymount.cpp b/cli/vcopymount.cpp index 3944222..e5ecbbc 100644 --- a/cli/vcopymount.cpp +++ b/cli/vcopymount.cpp @@ -28,7 +28,8 @@ static const char* g_helpMessage = "--output output dir path to ouput checkpoint\n" "--target dir target to mount to\n" "--type mount fs type, ex: ext4, xfs...\n" - "--option