From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id 6A31029E12 for ; Wed, 4 Dec 2013 15:55:07 -0600 (CST) Date: Wed, 4 Dec 2013 15:55:06 -0600 From: Ben Myers Subject: Re: [PATCH] xfs: don't perform discard if the given range length is less than block size Message-ID: <20131204215506.GC1935@sgi.com> References: <528C6E15.3030801@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <528C6E15.3030801@oracle.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Jeff Liu Cc: "xfs@oss.sgi.com" On Wed, Nov 20, 2013 at 04:08:53PM +0800, Jeff Liu wrote: > From: Jie Liu > > For discard operation, we should return EINVAL if the given range length > is less than a block size, otherwise it will go through the file system > to discard data blocks as the end range might be evaluated to -1, e.g, > # fstrim -v -o 0 -l 100 /xfs7 > /xfs7: 9811378176 bytes were trimmed > > This issue can be triggered via xfstests/generic/288. > > Also, it seems to get the request queue pointer via bdev_get_queue() > instead of the hard code pointer dereference is not a bad thing. > > Signed-off-by: Jie Liu Applied this. _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs