mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Add internal option to skip fs freeze in device suspend.
This commit is contained in:
committed by
Milan Broz
parent
de86ff051e
commit
052a4f432c
@@ -907,6 +907,10 @@ static int _dm_simple(int task, const char *name, uint32_t dmflags)
|
||||
if (name && !dm_task_set_name(dmt, name))
|
||||
goto out;
|
||||
|
||||
if (task == DM_DEVICE_SUSPEND &&
|
||||
(dmflags & DM_SUSPEND_SKIP_LOCKFS) && !dm_task_skip_lockfs(dmt))
|
||||
goto out;
|
||||
|
||||
r = dm_task_run(dmt);
|
||||
out:
|
||||
dm_task_destroy(dmt);
|
||||
@@ -1277,6 +1281,9 @@ static int _dm_resume_device(const char *name, uint32_t dmflags)
|
||||
if (!dm_task_set_name(dmt, name))
|
||||
goto out;
|
||||
|
||||
if ((dmflags & DM_SUSPEND_SKIP_LOCKFS) && !dm_task_skip_lockfs(dmt))
|
||||
goto out;
|
||||
|
||||
if (_dm_use_udev() && !_dm_task_set_cookie(dmt, &cookie, udev_flags))
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ struct crypt_params_integrity;
|
||||
|
||||
/* Device mapper internal flags */
|
||||
#define DM_RESUME_PRIVATE (1 << 4) /* CRYPT_ACTIVATE_PRIVATE */
|
||||
#define DM_SUSPEND_SKIP_LOCKFS (1 << 5)
|
||||
|
||||
static inline uint32_t act2dmflags(uint32_t act_flags)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user