From: Eric Blake <eblake@redhat.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.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 09:46:36 -0600 [thread overview]
Message-ID: <5732025C.2050703@redhat.com> (raw)
In-Reply-To: <C84A91D0-D90A-4B7B-B72D-A33E1C189354@alex.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]
On 05/10/2016 09:41 AM, Alex Bligh wrote:
>
> On 10 May 2016, at 16:29, Eric Blake <eblake@redhat.com> wrote:
>
>> So the kernel is currently one of the clients that does NOT honor block
>> sizes, and as such, servers should be prepared for ANY size up to
>> UINT_MAX (other than DoS handling).
>
> Interesting followup question:
>
> If the kernel does not fragment TRIM requests at all (in the
> same way it fragments read and write requests), I suspect
> something bad may happen with TRIM requests over 2^31
> in size (particularly over 2^32 in size), as the length
> field in nbd only has 32 bits.
>
> Whether it supports block size constraints or not, it is
> going to need to do *some* breaking up of requests.
Does anyone have an easy way to cause the kernel to request a trim
operation that large on a > 4G export? I'm not familiar enough with
EXT4 operation to know what file system operations you can run to
ultimately indirectly create a file system trim operation that large.
But maybe there is something simpler - does the kernel let you use the
fallocate(2) syscall operation with FALLOC_FL_PUNCH_HOLE or
FALLOC_FL_ZERO_RANGE on an fd backed by an NBD device?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Eric Blake <eblake@redhat.com>
To: Alex Bligh <alex@alex.org.uk>
Cc: Quentin Casasnovas <quentin.casasnovas@oracle.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-devel] [Nbd] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE
Date: Tue, 10 May 2016 09:46:36 -0600 [thread overview]
Message-ID: <5732025C.2050703@redhat.com> (raw)
In-Reply-To: <C84A91D0-D90A-4B7B-B72D-A33E1C189354@alex.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1318 bytes --]
On 05/10/2016 09:41 AM, Alex Bligh wrote:
>
> On 10 May 2016, at 16:29, Eric Blake <eblake@redhat.com> wrote:
>
>> So the kernel is currently one of the clients that does NOT honor block
>> sizes, and as such, servers should be prepared for ANY size up to
>> UINT_MAX (other than DoS handling).
>
> Interesting followup question:
>
> If the kernel does not fragment TRIM requests at all (in the
> same way it fragments read and write requests), I suspect
> something bad may happen with TRIM requests over 2^31
> in size (particularly over 2^32 in size), as the length
> field in nbd only has 32 bits.
>
> Whether it supports block size constraints or not, it is
> going to need to do *some* breaking up of requests.
Does anyone have an easy way to cause the kernel to request a trim
operation that large on a > 4G export? I'm not familiar enough with
EXT4 operation to know what file system operations you can run to
ultimately indirectly create a file system trim operation that large.
But maybe there is something simpler - does the kernel let you use the
fallocate(2) syscall operation with FALLOC_FL_PUNCH_HOLE or
FALLOC_FL_ZERO_RANGE on an fd backed by an NBD device?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-05-10 15:47 UTC|newest]
Thread overview: 60+ 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-06 8:45 ` [Qemu-devel] " Quentin Casasnovas
2016-05-10 14:01 ` [Qemu-trivial] " Eric Blake
2016-05-10 14:01 ` Eric Blake
2016-05-10 15:08 ` [Qemu-trivial] [Nbd] " Alex Bligh
2016-05-10 15:08 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 15:29 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Eric Blake
2016-05-10 15:29 ` [Qemu-devel] [Nbd] " Eric Blake
2016-05-10 15:38 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-10 15:38 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 15:45 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Quentin Casasnovas
2016-05-10 15:45 ` [Qemu-devel] [Nbd] " Quentin Casasnovas
2016-05-10 15:49 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-10 15:49 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 16:04 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Quentin Casasnovas
2016-05-10 16:04 ` [Qemu-devel] [Nbd] " Quentin Casasnovas
2016-05-10 16:23 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-10 16:23 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 16:27 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Quentin Casasnovas
2016-05-10 16:27 ` [Qemu-devel] [Nbd] " Quentin Casasnovas
2016-05-11 9:38 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Paolo Bonzini
2016-05-11 9:38 ` [Qemu-devel] [Nbd] " Paolo Bonzini
2016-05-11 14:08 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Eric Blake
2016-05-11 14:08 ` [Qemu-devel] [Nbd] " Eric Blake
2016-05-11 14:55 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-11 14:55 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-11 15:08 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Paolo Bonzini
2016-05-11 15:08 ` [Qemu-devel] [Nbd] " Paolo Bonzini
2016-05-10 17:55 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Paolo Bonzini
2016-05-10 17:55 ` [Qemu-devel] [Nbd] " Paolo Bonzini
2016-05-11 21:12 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Wouter Verhelst
2016-05-11 21:12 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-05-12 15:33 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-12 15:33 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 15:41 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-10 15:41 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 15:46 ` Eric Blake [this message]
2016-05-10 15:46 ` Eric Blake
2016-05-10 15:52 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-10 15:52 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 15:54 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Quentin Casasnovas
2016-05-10 15:54 ` [Qemu-devel] [Nbd] " Quentin Casasnovas
2016-05-10 16:33 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Quentin Casasnovas
2016-05-10 16:33 ` [Qemu-devel] [Nbd] " Quentin Casasnovas
2016-05-10 20:24 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Eric Blake
2016-05-10 20:24 ` [Qemu-devel] [Nbd] " Eric Blake
2016-05-10 19:13 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Michał Belczyk
2016-05-10 19:13 ` [Qemu-devel] [Nbd] " Michał Belczyk
2016-05-11 21:10 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Wouter Verhelst
2016-05-11 21:10 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-05-11 21:06 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Wouter Verhelst
2016-05-11 21:06 ` [Qemu-devel] [Nbd] " Wouter Verhelst
2016-05-12 15:03 ` [Qemu-trivial] [Nbd] [Qemu-devel] " Alex Bligh
2016-05-12 15:03 ` [Qemu-devel] [Nbd] " Alex Bligh
2016-05-10 20:34 ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2016-05-10 20:34 ` Eric Blake
2016-05-11 8:34 ` [Qemu-trivial] " Quentin Casasnovas
2016-05-11 8:34 ` Quentin Casasnovas
2016-05-11 14:11 ` [Qemu-trivial] " Eric Blake
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=5732025C.2050703@redhat.com \
--to=eblake@redhat.com \
--cc=alex@alex.org.uk \
--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 \
--cc=quentin.casasnovas@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.