Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
pmd-ndctl.go: implement FlushDeviceData
Browse files Browse the repository at this point in the history
call flushDevice on block device, this improves pass rate
of csi-sanity in direct-nvdimm mode.
  • Loading branch information
okartau committed Jan 15, 2019
1 parent 98fe98d commit 52e6264
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pmem-device-manager/pmd-ndctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ func (pmem *pmemNdctl) DeleteDevice(name string, flush bool) error {
}

func (pmem *pmemNdctl) FlushDeviceData(name string) error {
return fmt.Errorf("Unsupported for pmem devices")
device, err := pmem.GetDevice(name)
if err != nil {
return err
}
return flushDevice(device)
}

func (pmem *pmemNdctl) GetDevice(name string) (PmemDeviceInfo, error) {
Expand Down

0 comments on commit 52e6264

Please sign in to comment.