| To: | Jeff Liu <jeff.liu@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] xfs: don't perform discard if the given range length is less than block size |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Wed, 20 Nov 2013 09:31:57 -0800 |
| Cc: | "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <528C6E15.3030801@xxxxxxxxxx> |
| References: | <528C6E15.3030801@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Wed, Nov 20, 2013 at 04:08:53PM +0800, Jeff Liu wrote: > From: Jie Liu <jeff.liu@xxxxxxxxxx> > > 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@xxxxxx> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] xfs: don't perform discard if the given range length is less than block size, Jeff Liu |
|---|---|
| Next by Date: | [PATCH] xfstests: use correct size value in generic/273, Brian Foster |
| Previous by Thread: | [PATCH] xfs: don't perform discard if the given range length is less than block size, Jeff Liu |
| Next by Thread: | [PATCH] xfstests: use correct size value in generic/273, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |