Commit Graph

2 Commits

Author SHA1 Message Date
Conghui Chen 49322ac002 dm: storage: support cache mode toggling
1. support "writeback" and "writethru" mode toggling for virtio-blk
conditionally. When starting DM with "writethru" parameter in
virtio-blk, guest OS could not toggle cache mode. When starting DM
with "writeback" parameter in virtio-blk, guest OS could toggle
cache mode.

    ------------------------------
    DM cmdline  | toggle support
    ------------+-----------------
    writeback   | yes
    writethru   | no
    ------------------------------

2. To toggle cache mode, run below command in guest OS:

    echo "write back" > /sys/devices/xxx/vdx/cache_type
OR
    echo "write through" > /sys/devices/xxx/vdx/cache_type

Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-08-10 10:33:21 +08:00
Anthony Xu bd31b1c53e initial import
internal commit: 0ab1ea615e5cfbb0687a9d593a86a7b774386076

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2018-05-11 14:44:28 +08:00