xfs
[Top] [All Lists]

Re: [PATCH 2/2] 251: Do not allow step to be zero

To: Lukas Czerner <lczerner@xxxxxxxxxx>
Subject: Re: [PATCH 2/2] 251: Do not allow step to be zero
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 17 Oct 2012 07:18:29 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1350380494-17482-2-git-send-email-lczerner@xxxxxxxxxx>
References: <1350380494-17482-1-git-send-email-lczerner@xxxxxxxxxx> <1350380494-17482-2-git-send-email-lczerner@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Oct 16, 2012 at 11:41:34AM +0200, Lukas Czerner wrote:
> Currently 'step' variable which is used as length of the range to
> discard can be zero. However it would result in error returned by the
> fstrim.
> 
> Fix this by forcing 'step' to be at least 4KB.
> 
> Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx>

Looks fine. It may not be perfect for large block filesystems (e.g.
on ppc or ia64) but it's better than nothing right now.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>