* ublk vs write cache and FUA @ 2022-07-21 15:14 Christoph Hellwig 2022-07-21 15:27 ` Ming Lei 0 siblings, 1 reply; 3+ messages in thread From: Christoph Hellwig @ 2022-07-21 15:14 UTC (permalink / raw) To: ming.lei; +Cc: linux-block 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? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ublk vs write cache and FUA 2022-07-21 15:14 ublk vs write cache and FUA Christoph Hellwig @ 2022-07-21 15:27 ` Ming Lei 2022-07-22 9:06 ` Ming Lei 0 siblings, 1 reply; 3+ messages in thread From: Ming Lei @ 2022-07-21 15:27 UTC (permalink / raw) To: Christoph Hellwig; +Cc: linux-block, ming.lei On Thu, Jul 21, 2022 at 05:14:58PM +0200, Christoph Hellwig wrote: > 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? 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ublk vs write cache and FUA 2022-07-21 15:27 ` Ming Lei @ 2022-07-22 9:06 ` Ming Lei 0 siblings, 0 replies; 3+ messages in thread From: Ming Lei @ 2022-07-22 9:06 UTC (permalink / raw) To: Christoph Hellwig; +Cc: linux-block, ming.lei On Thu, Jul 21, 2022 at 11:27:28PM +0800, Ming Lei wrote: > On Thu, Jul 21, 2022 at 05:14:58PM +0200, Christoph Hellwig wrote: > > 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? > > 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. 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-22 9:08 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-07-21 15:14 ublk vs write cache and FUA Christoph Hellwig 2022-07-21 15:27 ` Ming Lei 2022-07-22 9:06 ` Ming Lei
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox