public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-block@vger.kernel.org, ming.lei@redhat.com
Subject: Re: ublk vs write cache and FUA
Date: Fri, 22 Jul 2022 17:06:41 +0800	[thread overview]
Message-ID: <YtpooYTRpjuV3dV4@T590> (raw)
In-Reply-To: <YtlwYKu8S4SV68MK@T590>

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


      reply	other threads:[~2022-07-22  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YtpooYTRpjuV3dV4@T590 \
    --to=ming.lei@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox