public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs: don't perform discard if the given range length is less than block size
Date: Wed, 20 Nov 2013 09:31:57 -0800	[thread overview]
Message-ID: <20131120173157.GA31744@infradead.org> (raw)
In-Reply-To: <528C6E15.3030801@oracle.com>

On Wed, Nov 20, 2013 at 04:08:53PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
> 
> 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.

Thanks for catching this.

> 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.

I don't think bdev_get_queue is overly useful, but if there's not
other comments on that patch feel free to change it.

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-11-20 17:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  8:08 [PATCH] xfs: don't perform discard if the given range length is less than block size Jeff Liu
2013-11-20 17:31 ` Christoph Hellwig [this message]
2013-12-04 21:55 ` Ben Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131120173157.GA31744@infradead.org \
    --to=hch@infradead.org \
    --cc=jeff.liu@oracle.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox