Skip to content

Commit 31abec4

Browse files
author
Xun Chen
committed
Extend tcmu dev_config to support optional device ID
Signed-off-by: Xun Chen <xunchen@hust.edu.cn>
1 parent f8c14ca commit 31abec4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/snapshot/storage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func AttachDevice(ctx context.Context, params *AttachDeviceParams) (devName stri
299299
}
300300
}()
301301

302-
if err = os.WriteFile(path.Join(targetPath, "control"), ([]byte)(fmt.Sprintf("dev_config=overlaybd/%s", configPath)), 0666); err != nil {
302+
if err = os.WriteFile(path.Join(targetPath, "control"), ([]byte)(fmt.Sprintf("dev_config=overlaybd/%s;%s", configPath, snID)), 0666); err != nil {
303303
return devName, fmt.Errorf("failed to write target dev_config for %s: dev_config=overlaybd/%s: %w", targetPath, configPath, err)
304304
}
305305

0 commit comments

Comments
 (0)