[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH] nbd: fix trim/discard commands wi
From: |
Quentin Casasnovas |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE |
Date: |
Wed, 11 May 2016 10:34:12 +0200 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Tue, May 10, 2016 at 02:34:18PM -0600, Eric Blake wrote:
> On 05/06/2016 02:45 AM, Quentin Casasnovas wrote:
> > When running fstrim on a filesystem mounted through qemu-nbd with
> > --discard=on, fstrim would fail with I/O errors:
> >
> > $ fstrim /k/spl/ice/
> > fstrim: /k/spl/ice/: FITRIM ioctl failed: Input/output error
> >
> > and qemu-nbd was spitting these:
> >
> > nbd.c:nbd_co_receive_request():L1232: len (94621696) is larger than max
> > len (33554432)
>
> Your patch duplicates what is already present in qemu:
>
> commit eb38c3b67018ff8069e4f674a28661931a8a3e4f
> Author: Paolo Bonzini <address@hidden>
> Date: Thu Jan 7 14:32:42 2016 +0100
>
> nbd-server: do not check request length except for reads and writes
>
> Only reads and writes need to allocate memory correspondent to the
> request length. Other requests can be sent to the storage without
> allocating any memory, and thus any request length is acceptable.
>
> Reported-by: Sitsofe Wheeler <address@hidden>
> Cc: address@hidden
> Reviewed-by: Max Reitz <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
>
> For the purposes of qemu-stable, it's better to backport the existing
> patch than to write a new version of it.
>
Ha sorry I missed this! I wouldn't have tried to debug/fix myself otherwise :)
> It also helps to state what version of qemu you were testing, as it is
> obviously not the (soon-to-be-released) version 2.6 which already has
> the fix.
>
I was using qemu-2.5.0-rc3 on Gentoo but this was also verified on some
Debian systems which appears to be on 1.1.2+dfsg-6a+deb7u12 and on Ubuntu
Xenial 2.0.0+dfsg-2ubuntu1.22.
I wrote the patch on top of https://github.com/bonzini/qemu.git:master
(a7e00e2) which didn't contain the fix last Friday.
Anyway, cool if the fix is going into mainline :)
Quentin
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, (continued)
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Paolo Bonzini, 2016/05/10
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Wouter Verhelst, 2016/05/12
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Alex Bligh, 2016/05/12
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Wouter Verhelst, 2016/05/12
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Wouter Verhelst, 2016/05/12
- Re: [Qemu-stable] [Nbd] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Alex Bligh, 2016/05/12
Re: [Qemu-stable] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE, Eric Blake, 2016/05/10
- Re: [Qemu-stable] [Qemu-devel] [PATCH] nbd: fix trim/discard commands with a length bigger than NBD_MAX_BUFFER_SIZE,
Quentin Casasnovas <=