qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Casasnovas <quentin.casasnovas@oracle.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com>,
	Eric Blake <eblake@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"nbd-general@lists.sourceforge.net"
	<nbd-general@lists.sourceforge.net>,
	"qemu-stable@nongnu.org" <qemu-stable@nongnu.org>,
	qemu block <qemu-block@nongnu.org>
Subject: Re: [Qemu-trivial] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE
Date: Tue, 10 May 2016 18:27:50 +0200	[thread overview]
Message-ID: <20160510162750.GE28315@chrystal.uk.oracle.com> (raw)
In-Reply-To: <8F0007CD-40E2-43C1-8196-B4BE401B8EF4@alex.org.uk>

On Tue, May 10, 2016 at 05:23:21PM +0100, Alex Bligh wrote:
> 
> On 10 May 2016, at 17:04, Quentin Casasnovas <quentin.casasnovas@oracle.com> wrote:
> 
> > Alright, I assumed by 'length of an NBD request', the specification was
> > talking about the length of.. well, the request as opposed to whatever is
> > in the length field of the request header.
> 
> With NBD_CMD_TRIM the length in the header field is 32 bit and specifies
> the length of data to trim, not the length of the data transferred (which
> is none).
> 
> > Is there a use case where you'd want to split up a single big TRIM request
> > in smaller ones (as in some hardware would not support it or something)?
> > Even then, it looks like this splitting up would be hardware dependant and
> > better implemented in block device drivers.
> 
> Part of the point of the block size extension is to push such limits to the
> client.
> 
> I could make up use cases (e.g. that performing a multi-gigabyte trim in
> a single threaded server will effectively block all other I/O), but the
> main reason in my book is orthogonality, and the fact the client needs
> to do some breaking up anyway.
> 
> > I'm just finding odd that something that fits inside the length field can't
> > be used.
> 
> That's a different point. That's Qemu's 'Denial of Service Attack'
> prevention, *not* maximum block sizes. It isn't dropping it because
> of a maximum block size parameter. If it doesn't support the block size
> extension which the version you're looking at does not, it's meant
> to handle requests up to 2^32-1 long EXCEPT that it MAY error requests
> so long as to cause a denial of service attack. As this doesn't fit
> into that case (it's a TRIM), it shouldn't be erroring it on that grounds.
> 
> I agree Qemu should fix that.
> 
> (So in a sense Eric and I are arguing about something irrelevant to
> your current problem, which is how this would work /with/ the block
> size extensions, as Eric is in the process of implementing them).
> 

Riight!  OK understood, thanks for the explanation.

Quentin


  reply	other threads:[~2016-05-10 16:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-06  8:45 [Qemu-trivial] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE Quentin Casasnovas
2016-05-10 14:01 ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2016-05-10 15:08   ` [Qemu-trivial] [Nbd] " Alex Bligh
2016-05-10 15:29     ` Eric Blake
2016-05-10 15:38       ` Alex Bligh
2016-05-10 15:45         ` Quentin Casasnovas
2016-05-10 15:49           ` Alex Bligh
2016-05-10 16:04             ` Quentin Casasnovas
2016-05-10 16:23               ` Alex Bligh
2016-05-10 16:27                 ` Quentin Casasnovas [this message]
2016-05-11  9:38                 ` Paolo Bonzini
2016-05-11 14:08                   ` Eric Blake
2016-05-11 14:55                     ` Alex Bligh
2016-05-11 15:08                       ` Paolo Bonzini
2016-05-10 17:55         ` Paolo Bonzini
2016-05-11 21:12         ` Wouter Verhelst
2016-05-12 15:33           ` Alex Bligh
2016-05-10 15:41       ` Alex Bligh
2016-05-10 15:46         ` Eric Blake
2016-05-10 15:52           ` Alex Bligh
2016-05-10 15:54           ` Quentin Casasnovas
2016-05-10 16:33             ` Quentin Casasnovas
2016-05-10 20:24               ` Eric Blake
2016-05-10 19:13         ` Michał Belczyk
2016-05-11 21:10       ` Wouter Verhelst
2016-05-11 21:06     ` Wouter Verhelst
2016-05-12 15:03       ` Alex Bligh
2016-05-10 20:34 ` [Qemu-trivial] " Eric Blake
2016-05-11  8:34   ` Quentin Casasnovas
2016-05-11 14:11     ` Eric Blake

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=20160510162750.GE28315@chrystal.uk.oracle.com \
    --to=quentin.casasnovas@oracle.com \
    --cc=alex@alex.org.uk \
    --cc=eblake@redhat.com \
    --cc=nbd-general@lists.sourceforge.net \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=qemu-trivial@nongnu.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;
as well as URLs for NNTP newsgroup(s).