ublk vs write cache and FUA
Hi Ming,
ublk implements REQ_OP_FLUSH and REQ_FUA, but will never see those as it never calls blk_queue_write_cache. Can we drop the code? Or should there be a flag to enable write cache and fua support when setting up a device?
Quoted 6 lines · Christoph Hellwig
Hi Ming,
ublk implements
REQ_OP_FLUSHandREQ_FUA, but will never see those as it never callsblk_queue_write_cache. Can we drop the code? Or should there be a flag to enable write cache and fua support when setting up a device?
There should have been flags defined in ublksrv_ctrl_dev_info for describe wc/fua info, since ublk_drv doesn't handle any device specific logic.
So please keep REQ_OP_FLUSH and REQ_FUA which two should be useful, and I will add flags and related code to use them.
Thanks,
Ming
Quoted 8 lines · Ming Lei
Quoted 6 lines · Christoph Hellwig
Hi Ming,
ublk implements
REQ_OP_FLUSHandREQ_FUA, but will never see those as it never callsblk_queue_write_cache. Can we drop the code? Or should there be a flag to enable write cache and fua support when setting up a device?
Quoted 5 lines
There should have been flags defined in
ublksrv_ctrl_dev_infofor describe wc/fua info, sinceublk_drvdoesn't handle any device specific logic.So please keep
REQ_OP_FLUSHandREQ_FUAwhich two should be useful, and I will add flags and related code to use them.
Actually we can add two commands for set/get device parameter, then at least generic block device parameters(wc, fua, discard, zoned, rototional, ...) can be configurable, so all kinds of block device can be simulated with userspace ublk.
Thanks,
Ming