// Copyright 2023 The ChromiumOS Authors1// Use of this source code is governed by a BSD-style license that can be2// found in the LICENSE file.34use anyhow::Context;5use disk::DiskFile;67use crate::virtio::scsi::ScsiOption;89impl ScsiOption {10pub fn open(&self) -> anyhow::Result<Box<dyn DiskFile>> {11// We only support sparse disks for now.12disk::open_disk_file(disk::DiskFileParams {13path: self.path.clone(),14is_read_only: self.read_only,15is_sparse_file: true,16is_overlapped: false,17is_direct: false,18lock: self.lock,19depth: 0,20})21.context("open_disk_file failed")22}23}242526