qemu-irix/qga
Justin Ossevoort ae0fa48f51 qga/commands-posix: Fix bug in guest-fstrim
The FITRIM ioctl updates the fstrim_range structure it receives. This
way the caller can determine how many bytes were trimmed. The
guest-fstrim logic reuses the same fstrim_range for each filesystem,
effectively limiting each filesystem to trim at most as much as the
previous was able to trim.

If a previous filesystem would have trimmed 0 bytes, than the next
filesystem would report an error 'Invalid argument' because a FITRIM
request with length 0 is not valid.

This change resets the fstrim_range structure for each filesystem.

Signed-off-by: Justin Ossevoort <justin@quarantainenet.nl>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
(cherry picked from commit 73a652a1b0)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2015-07-29 18:24:00 -05:00
..
vss-win32 qga: fitering out -fstack-protector-strong 2015-04-02 15:57:27 +02:00
Makefile.objs qemu-ga: Call Windows VSS requester in fsfreeze command handler 2013-09-09 14:17:57 -05:00
channel-posix.c channel-posix: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) 2014-08-15 18:03:13 +01:00
channel-win32.c qemu-ga: isa-serial support on Windows 2014-02-23 18:38:18 -06:00
channel.h qemu-ga: move channel/transport functionality into wrapper class 2012-02-23 15:40:16 -06:00
commands-posix.c qga/commands-posix: Fix bug in guest-fstrim 2015-07-29 18:24:00 -05:00
commands-win32.c qemu-ga-win: Fail loudly on bare 'set-time' 2015-02-17 16:21:50 -06:00
commands.c qga: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:26 -04:00
guest-agent-command-state.c
guest-agent-core.h qga: Disable unsupported commands by default 2014-08-07 17:15:53 -05:00
main.c qga: fix false negative argument passing 2014-11-17 11:41:25 +01:00
qapi-schema.json qemu-ga-win: Fail loudly on bare 'set-time' 2015-02-17 16:21:50 -06:00
service-win32.c qga: escape cmdline args when registering win32 service (CVE-2013-2231) 2013-07-25 14:49:04 -05:00
service-win32.h qga: save state directory in ga_install_service() 2013-05-30 11:37:37 -05:00
vss-win32.c qga: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:26 -04:00
vss-win32.h qga: Consistently name Error ** objects errp, and not err 2014-05-09 09:11:26 -04:00