From: Ming Lei <ming.lei@redhat.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: Omar Sandoval <osandov@fb.com>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: [PATCH] block/025: test discard sector alignement and sector size overflow
Date: Tue, 27 Nov 2018 09:46:29 +0800 [thread overview]
Message-ID: <20181127014628.GA25199@ming.t460p> (raw)
In-Reply-To: <20181127003310.GA846@vader>
On Mon, Nov 26, 2018 at 04:33:10PM -0800, Omar Sandoval wrote:
> On Thu, Nov 15, 2018 at 12:00:17PM +0800, Ming Lei wrote:
> > This test covers the following two issues:
> >
> > 1) discard sector need to be aligned with logical block size
> >
> > 2) make sure 'sector_t' instead of 'unsigned int' is used when comparing
> > with discard sector size
> >
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
> > ---
> > tests/block/025 | 37 +++++++++++++++++++++++++++++++++++++
> > tests/block/025.out | 2 ++
> > 2 files changed, 39 insertions(+)
> > create mode 100755 tests/block/025
> > create mode 100644 tests/block/025.out
> >
> > diff --git a/tests/block/025 b/tests/block/025
> > new file mode 100755
> > index 000000000000..32b632431793
> > --- /dev/null
> > +++ b/tests/block/025
> > @@ -0,0 +1,37 @@
> > +#!/bin/bash
> > +# SPDX-License-Identifier: GPL-3.0+
> > +# Copyright (C) 2018 Ming Lei <ming.lei@redhat.com>
> > +#
> > +# Check two corener cases of BLKDISCARD.
> > +#
> > +# 1) test if discard bio's sector is algined with logical size, fixed by
> > +# 1adfc5e4136f ("block: make sure discard bio is aligned with logical block size")
>
> Hm, I'm not seeing how this test case tests this commit. Aren't 2049G
> and 512M both aligned to 4096 bytes?
2049G caused 32bit 'nr_sects' in __blkdev_issue_discard() overflow,
please see commit 4800bf7bc8c725e955fcb ("block: fix 32 bit overflow in __blkdev_issue_discard()").
4096 logical block size may trigger 'req_sects' un-alignment issue
because 'nr_sects' from fs is 512byte aligned, please see 1adfc5e4136f5967d59 ("block:
make sure discard bio is aligned with logical block size").
Thanks,
Ming
next prev parent reply other threads:[~2018-11-27 1:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 4:00 [PATCH] block/025: test discard sector alignement and sector size overflow Ming Lei
2018-11-21 2:32 ` Ming Lei
2018-11-27 0:33 ` Omar Sandoval
2018-11-27 1:46 ` Ming Lei [this message]
2018-12-05 23:39 ` Omar Sandoval
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=20181127014628.GA25199@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.com \
--cc=osandov@osandov.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.