]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
mount: support remount
authorDaniel Hill <daniel@gluo.nz>
Sat, 11 Feb 2023 00:45:23 +0000 (13:45 +1300)
committerDaniel Hill <daniel@gluo.nz>
Sat, 11 Feb 2023 00:45:23 +0000 (13:45 +1300)
remount is handled by libc, not the kernel mount procedure, this fixes
remounts. Also sorted the list of flags.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
rust-src/mount/src/filesystem.rs

index f47319c9aa9bba223010cfc28ffdec63409f8f89..28a2ab9e2d7d072fcb9512a43e0b9d0caed976dd 100644 (file)
@@ -128,9 +128,10 @@ fn parse_mount_options(options: impl AsRef<str>) -> (Option<String>, u64) {
             "nodiratime" => Left(libc::MS_NODIRATIME),
             "noexec" => Left(libc::MS_NOEXEC),
             "nosuid" => Left(libc::MS_NOSUID),
+            "relatime" => Left(libc::MS_RELATIME),
+            "remount" => Left(libc::MS_REMOUNT),
             "ro" => Left(libc::MS_RDONLY),
             "rw" => Left(0),
-            "relatime" => Left(libc::MS_RELATIME),
             "strictatime" => Left(libc::MS_STRICTATIME),
             "sync" => Left(libc::MS_SYNCHRONOUS),
             "" => Left(0),