qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qga/commands-posix: Fix bug in guest-fstrim


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v2] qga/commands-posix: Fix bug in guest-fstrim
Date: Wed, 29 Apr 2015 12:42:10 +0200

 Hi Justin,

On Wed,  1 Apr 2015 14:35:51 +0200
Justin Ossevoort <address@hidden> wrote:

> 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. It
> returns a list of all trimmed filesystems with their status. If the
> trime operation succeeded it returns the amount of bytes trimmed and
> the effective minimum chunk size. On error it returns the value of
> the errno for that filesystem operation (instead of aborting the
> request).

I think I've ran into the same problem today - guest-fstrim failed with
"invalid argument" when being used with multiple file systems.
Could you maybe split your patch in two parts, so that the first patch
just fixes the issue with struct fstrim_range and the second patch does
all the extensions to the guest agent call? That makes the patch easier
to review and the bug fix itself could be cherry-picked easier to the
stable branches later (i.e. for the first patch, you should/could CC:
to the qemu-stable mailing list, too).

 Thanks!
  Thomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]