From abd089140becf22d9cc6a0cd96409873e31b2697 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Fri, 1 May 2026 23:25:25 +0900 Subject: [PATCH] Linux: add emergency cleanup for stale unmounts When normal filesystem unmount fails, the Linux path could stop before cleaning VeraCrypt mapper, loop and FUSE objects. Add an explicit emergency dismount request that is only reached after interactive confirmation. The recovery path lazy-detaches mounted filesystems, uses deferred dmsetup removal for VeraCrypt mapper devices, detaches loop devices, and keeps normal force/ignoreOpenFiles behavior unchanged. --- Translations/Language.ar.xml | 2 + Translations/Language.be.xml | 2 + Translations/Language.bg.xml | 2 + Translations/Language.ca.xml | 2 + Translations/Language.co.xml | 2 + Translations/Language.cs.xml | 2 + Translations/Language.da.xml | 2 + Translations/Language.de.xml | 2 + Translations/Language.el.xml | 2 + Translations/Language.es.xml | 2 + Translations/Language.et.xml | 2 + Translations/Language.eu.xml | 2 + Translations/Language.fa.xml | 2 + Translations/Language.fi.xml | 2 + Translations/Language.fr.xml | 2 + Translations/Language.he.xml | 2 + Translations/Language.hu.xml | 2 + Translations/Language.id.xml | 2 + Translations/Language.it.xml | 2 + Translations/Language.ja.xml | 2 + Translations/Language.ka.xml | 2 + Translations/Language.ko.xml | 2 + Translations/Language.lv.xml | 2 + Translations/Language.my.xml | 2 + Translations/Language.nb.xml | 2 + Translations/Language.nl.xml | 2 + Translations/Language.nn.xml | 2 + Translations/Language.pl.xml | 2 + Translations/Language.pt-br.xml | 2 + Translations/Language.ro.xml | 2 + Translations/Language.ru.xml | 2 + Translations/Language.sk.xml | 2 + Translations/Language.sl.xml | 2 + Translations/Language.sv.xml | 2 + Translations/Language.th.xml | 2 + Translations/Language.tr.xml | 2 + Translations/Language.uk.xml | 2 + Translations/Language.uz.xml | 2 + Translations/Language.vi.xml | 2 + Translations/Language.zh-cn.xml | 2 + Translations/Language.zh-hk.xml | 2 + Translations/Language.zh-tw.xml | 2 + src/Common/Language.xml | 2 + src/Core/CoreBase.h | 3 + src/Core/CoreException.cpp | 10 ++ src/Core/CoreException.h | 11 ++ src/Core/Unix/CoreService.cpp | 20 +++ src/Core/Unix/CoreService.h | 3 + src/Core/Unix/CoreServiceProxy.h | 12 ++ src/Core/Unix/CoreServiceRequest.cpp | 23 ++++ src/Core/Unix/CoreServiceRequest.h | 14 ++ src/Core/Unix/CoreUnix.cpp | 179 +++++++++++++++++++++++- src/Core/Unix/CoreUnix.h | 8 ++ src/Core/Unix/Linux/CoreLinux.cpp | 195 +++++++++++++++++++++++++-- src/Core/Unix/Linux/CoreLinux.h | 5 + src/Main/CommandLineInterface.cpp | 15 +++ src/Main/CommandLineInterface.h | 3 + src/Main/Forms/WaitDialog.cpp | 1 + src/Main/UserInterface.cpp | 67 ++++++++- src/Main/UserInterface.h | 2 +- 60 files changed, 639 insertions(+), 18 deletions(-) diff --git a/Translations/Language.ar.xml b/Translations/Language.ar.xml index 0e74181b..6018111b 100644 --- a/Translations/Language.ar.xml +++ b/Translations/Language.ar.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.be.xml b/Translations/Language.be.xml index 433e1f9e..2c22a496 100644 --- a/Translations/Language.be.xml +++ b/Translations/Language.be.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.bg.xml b/Translations/Language.bg.xml index fec53d4f..4603e8ab 100644 --- a/Translations/Language.bg.xml +++ b/Translations/Language.bg.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.ca.xml b/Translations/Language.ca.xml index 6bb8592e..a6e1632f 100644 --- a/Translations/Language.ca.xml +++ b/Translations/Language.ca.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.co.xml b/Translations/Language.co.xml index 1b9bef6a..5955313e 100644 --- a/Translations/Language.co.xml +++ b/Translations/Language.co.xml @@ -1690,6 +1690,8 @@ Information about Corsican localization: Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.cs.xml b/Translations/Language.cs.xml index aa7b5c75..a14e0c6d 100644 --- a/Translations/Language.cs.xml +++ b/Translations/Language.cs.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.da.xml b/Translations/Language.da.xml index 5a973f0b..3dff694b 100644 --- a/Translations/Language.da.xml +++ b/Translations/Language.da.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.de.xml b/Translations/Language.de.xml index eaaece32..29ce609f 100644 --- a/Translations/Language.de.xml +++ b/Translations/Language.de.xml @@ -1673,6 +1673,8 @@ Das Passwort muss mindestens 20 Zeichen lang sein, damit der angegebene Argon2-PIM verwendet werden kann.\nKürzere Passwörter können nur verwendet werden, wenn der Argon2-PIM-Wert 12 oder größer ist. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.el.xml b/Translations/Language.el.xml index ba36a57f..07e83eb7 100644 --- a/Translations/Language.el.xml +++ b/Translations/Language.el.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.es.xml b/Translations/Language.es.xml index c7119ccd..0d608555 100644 --- a/Translations/Language.es.xml +++ b/Translations/Language.es.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.et.xml b/Translations/Language.et.xml index a37025c9..4b1e60c9 100644 --- a/Translations/Language.et.xml +++ b/Translations/Language.et.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.eu.xml b/Translations/Language.eu.xml index 95020e3b..b2a1941d 100644 --- a/Translations/Language.eu.xml +++ b/Translations/Language.eu.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.fa.xml b/Translations/Language.fa.xml index 7e24b7c7..b2d0a880 100644 --- a/Translations/Language.fa.xml +++ b/Translations/Language.fa.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.fi.xml b/Translations/Language.fi.xml index 17849911..1d87d0a1 100644 --- a/Translations/Language.fi.xml +++ b/Translations/Language.fi.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.fr.xml b/Translations/Language.fr.xml index 2a6a5f6e..98c52fa5 100644 --- a/Translations/Language.fr.xml +++ b/Translations/Language.fr.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.he.xml b/Translations/Language.he.xml index bd6c13fa..a5dfe7ee 100644 --- a/Translations/Language.he.xml +++ b/Translations/Language.he.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.hu.xml b/Translations/Language.hu.xml index 899cec5f..d3aec106 100644 --- a/Translations/Language.hu.xml +++ b/Translations/Language.hu.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.id.xml b/Translations/Language.id.xml index 8e2fe3db..477ace57 100644 --- a/Translations/Language.id.xml +++ b/Translations/Language.id.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.it.xml b/Translations/Language.it.xml index 9e477929..f39553c5 100644 --- a/Translations/Language.it.xml +++ b/Translations/Language.it.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.ja.xml b/Translations/Language.ja.xml index 50178f13..490b50ae 100644 --- a/Translations/Language.ja.xml +++ b/Translations/Language.ja.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.ka.xml b/Translations/Language.ka.xml index 29a3b8fa..17e68052 100644 --- a/Translations/Language.ka.xml +++ b/Translations/Language.ka.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.ko.xml b/Translations/Language.ko.xml index 3ed66794..46960fbe 100644 --- a/Translations/Language.ko.xml +++ b/Translations/Language.ko.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.lv.xml b/Translations/Language.lv.xml index 0e83e524..7eba85b2 100644 --- a/Translations/Language.lv.xml +++ b/Translations/Language.lv.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.my.xml b/Translations/Language.my.xml index 0ea6d5d0..9732c952 100644 --- a/Translations/Language.my.xml +++ b/Translations/Language.my.xml @@ -1672,6 +1672,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.nb.xml b/Translations/Language.nb.xml index ed6aaf17..1c88c290 100644 --- a/Translations/Language.nb.xml +++ b/Translations/Language.nb.xml @@ -1670,6 +1670,8 @@ Passordet må inneholde 20 eller flere tegn for å kunne bruke den angitte Argon2 PIM-en.\nKortere passord kan kun brukes hvis Argon2 PIM er 12 eller større. Monter NTFS-volumer med Linux-kjernens ntfs3-driver Kun for Linux. Når dette er aktivert, undersøker VeraCrypt den dekrypterte virtuelle enheten med blkid -p og monterer oppdagede NTFS-filsystemer med ntfs3 i stedet for standard NTFS-bakgrunnssystem. Hvis NTFS-deteksjonen mislykkes, bruker VeraCrypt vanlig automatisk filsystemvalg. Hvis ntfs3 er utilgjengelig eller blokkert av distribusjonen, kan monteringen mislykkes. Dette valgfrie alternativet kan forhindre at hvile- eller dvalemodus henger seg opp på grunn av frosne FUSE-filsystemer i brukerrom. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.nl.xml b/Translations/Language.nl.xml index 5d0abffb..8689f3cd 100644 --- a/Translations/Language.nl.xml +++ b/Translations/Language.nl.xml @@ -1670,6 +1670,8 @@ Het wachtwoord moet uit minimaal 20 tekens bestaan om de opgegeven Argon2-PIM te kunnen gebruiken.\nKortere wachtwoorden kunnen alleen worden gebruikt als de Argon2-PIM 12 of hoger is. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.nn.xml b/Translations/Language.nn.xml index 99d173de..910f0476 100644 --- a/Translations/Language.nn.xml +++ b/Translations/Language.nn.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.pl.xml b/Translations/Language.pl.xml index 906fa77b..e80c3447 100644 --- a/Translations/Language.pl.xml +++ b/Translations/Language.pl.xml @@ -1670,6 +1670,8 @@ Hasło musi zawierać przynajmniej 20 albo więcej znaków do używania określonego PIM Argon2.\nKrótszych haseł można używać tylko wtedy, gdy PIM Argon2 ma wartość 12 lub większą. Podłączaj wolumeny NTFS za pomocą sterownika ntfs3 jądra systemu Linux Tylko system Linux. Po włączeniu tej opcji VeraCrypt skanuje odszyfrowane urządzenie wirtualne za pomocą blkid -p i podłącza wykryte systemy plików NTFS za pomocą sterownika NTFS3 zamiast domyślnego NTFS. Jeśli wykrycie NTFS się nie powiedzie, VeraCrypt użyje standardowego automatycznego wyboru systemu plików. Jeśli NTFS3 jest niedostępny lub zablokowany przez dystrybucję, podłączenie może się nie powieść. To opcjonalne ustawienie pozwala uniknąć zawieszeń w trybie uśpienia lub hibernacji spowodowanych przez zamrożone systemy plików FUSE w przestrzeni użytkownika. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.pt-br.xml b/Translations/Language.pt-br.xml index 93b80471..2226458d 100644 --- a/Translations/Language.pt-br.xml +++ b/Translations/Language.pt-br.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.ro.xml b/Translations/Language.ro.xml index 71cbc3f5..310f225c 100644 --- a/Translations/Language.ro.xml +++ b/Translations/Language.ro.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.ru.xml b/Translations/Language.ru.xml index 9d86ac22..e397f3cd 100644 --- a/Translations/Language.ru.xml +++ b/Translations/Language.ru.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.sk.xml b/Translations/Language.sk.xml index 45ee0a66..8473c57d 100644 --- a/Translations/Language.sk.xml +++ b/Translations/Language.sk.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.sl.xml b/Translations/Language.sl.xml index 445f8395..37046183 100644 --- a/Translations/Language.sl.xml +++ b/Translations/Language.sl.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.sv.xml b/Translations/Language.sv.xml index 04cb8acf..d797fd74 100644 --- a/Translations/Language.sv.xml +++ b/Translations/Language.sv.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.th.xml b/Translations/Language.th.xml index 900cbcdc..a19409f9 100644 --- a/Translations/Language.th.xml +++ b/Translations/Language.th.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.tr.xml b/Translations/Language.tr.xml index 1f116e6e..e7339806 100644 --- a/Translations/Language.tr.xml +++ b/Translations/Language.tr.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.uk.xml b/Translations/Language.uk.xml index a88e1447..abc18273 100644 --- a/Translations/Language.uk.xml +++ b/Translations/Language.uk.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.uz.xml b/Translations/Language.uz.xml index e3b6a927..5faf38ae 100644 --- a/Translations/Language.uz.xml +++ b/Translations/Language.uz.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.vi.xml b/Translations/Language.vi.xml index c9e3e801..2de225bd 100644 --- a/Translations/Language.vi.xml +++ b/Translations/Language.vi.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.zh-cn.xml b/Translations/Language.zh-cn.xml index 6fb97ba4..1f48c4b1 100644 --- a/Translations/Language.zh-cn.xml +++ b/Translations/Language.zh-cn.xml @@ -1671,6 +1671,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.zh-hk.xml b/Translations/Language.zh-hk.xml index 9311a9c4..040567ca 100644 --- a/Translations/Language.zh-hk.xml +++ b/Translations/Language.zh-hk.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/Translations/Language.zh-tw.xml b/Translations/Language.zh-tw.xml index 24139666..c52b20aa 100644 --- a/Translations/Language.zh-tw.xml +++ b/Translations/Language.zh-tw.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/src/Common/Language.xml b/src/Common/Language.xml index 6a9a1cdc..c798b957 100644 --- a/src/Common/Language.xml +++ b/src/Common/Language.xml @@ -1670,6 +1670,8 @@ Password must contain 20 or more characters in order to use the specified Argon2 PIM.\nShorter passwords can only be used if the Argon2 PIM is 12 or greater. Mount NTFS volumes with the Linux kernel ntfs3 driver Linux only. When enabled, VeraCrypt probes the decrypted virtual device with blkid -p and mounts detected NTFS filesystems with ntfs3 instead of the default NTFS backend. If NTFS detection fails, VeraCrypt uses the normal automatic filesystem selection. If ntfs3 is unavailable or blocked by the distribution, mounting may fail. This opt-in option can avoid suspend or hibernate hangs caused by frozen user-space FUSE filesystems. + Normal unmount of volume {0} failed. This can happen when applications still have files or directories open on the volume, or when the backing device was disconnected and the mount became stale.\n\nIf the device is still connected, choose No, close applications using the volume, and try unmounting again.\n\nIf the device was disconnected or the mount is stale, VeraCrypt can attempt emergency cleanup by lazy-detaching the filesystem and removing or scheduling removal of VeraCrypt kernel objects. Pending writes may have failed, data may be lost, and cleanup may remain pending until applications close open files. Check the filesystem with fsck or the appropriate repair tool before using it again.\n\nContinue? + Emergency cleanup for volume {0} has been initiated. If the volume was disconnected, the mount was stale, or there were pending writes, check the filesystem with fsck or the appropriate repair tool before using it again. diff --git a/src/Core/CoreBase.h b/src/Core/CoreBase.h index 21a28dfe..ea3c2d6b 100644 --- a/src/Core/CoreBase.h +++ b/src/Core/CoreBase.h @@ -40,6 +40,9 @@ namespace VeraCrypt virtual void CreateKeyfile (const FilePath &keyfilePath) const; virtual void DismountFilesystem (const DirectoryPath &mountPoint, bool force) const = 0; virtual shared_ptr DismountVolume (shared_ptr mountedVolume, bool ignoreOpenFiles = false, bool syncVolumeInfo = false) = 0; +#if defined(TC_LINUX) + virtual shared_ptr EmergencyDismountVolume (shared_ptr mountedVolume) { throw NotApplicable (SRC_POS); } +#endif virtual bool FilesystemSupportsLargeFiles (const FilePath &filePath) const = 0; virtual DirectoryPath GetDeviceMountPoint (const DevicePath &devicePath) const = 0; virtual uint32 GetDeviceSectorSize (const DevicePath &devicePath) const = 0; diff --git a/src/Core/CoreException.cpp b/src/Core/CoreException.cpp index 4b064190..5aa88aef 100644 --- a/src/Core/CoreException.cpp +++ b/src/Core/CoreException.cpp @@ -25,6 +25,16 @@ namespace VeraCrypt ExecutedProcessFailed::Serialize (stream); } + void FilesystemDismountFailed::Deserialize (shared_ptr stream) + { + ExecutedProcessFailed::Deserialize (stream); + } + + void FilesystemDismountFailed::Serialize (shared_ptr stream) const + { + ExecutedProcessFailed::Serialize (stream); + } + #define TC_EXCEPTION(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) #undef TC_EXCEPTION_NODECL #define TC_EXCEPTION_NODECL(TYPE) TC_SERIALIZER_FACTORY_ADD(TYPE) diff --git a/src/Core/CoreException.h b/src/Core/CoreException.h index a0b1737b..06b1a29b 100644 --- a/src/Core/CoreException.h +++ b/src/Core/CoreException.h @@ -25,6 +25,16 @@ namespace VeraCrypt TC_SERIALIZABLE_EXCEPTION (ElevationFailed); }; + struct FilesystemDismountFailed : public ExecutedProcessFailed + { + FilesystemDismountFailed () { } + FilesystemDismountFailed (const string &message, const string &command, int exitCode, const string &errorOutput) + : ExecutedProcessFailed (message, command, exitCode, errorOutput) { } + FilesystemDismountFailed (const ExecutedProcessFailed &ex) + : ExecutedProcessFailed (ex.what(), ex.GetCommand(), static_cast (ex.GetExitCode()), ex.GetErrorOutput()) { } + TC_SERIALIZABLE_EXCEPTION (FilesystemDismountFailed); + }; + TC_EXCEPTION_DECL (RootDeviceUnavailable, SystemException); #define TC_EXCEPTION(NAME) TC_EXCEPTION_DECL(NAME,Exception) @@ -32,6 +42,7 @@ namespace VeraCrypt #undef TC_EXCEPTION_SET #define TC_EXCEPTION_SET \ TC_EXCEPTION_NODECL (ElevationFailed); \ + TC_EXCEPTION_NODECL (FilesystemDismountFailed); \ TC_EXCEPTION_NODECL (RootDeviceUnavailable); \ TC_EXCEPTION (DriveLetterUnavailable); \ TC_EXCEPTION (DriverError); \ diff --git a/src/Core/Unix/CoreService.cpp b/src/Core/Unix/CoreService.cpp index dca2cfa0..376aeedd 100644 --- a/src/Core/Unix/CoreService.cpp +++ b/src/Core/Unix/CoreService.cpp @@ -159,6 +159,18 @@ namespace VeraCrypt continue; } +#ifdef TC_LINUX + // EmergencyDismountVolumeRequest + EmergencyDismountVolumeRequest *emergencyDismountRequest = dynamic_cast (request.get()); + if (emergencyDismountRequest) + { + DismountVolumeResponse response; + response.DismountedVolumeInfo = Core->EmergencyDismountVolume (emergencyDismountRequest->MountedVolumeInfo); + response.Serialize (outputStream); + continue; + } +#endif + // GetDeviceSectorSizeRequest GetDeviceSectorSizeRequest *getDeviceSectorSizeRequest = dynamic_cast (request.get()); if (getDeviceSectorSizeRequest) @@ -252,6 +264,14 @@ namespace VeraCrypt return SendRequest (request)->DismountedVolumeInfo; } +#ifdef TC_LINUX + shared_ptr CoreService::RequestEmergencyDismountVolume (shared_ptr mountedVolume) + { + EmergencyDismountVolumeRequest request (mountedVolume); + return SendRequest (request)->DismountedVolumeInfo; + } +#endif + uint32 CoreService::RequestGetDeviceSectorSize (const DevicePath &devicePath) { GetDeviceSectorSizeRequest request (devicePath); diff --git a/src/Core/Unix/CoreService.h b/src/Core/Unix/CoreService.h index 2becc735..6d4ce479 100644 --- a/src/Core/Unix/CoreService.h +++ b/src/Core/Unix/CoreService.h @@ -29,6 +29,9 @@ namespace VeraCrypt static void RequestCheckFilesystem (shared_ptr mountedVolume, bool repair); static void RequestDismountFilesystem (const DirectoryPath &mountPoint, bool force); static shared_ptr RequestDismountVolume (shared_ptr mountedVolume, bool ignoreOpenFiles = false, bool syncVolumeInfo = false); +#ifdef TC_LINUX + static shared_ptr RequestEmergencyDismountVolume (shared_ptr mountedVolume); +#endif static uint32 RequestGetDeviceSectorSize (const DevicePath &devicePath); static uint64 RequestGetDeviceSize (const DevicePath &devicePath); static HostDeviceList RequestGetHostDevices (bool pathListOnly); diff --git a/src/Core/Unix/CoreServiceProxy.h b/src/Core/Unix/CoreServiceProxy.h index 08bb57f6..58560826 100644 --- a/src/Core/Unix/CoreServiceProxy.h +++ b/src/Core/Unix/CoreServiceProxy.h @@ -45,6 +45,18 @@ namespace VeraCrypt return dismountedVolumeInfo; } +#ifdef TC_LINUX + virtual shared_ptr EmergencyDismountVolume (shared_ptr mountedVolume) + { + shared_ptr dismountedVolumeInfo = CoreService::RequestEmergencyDismountVolume (mountedVolume); + + VolumeEventArgs eventArgs (dismountedVolumeInfo); + T::VolumeDismountedEvent.Raise (eventArgs); + + return dismountedVolumeInfo; + } +#endif + virtual uint32 GetDeviceSectorSize (const DevicePath &devicePath) const { return CoreService::RequestGetDeviceSectorSize (devicePath); diff --git a/src/Core/Unix/CoreServiceRequest.cpp b/src/Core/Unix/CoreServiceRequest.cpp index 7feda14c..ffecbb1a 100644 --- a/src/Core/Unix/CoreServiceRequest.cpp +++ b/src/Core/Unix/CoreServiceRequest.cpp @@ -128,6 +128,26 @@ namespace VeraCrypt MountedVolumeInfo->Serialize (stream); } +#ifdef TC_LINUX + // EmergencyDismountVolumeRequest + void EmergencyDismountVolumeRequest::Deserialize (shared_ptr stream) + { + CoreServiceRequest::Deserialize (stream); + MountedVolumeInfo = Serializable::DeserializeNew (stream); + } + + bool EmergencyDismountVolumeRequest::RequiresElevation () const + { + return !Core->HasAdminPrivileges(); + } + + void EmergencyDismountVolumeRequest::Serialize (shared_ptr stream) const + { + CoreServiceRequest::Serialize (stream); + MountedVolumeInfo->Serialize (stream); + } +#endif + // GetDeviceSectorSizeRequest void GetDeviceSectorSizeRequest::Deserialize (shared_ptr stream) { @@ -270,6 +290,9 @@ namespace VeraCrypt TC_SERIALIZER_FACTORY_ADD_CLASS (CheckFilesystemRequest); TC_SERIALIZER_FACTORY_ADD_CLASS (DismountFilesystemRequest); TC_SERIALIZER_FACTORY_ADD_CLASS (DismountVolumeRequest); +#ifdef TC_LINUX + TC_SERIALIZER_FACTORY_ADD_CLASS (EmergencyDismountVolumeRequest); +#endif TC_SERIALIZER_FACTORY_ADD_CLASS (ExitRequest); TC_SERIALIZER_FACTORY_ADD_CLASS (GetDeviceSectorSizeRequest); TC_SERIALIZER_FACTORY_ADD_CLASS (GetDeviceSizeRequest); diff --git a/src/Core/Unix/CoreServiceRequest.h b/src/Core/Unix/CoreServiceRequest.h index 8c2854f1..c65a3c56 100644 --- a/src/Core/Unix/CoreServiceRequest.h +++ b/src/Core/Unix/CoreServiceRequest.h @@ -74,6 +74,20 @@ namespace VeraCrypt bool SyncVolumeInfo; }; +#ifdef TC_LINUX + struct EmergencyDismountVolumeRequest : CoreServiceRequest + { + EmergencyDismountVolumeRequest () { } + EmergencyDismountVolumeRequest (shared_ptr volumeInfo) + : MountedVolumeInfo (volumeInfo) { } + TC_SERIALIZABLE (EmergencyDismountVolumeRequest); + + virtual bool RequiresElevation () const; + + shared_ptr MountedVolumeInfo; + }; +#endif + struct GetDeviceSectorSizeRequest : CoreServiceRequest { GetDeviceSectorSizeRequest () { } diff --git a/src/Core/Unix/CoreUnix.cpp b/src/Core/Unix/CoreUnix.cpp index 68d9ecb0..fffd306e 100644 --- a/src/Core/Unix/CoreUnix.cpp +++ b/src/Core/Unix/CoreUnix.cpp @@ -163,11 +163,34 @@ namespace VeraCrypt Process::Execute ("umount", args); } +#ifdef TC_LINUX + void CoreUnix::DismountFilesystemLazy (const DirectoryPath &mountPoint) const + { + list args; + args.push_back ("-l"); + args.push_back ("--"); + args.push_back (mountPoint); + + Process::Execute ("umount", args); + } +#endif + shared_ptr CoreUnix::DismountVolume (shared_ptr mountedVolume, bool ignoreOpenFiles, bool syncVolumeInfo) { if (!mountedVolume->MountPoint.IsEmpty()) { +#ifdef TC_LINUX + try + { + DismountFilesystem (mountedVolume->MountPoint, ignoreOpenFiles); + } + catch (ExecutedProcessFailed &e) + { + throw FilesystemDismountFailed (e); + } +#else DismountFilesystem (mountedVolume->MountPoint, ignoreOpenFiles); +#endif // Delete mount directory if a default path has been used if (string (mountedVolume->MountPoint).find (GetDefaultMountPointPrefix()) == 0) @@ -178,6 +201,12 @@ namespace VeraCrypt { DismountNativeVolume (mountedVolume); } +#ifdef TC_LINUX + catch (ExecutedProcessFailed &e) + { + throw FilesystemDismountFailed (e); + } +#endif catch (NotApplicable &) { } if (!mountedVolume->LoopDevice.IsEmpty()) @@ -209,10 +238,14 @@ namespace VeraCrypt Process::Execute ("umount", args); break; } - catch (ExecutedProcessFailed&) + catch (ExecutedProcessFailed &e) { if (t > 10) +#ifdef TC_LINUX + throw FilesystemDismountFailed (e); +#else throw; +#endif Thread::Sleep (200); } } @@ -229,6 +262,150 @@ namespace VeraCrypt return mountedVolume; } +#ifdef TC_LINUX + shared_ptr CoreUnix::EmergencyDismountVolume (shared_ptr mountedVolume) + { + unique_ptr firstException; + + if (!mountedVolume->MountPoint.IsEmpty()) + { + bool mountPointMounted = true; + bool mountPointDetached = false; + + try + { + mountPointMounted = !GetMountedFilesystems (DevicePath(), mountedVolume->MountPoint).empty(); + } + catch (...) { } + + if (mountPointMounted) + { + try + { + DismountFilesystemLazy (mountedVolume->MountPoint); + mountPointDetached = true; + } + catch (Exception &e) + { + if (!firstException.get()) + firstException.reset (e.CloneNew()); + } + } + + if ((!mountPointMounted || mountPointDetached) && string (mountedVolume->MountPoint).find (GetDefaultMountPointPrefix()) == 0) + { + try + { + mountedVolume->MountPoint.Delete(); + } + catch (...) { } + } + } + + try + { + DismountNativeVolumeDeferred (mountedVolume); + } + catch (NotApplicable&) { } + catch (Exception &e) + { + if (!firstException.get()) + firstException.reset (e.CloneNew()); + } + + if (!mountedVolume->LoopDevice.IsEmpty()) + { + try + { + DetachLoopDevice (mountedVolume->LoopDevice); + } + catch (ExecutedProcessFailed &e) + { + if (IsLoopDeviceAttached (mountedVolume->LoopDevice) && !firstException.get()) + firstException.reset (e.CloneNew()); + } + catch (Exception &e) + { + if (!firstException.get()) + firstException.reset (e.CloneNew()); + } + } + + if (!mountedVolume->AuxMountPoint.IsEmpty()) + { + bool auxMountPointMounted = true; + bool auxMountPointDetached = false; + + try + { + auxMountPointMounted = !GetMountedFilesystems (DevicePath(), mountedVolume->AuxMountPoint).empty(); + } + catch (...) { } + + if (auxMountPointMounted) + { + list args; + args.push_back ("--"); + args.push_back (mountedVolume->AuxMountPoint); + + try + { + for (int t = 0; true; t++) + { + try + { + Process::Execute ("umount", args); + auxMountPointDetached = true; + break; + } + catch (ExecutedProcessFailed&) + { + if (t > 10) + throw; + Thread::Sleep (200); + } + } + } + catch (ExecutedProcessFailed&) + { + try + { + DismountFilesystemLazy (mountedVolume->AuxMountPoint); + auxMountPointDetached = true; + } + catch (Exception &e) + { + if (!firstException.get()) + firstException.reset (e.CloneNew()); + } + } + catch (Exception &e) + { + if (!firstException.get()) + firstException.reset (e.CloneNew()); + } + } + + if (!auxMountPointMounted || auxMountPointDetached) + { + try + { + mountedVolume->AuxMountPoint.Delete(); + } + catch (...) { } + } + } + + if (firstException.get()) + firstException->Throw(); + + VolumeEventArgs eventArgs (mountedVolume); + VolumeDismountedEvent.Raise (eventArgs); + + return mountedVolume; + } +#endif + bool CoreUnix::FilesystemSupportsLargeFiles (const FilePath &filePath) const { string path = filePath; diff --git a/src/Core/Unix/CoreUnix.h b/src/Core/Unix/CoreUnix.h index b5261949..79cf4c8e 100644 --- a/src/Core/Unix/CoreUnix.h +++ b/src/Core/Unix/CoreUnix.h @@ -29,6 +29,9 @@ namespace VeraCrypt virtual void CheckFilesystem (shared_ptr mountedVolume, bool repair = false) const; virtual void DismountFilesystem (const DirectoryPath &mountPoint, bool force) const; virtual shared_ptr DismountVolume (shared_ptr mountedVolume, bool ignoreOpenFiles = false, bool syncVolumeInfo = false); +#ifdef TC_LINUX + virtual shared_ptr EmergencyDismountVolume (shared_ptr mountedVolume); +#endif virtual bool FilesystemSupportsLargeFiles (const FilePath &filePath) const; virtual DirectoryPath GetDeviceMountPoint (const DevicePath &devicePath) const; virtual uint32 GetDeviceSectorSize (const DevicePath &devicePath) const; @@ -55,6 +58,11 @@ namespace VeraCrypt virtual DevicePath AttachFileToLoopDevice (const FilePath &filePath, bool readOnly) const { throw NotApplicable (SRC_POS); } virtual void DetachLoopDevice (const DevicePath &devicePath) const { throw NotApplicable (SRC_POS); } virtual void DismountNativeVolume (shared_ptr mountedVolume) const { throw NotApplicable (SRC_POS); } +#ifdef TC_LINUX + virtual void DismountFilesystemLazy (const DirectoryPath &mountPoint) const; + virtual void DismountNativeVolumeDeferred (shared_ptr mountedVolume) const { DismountNativeVolume (mountedVolume); } + virtual bool IsLoopDeviceAttached (const DevicePath &devicePath) const { return devicePath.IsBlockDevice(); } +#endif virtual bool FilesystemSupportsUnixPermissions (const DevicePath &devicePath) const; virtual string GetDefaultMountPointPrefix () const; virtual string GetFuseMountDirPrefix () const { return ".veracrypt_aux_mnt"; } diff --git a/src/Core/Unix/Linux/CoreLinux.cpp b/src/Core/Unix/Linux/CoreLinux.cpp index df1f8033..34c02a8e 100644 --- a/src/Core/Unix/Linux/CoreLinux.cpp +++ b/src/Core/Unix/Linux/CoreLinux.cpp @@ -10,6 +10,7 @@ code distribution packages. */ +#include #include #include #include @@ -17,6 +18,8 @@ #include #include #include +#include +#include #include #include "CoreLinux.h" #include "Platform/SystemInfo.h" @@ -126,45 +129,215 @@ namespace VeraCrypt } } + bool CoreLinux::IsLoopDeviceAttached (const DevicePath &devicePath) const + { + struct stat statData; + if (stat (string (devicePath).c_str(), &statData) != 0 || !S_ISBLK (statData.st_mode)) + return false; + + stringstream sysDevicePath; + sysDevicePath << "/sys/dev/block/" << major (statData.st_rdev) << ":" << minor (statData.st_rdev); + + if (FilesystemPath (sysDevicePath.str() + "/loop").IsDirectory()) + return true; + + list args; + args.push_back (devicePath); + + try + { + Process::Execute ("losetup", args); + return true; + } + catch (ExecutedProcessFailed&) + { + return false; + } + catch (...) { } + + return true; + } + void CoreLinux::DismountNativeVolume (shared_ptr mountedVolume) const + { + DismountNativeVolumeInternal (mountedVolume, false); + } + + void CoreLinux::DismountNativeVolumeDeferred (shared_ptr mountedVolume) const + { + DismountNativeVolumeInternal (mountedVolume, true); + } + + void CoreLinux::DismountNativeVolumeInternal (shared_ptr mountedVolume, bool deferred) const { string devPath = mountedVolume->VirtualDevice; + const string virtualDevice = devPath; if (devPath.find ("/dev/mapper/veracrypt") != 0) throw NotApplicable (SRC_POS); - size_t devCount = 0; - while (FilesystemPath (devPath).IsBlockDevice()) + // Deferred cleanup can follow a partial normal cleanup that removed an earlier mapper. + // Keep probing the suffixes VeraCrypt creates for cascade layers. + size_t maxDeviceMapperDeviceCount = 1; + if (deferred) { + foreach (shared_ptr ea, EncryptionAlgorithm::GetAvailableAlgorithms()) + { + size_t cipherCount = ea->GetCiphers().size(); + if (cipherCount > maxDeviceMapperDeviceCount) + maxDeviceMapperDeviceCount = cipherCount; + } + } + + size_t devCount = 0; + while (true) + { + string deviceMapperName = StringConverter::Split (devPath, "/").back(); + bool devicePresent = deferred ? IsDeviceMapperDevicePresent (deviceMapperName) : FilesystemPath (devPath).IsBlockDevice(); + + if (!devicePresent) + { + if (deferred && devCount < maxDeviceMapperDeviceCount - 1) + { + devPath = virtualDevice + "_" + StringConverter::ToSingle (devCount++); + continue; + } + + break; + } + list dmsetupArgs; dmsetupArgs.push_back ("remove"); - dmsetupArgs.push_back (StringConverter::Split (devPath, "/").back()); + if (deferred) + { + dmsetupArgs.push_back ("--retry"); + dmsetupArgs.push_back ("--deferred"); + } + dmsetupArgs.push_back (deviceMapperName); - for (int t = 0; true; t++) + if (deferred) { try { Process::Execute ("dmsetup", dmsetupArgs); - break; } - catch (...) + catch (ExecutedProcessFailed&) { - if (t > 20) - throw; + if (IsDeviceMapperDevicePresent (deviceMapperName)) + { + list deferredFallbackArgs; + deferredFallbackArgs.push_back ("remove"); + deferredFallbackArgs.push_back ("--deferred"); + deferredFallbackArgs.push_back (deviceMapperName); - Thread::Sleep (100); + try + { + Process::Execute ("dmsetup", deferredFallbackArgs); + } + catch (ExecutedProcessFailed&) + { + if (IsDeviceMapperDevicePresent (deviceMapperName)) + { + list fallbackArgs; + fallbackArgs.push_back ("remove"); + fallbackArgs.push_back (deviceMapperName); + + for (int t = 0; true; t++) + { + try + { + Process::Execute ("dmsetup", fallbackArgs); + break; + } + catch (...) + { + if (!IsDeviceMapperDevicePresent (deviceMapperName)) + break; + + if (t > 20) + throw; + + Thread::Sleep (100); + } + } + } + } + } + } + } + else + { + for (int t = 0; true; t++) + { + try + { + Process::Execute ("dmsetup", dmsetupArgs); + break; + } + catch (...) + { + if (t > 20) + throw; + + Thread::Sleep (100); + } } } - for (int t = 0; FilesystemPath (devPath).IsBlockDevice() && t < 20; t++) + for (int t = 0; t < 20; t++) { + if (deferred) + { + if (!IsDeviceMapperDevicePresent (deviceMapperName)) + break; + } + else if (!FilesystemPath (devPath).IsBlockDevice()) + break; + Thread::Sleep (100); } - devPath = string (mountedVolume->VirtualDevice) + "_" + StringConverter::ToSingle (devCount++); + if (deferred && devCount >= maxDeviceMapperDeviceCount - 1) + break; + + devPath = virtualDevice + "_" + StringConverter::ToSingle (devCount++); } } + bool CoreLinux::IsDeviceMapperDevicePresent (const string &deviceMapperName) const + { + if (deviceMapperName.empty()) + return false; + + DIR *sysBlockDir = opendir ("/sys/block"); + if (!sysBlockDir) + return FilesystemPath ("/dev/mapper/" + deviceMapperName).IsBlockDevice(); + + bool present = false; + struct dirent *entry; + while ((entry = readdir (sysBlockDir)) != nullptr) + { + string blockDeviceName = entry->d_name; + if (blockDeviceName.find ("dm-") != 0) + continue; + + try + { + TextReader tr ("/sys/block/" + blockDeviceName + "/dm/name"); + string name; + if (tr.ReadLine (name) && name == deviceMapperName) + { + present = true; + break; + } + } + catch (...) { } + } + + closedir (sysBlockDir); + return present; + } + HostDeviceList CoreLinux::GetHostDevices (bool pathListOnly) const { HostDeviceList devices; diff --git a/src/Core/Unix/Linux/CoreLinux.h b/src/Core/Unix/Linux/CoreLinux.h index e4ee4e37..a53aa8c7 100644 --- a/src/Core/Unix/Linux/CoreLinux.h +++ b/src/Core/Unix/Linux/CoreLinux.h @@ -30,11 +30,16 @@ namespace VeraCrypt virtual DevicePath AttachFileToLoopDevice (const FilePath &filePath, bool readOnly) const; virtual void DetachLoopDevice (const DevicePath &devicePath) const; virtual void DismountNativeVolume (shared_ptr mountedVolume) const; + virtual void DismountNativeVolumeDeferred (shared_ptr mountedVolume) const; virtual MountedFilesystemList GetMountedFilesystems (const DevicePath &devicePath = DevicePath(), const DirectoryPath &mountPoint = DirectoryPath()) const; + virtual bool IsLoopDeviceAttached (const DevicePath &devicePath) const; virtual void MountFilesystem (const DevicePath &devicePath, const DirectoryPath &mountPoint, const string &filesystemType, bool readOnly, const string &systemMountOptions) const; virtual void MountVolumeNative (shared_ptr volume, MountOptions &options, const DirectoryPath &auxMountPoint) const; private: + void DismountNativeVolumeInternal (shared_ptr mountedVolume, bool deferred) const; + bool IsDeviceMapperDevicePresent (const string &deviceMapperName) const; + CoreLinux (const CoreLinux &); CoreLinux &operator= (const CoreLinux &); }; diff --git a/src/Main/CommandLineInterface.cpp b/src/Main/CommandLineInterface.cpp index 2b1018fb..0b509ab9 100644 --- a/src/Main/CommandLineInterface.cpp +++ b/src/Main/CommandLineInterface.cpp @@ -44,6 +44,9 @@ namespace VeraCrypt CommandLineInterface::CommandLineInterface (int argc, wchar_t** argv, UserInterfaceType::Enum interfaceType) : ArgCommand (CommandId::None), +#ifdef TC_LINUX + ArgEmergencyUnmount (false), +#endif ArgFilesystem (VolumeCreationOptions::FilesystemType::Unknown), ArgNewPim (-1), ArgNoHiddenVolumeProtection (false), @@ -79,6 +82,9 @@ namespace VeraCrypt parser.AddSwitch (L"", L"delete-token-keyfiles", _("Delete security token keyfiles")); parser.AddSwitch (L"d", L"dismount", _("Unmount volume (deprecated: use 'unmount')")); parser.AddSwitch (L"u", L"unmount", _("Unmount volume")); +#ifdef TC_LINUX + parser.AddSwitch (L"", L"emergency-unmount", _("Attempt emergency cleanup if normal Linux unmount fails")); +#endif parser.AddSwitch (L"", L"display-password", _("Display password while typing")); parser.AddOption (L"", L"encryption", _("Encryption algorithm")); parser.AddSwitch (L"", L"explore", _("Open explorer window for mounted volume")); @@ -405,6 +411,10 @@ namespace VeraCrypt ArgForce = parser.Found (L"force"); +#ifdef TC_LINUX + ArgEmergencyUnmount = parser.Found (L"emergency-unmount"); +#endif + ArgDisableFileSizeCheck = parser.Found (L"no-size-check"); ArgUseLegacyPassword = parser.Found (L"legacy-password-maxlength"); #if defined(TC_LINUX ) || defined (TC_FREEBSD) @@ -730,6 +740,11 @@ namespace VeraCrypt if (param1IsMountedVolumeSpec) ArgVolumes = GetMountedVolumes (parser.GetParamCount() > 0 ? parser.GetParam (0) : wxString()); +#ifdef TC_LINUX + if (ArgEmergencyUnmount && ArgCommand != CommandId::DismountVolumes) + throw_err (L"--emergency-unmount is supported only with an unmount command"); +#endif + if (ArgCommand == CommandId::None && Application::GetUserInterfaceType() == UserInterfaceType::Text) parser.Usage(); } diff --git a/src/Main/CommandLineInterface.h b/src/Main/CommandLineInterface.h index 6889edb7..99f9ee18 100644 --- a/src/Main/CommandLineInterface.h +++ b/src/Main/CommandLineInterface.h @@ -64,6 +64,9 @@ namespace VeraCrypt CommandId::Enum ArgCommand; bool ArgDisplayPassword; shared_ptr ArgEncryptionAlgorithm; +#ifdef TC_LINUX + bool ArgEmergencyUnmount; +#endif shared_ptr ArgFilePath; VolumeCreationOptions::FilesystemType::Enum ArgFilesystem; bool ArgForce; diff --git a/src/Main/Forms/WaitDialog.cpp b/src/Main/Forms/WaitDialog.cpp index c3f972e1..34b16a98 100644 --- a/src/Main/Forms/WaitDialog.cpp +++ b/src/Main/Forms/WaitDialog.cpp @@ -66,6 +66,7 @@ namespace VeraCrypt VC_CONVERT_EXCEPTION (MissingArgument); VC_CONVERT_EXCEPTION (NoItemSelected); VC_CONVERT_EXCEPTION (StringFormatterException); + VC_CONVERT_EXCEPTION (FilesystemDismountFailed); VC_CONVERT_EXCEPTION (ExecutedProcessFailed); VC_CONVERT_EXCEPTION (AlreadyInitialized); VC_CONVERT_EXCEPTION (AssertionFailed); diff --git a/src/Main/UserInterface.cpp b/src/Main/UserInterface.cpp index 5f452b38..3b427550 100644 --- a/src/Main/UserInterface.cpp +++ b/src/Main/UserInterface.cpp @@ -157,8 +157,11 @@ namespace VeraCrypt DismountVolumes (volumes, ignoreOpenFiles, interactive); } - void UserInterface::DismountVolumes (VolumeInfoList volumes, bool ignoreOpenFiles, bool interactive) const + void UserInterface::DismountVolumes (VolumeInfoList volumes, bool ignoreOpenFiles, bool interactive, bool emergencyCleanupRequested) const { +#ifndef TC_LINUX + (void) emergencyCleanupRequested; +#endif BusyScope busy (this); volumes.sort (VolumeInfo::FirstVolumeMountedAfterSecond); @@ -180,6 +183,7 @@ namespace VeraCrypt VolumeInfoList volumesLeft; foreach (shared_ptr volume, volumes) { + bool emergencyCleanupPerformed = false; try { BusyScope busy (this); @@ -207,6 +211,42 @@ namespace VeraCrypt throw UserAbort (SRC_POS); } } +#ifdef TC_LINUX + catch (FilesystemDismountFailed&) + { + if (twoPassMode && firstPass) + { + volumesLeft.push_back (volume); + continue; + } + + if (emergencyCleanupRequested) + { + { + BusyScope busy (this); + volume = Core->EmergencyDismountVolume (volume); + } + emergencyCleanupPerformed = true; + ShowWarning (StringFormatter (LangString["LINUX_EMERGENCY_UNMOUNTED"], wstring (volume->Path))); + } + else if (interactive) + { + if (AskYesNo (StringFormatter (LangString["LINUX_EMERGENCY_UNMOUNT_WARNING"], wstring (volume->Path)), false, true)) + { + { + BusyScope busy (this); + volume = Core->EmergencyDismountVolume (volume); + } + emergencyCleanupPerformed = true; + ShowWarning (StringFormatter (LangString["LINUX_EMERGENCY_UNMOUNTED"], wstring (volume->Path))); + } + else + throw UserAbort (SRC_POS); + } + else + throw; + } +#endif catch (...) { if (twoPassMode && firstPass) @@ -220,9 +260,12 @@ namespace VeraCrypt if (Preferences.Verbose) { - if (!message.IsEmpty()) - message += L'\n'; - message += StringFormatter (LangString["LINUX_VOL_UNMOUNTED"], wstring (volume->Path)); + if (!emergencyCleanupPerformed) + { + if (!message.IsEmpty()) + message += L'\n'; + message += StringFormatter (LangString["LINUX_VOL_UNMOUNTED"], wstring (volume->Path)); + } } } @@ -1133,7 +1176,11 @@ const FileManager fileManagers[] = { return true; case CommandId::DismountVolumes: - DismountVolumes (cmdLine.ArgVolumes, cmdLine.ArgForce, !Preferences.NonInteractive); + DismountVolumes (cmdLine.ArgVolumes, cmdLine.ArgForce, !Preferences.NonInteractive +#ifdef TC_LINUX + , cmdLine.ArgEmergencyUnmount +#endif + ); return true; case CommandId::DisplayVersion: @@ -1277,6 +1324,15 @@ const FileManager fileManagers[] = { " Force mounting of a volume in use, unmounting of a volume in use, or\n" " overwriting a file. Note that this option has no effect on some platforms.\n" "\n" +#ifdef TC_LINUX + "--emergency-unmount\n" + " When used with --unmount on Linux, attempt emergency cleanup if normal\n" + " unmount fails. This recovery operation lazy-detaches the filesystem and\n" + " removes or schedules removal of VeraCrypt kernel objects. Pending writes may\n" + " already have failed, data may be lost, and cleanup may remain pending until\n" + " applications close open files. Use only for stale or removed-device states.\n" + "\n" +#endif "--fs-options=OPTIONS\n" " Filesystem mount options. The OPTIONS argument is passed to mount(8)\n" " command with option -o when a filesystem on a VeraCrypt volume is mounted.\n" @@ -1719,6 +1775,7 @@ const FileManager fileManagers[] = { VC_CONVERT_EXCEPTION (MissingArgument); VC_CONVERT_EXCEPTION (NoItemSelected); VC_CONVERT_EXCEPTION (StringFormatterException); + VC_CONVERT_EXCEPTION (FilesystemDismountFailed); VC_CONVERT_EXCEPTION (ExecutedProcessFailed); VC_CONVERT_EXCEPTION (AlreadyInitialized); VC_CONVERT_EXCEPTION (AssertionFailed); diff --git a/src/Main/UserInterface.h b/src/Main/UserInterface.h index b4ad84d9..4c78066b 100644 --- a/src/Main/UserInterface.h +++ b/src/Main/UserInterface.h @@ -41,7 +41,7 @@ namespace VeraCrypt virtual void DeleteSecurityTokenKeyfiles () const = 0; virtual void DismountAllVolumes (bool ignoreOpenFiles = false, bool interactive = true) const; virtual void DismountVolume (shared_ptr volume, bool ignoreOpenFiles = false, bool interactive = true) const; - virtual void DismountVolumes (VolumeInfoList volumes, bool ignoreOpenFiles = false, bool interactive = true) const; + virtual void DismountVolumes (VolumeInfoList volumes, bool ignoreOpenFiles = false, bool interactive = true, bool emergencyCleanup = false) const; virtual void DisplayVolumeProperties (const VolumeInfoList &volumes) const; virtual void DoShowError (const wxString &message) const = 0; virtual void DoShowInfo (const wxString &message) const = 0;