public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Wouter Verhelst <w@uter.be>
Cc: Alex Bligh <alex@alex.org.uk>,
	"nbd-general@lists.sourceforge.net" 
	<nbd-general@lists.sourceforge.net>, Jens Axboe <axboe@fb.com>,
	Josef Bacik <jbacik@fb.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@infradead.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [Nbd] [PATCH][V3] nbd: add multi-connection support
Date: Thu, 6 Oct 2016 03:31:55 -0700	[thread overview]
Message-ID: <20161006103155.GA20279@infradead.org> (raw)
In-Reply-To: <20161006090415.xme3mgcjtkdx2j5f@grep.be>

On Thu, Oct 06, 2016 at 11:04:15AM +0200, Wouter Verhelst wrote:
> In the current situation, a client could opportunistically send a number
> of write requests immediately followed by a flush and hope for the best.
> However, in that case there is no guarantee that for the write requests
> that the client actually cares about to have hit the disk, a reply
> arrives on the client side before the flush reply arrives. If that
> doesn't happen, that would then mean the client would have to issue
> another flush request, probably at a performance hit.

There is also no guarantee that the server would receive them in order.

Note that people looked into schemes like this multiple times using
a SCSI feature called ordered tags which should provide this sort
of ordering, but no one managed to make it work reliably.

> As I understand Christoph's explanations, currently the Linux kernel
> *doesn't* issue flush requests unless and until the necessary writes
> have already completed (i.e., the reply has been received and processed
> on the client side). Given that, given the issue in the previous
> paragraph, and given the uncertainty introduced with multiple
> connections, I think it is reasonable to say that a client should just
> not assume a flush touches anything except for the writes for which it
> has already received a reply by the time the flush request is sent out.

Exactly.  That's the wording in other protocol specifications, and the
semantics Linux (and Windows) rely on.

> Christoph: just to double-check: would such semantics be incompatible
> with the semantics that the Linux kernel expects of block devices? If
> so, we'll have to review. Otherwise, I think we should go with that.

No, they match the cache flush semantics in every other storage protocol
known to me, and they match the expectations of both the Linux kernel
and any other OS or comsumer I know about perfectly.

  parent reply	other threads:[~2016-10-06 10:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 20:01 [PATCH][V3] nbd: add multi-connection support Josef Bacik
2016-09-29  9:52 ` [Nbd] " Wouter Verhelst
2016-09-29 14:03   ` Josef Bacik
2016-09-29 16:41     ` Wouter Verhelst
2016-09-29 16:59       ` Josef Bacik
2016-10-02 16:17         ` Alex Bligh
2016-10-03  1:47           ` Josef Bacik
2016-10-03  7:20             ` Christoph Hellwig
2016-10-03  7:51               ` Wouter Verhelst
2016-10-03  7:57                 ` Christoph Hellwig
2016-10-03 11:34                   ` Alex Bligh
2016-10-03 14:32                     ` Josef Bacik
2016-10-03 14:46                       ` Alex Bligh
2016-10-03 21:07                     ` Wouter Verhelst
2016-10-04  9:35                       ` Alex Bligh
2016-10-06  9:04                         ` Wouter Verhelst
2016-10-06  9:41                           ` Alex Bligh
2016-10-06 10:15                             ` Wouter Verhelst
2016-10-06 11:04                               ` Alex Bligh
2016-10-06 10:31                           ` Christoph Hellwig [this message]
2016-10-06 13:09                             ` Wouter Verhelst
2016-10-06 13:16                               ` Christoph Hellwig
2016-10-06 13:55                                 ` Wouter Verhelst
2016-10-03  7:49           ` Wouter Verhelst
2016-10-11  9:00 ` Sagi Grimberg

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=20161006103155.GA20279@infradead.org \
    --to=hch@infradead.org \
    --cc=Kernel-team@fb.com \
    --cc=alex@alex.org.uk \
    --cc=axboe@fb.com \
    --cc=jbacik@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=w@uter.be \
    /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