We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dbecbb commit 5a2ed2fCopy full SHA for 5a2ed2f
utils/devices/luks/luks_linux.go
@@ -230,8 +230,8 @@ func (d *LUKSDevice) Open(ctx context.Context, luksPassphrase string) error {
230
}
231
232
output, err := d.command.ExecuteWithTimeoutAndInput(
233
- ctx, "cryptsetup", luksCommandTimeout, true, luksPassphrase, "open", device,
234
- luksDeviceName, "--type", "luks2",
+ ctx, "cryptsetup", luksCommandTimeout, true, luksPassphrase,
+ "open", device, luksDeviceName, "--type", "luks2", "--allow-discards", "--persistent",
235
)
236
if err != nil {
237
Logc(ctx).WithFields(LogFields{
utils/devices/luks/luks_linux_test.go
@@ -47,6 +47,7 @@ func mockCryptsetupLuksOpen(mock *mockexec.MockCommand) *gomock.Call {
47
return mock.EXPECT().ExecuteWithTimeoutAndInput(
48
gomock.Any(), "cryptsetup", luksCommandTimeout, true, gomock.Any(),
49
"open", gomock.Any(), gomock.Any(), "--type", "luks2",
50
+ "--allow-discards", "--persistent",
51
52
53
@@ -58,8 +59,8 @@ func mockCryptsetupLuksStatusWithDevicePath(mock *mockexec.MockCommand) *gomock.
58
59
60
func mockCryptsetupLuksTestPassphrase(mock *mockexec.MockCommand) *gomock.Call {
61
- gomock.Any(), "cryptsetup", luksCommandTimeout, true, gomock.Any(), "open", gomock.Any(),
62
- gomock.Any(), "--type", "luks2", "--test-passphrase",
+ gomock.Any(), "cryptsetup", luksCommandTimeout, true, gomock.Any(),
63
+ "open", gomock.Any(), gomock.Any(), "--type", "luks2", "--test-passphrase",
64
65
66
0 commit comments