linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org, dan.carpenter@oracle.com
Subject: Re: md: raid 10 supports TRIM
Date: Sat, 18 Aug 2012 09:51:10 +1000	[thread overview]
Message-ID: <20120818095110.125b3d3a@notabene.brown> (raw)
In-Reply-To: <20120817040015.GA8644@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]

On Fri, 17 Aug 2012 12:00:15 +0800 Shaohua Li <shli@kernel.org> wrote:

> > 
> > This is a semi-automatic email about new static checker warnings.
> > 
> > The patch d61b764704ca: "md: raid 10 supports TRIM" from Aug 15,
> > 2012, leads to the following Smatch complaint:
> > 
> > drivers/md/raid10.c:3510 run()
> > 	 warn: variable dereferenced before check 'mddev->queue' (see line 3508)
> > 
> > drivers/md/raid10.c
> >   3507	
> >   3508		blk_queue_max_discard_sectors(mddev->queue, mddev->chunk_sectors);
> >                                               ^^^^^^^^^^^^
> > New dereference.
> > 
> >   3509		chunk_size = mddev->chunk_sectors<<  9;
> >   3510		if (mddev->queue) {
> >                     ^^^^^^^^^^^^
> > Old check.
> > 
> >   3511			blk_queue_io_min(mddev->queue, chunk_size);
> >   3512			if (conf->geo.raid_disks % conf->geo.near_copies)
> 
> Thanks! Neil, this is the updated patch. If you prefer a fix against original
> patch, please let me know. 
> 
> 
> Subject: md: raid 10 supports TRIM
> 
> This makes md raid 10 support TRIM.
> If one disk supports discard and another not, or one has discard_zero_data and
> another not, there could be inconsistent between data from such disks. But this
> should not matter, discarded data is useless. This will add extra copy in rebuild
> though.
> 
> Signed-off-by: Shaohua Li <shli@fusionio.com>


Applied, thanks.

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      parent reply	other threads:[~2012-08-17 23:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 11:02 md: raid 10 supports TRIM Dan Carpenter
     [not found] ` <502DAEB3.6080302@fusionio.com>
2012-08-17  4:00   ` Shaohua Li
2012-08-17  8:41     ` Jan Ceuleers
2012-08-17  9:28       ` NeilBrown
2012-08-17 23:51     ` NeilBrown [this message]

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=20120818095110.125b3d3a@notabene.brown \
    --to=neilb@suse.de \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).