On 23/07/19 14:17, Zhong, Yang wrote: > When I set config-wce=true or false, the below value never change > root@unicorn ~ # cat /sys/block/vda/cache_type > write back > root@unicorn ~ # cat /sys/block/vda/device/features > 0010 0010 0110 0110 0000 0000 0000 1000 1000 0000 0000 0000 0000 0000 0000 > 0000 > From left to right, bit 11=0, which show there is no WCE feature in > vhost-user-blk device.
Does your backend expose the feature in the VHOST_GET_FEATURES message? > I also did one simple patch to add config_wce value into s->blkcfg.wce, but > the result is same. config_wce doesn't tell you if you are in writeback or writethrough mode, it tells you if you can *change* the mode. If your backend did not expose the feature, try changing that and then "echo write through > /sys/block/vda/cache_type" should work? Paolo