linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jiri Slaby <jirislaby@gmail.com>,
	James Bottomley <James.Bottomley@suse.de>,
	linux-scsi@vger.kernel.org, hch@lst.de, jaxboe@fusionio.com,
	LKML <linux-kernel@vger.kernel.org>,
	linux-raid@vger.kernel.org
Subject: Re: [PATCH] md: bitwise operations might not fit in a "bool"
Date: Thu, 22 Jul 2010 22:37:40 +1000	[thread overview]
Message-ID: <20100722223740.7baa68a1@notabene> (raw)
In-Reply-To: <4C4837A5.6040209@panasas.com>

On Thu, 22 Jul 2010 15:20:53 +0300
Boaz Harrosh <bharrosh@panasas.com> wrote:

> On 07/22/2010 02:55 PM, Neil Brown wrote:
> > On Thu, 22 Jul 2010 14:44:53 +0300
> > Boaz Harrosh <bharrosh@panasas.com> wrote:
> > 
> >>
> >> when taking a resolute of a bit-wise AND as true false. Better / faster
> >> to make it a boolean operation.
> >>
> >> This fixes a bug and a crash because the flags field did not fit into
> >> the bool operands.
> > 
> > No, that won't work.
> > Read the rest of the code and see where 'do_sync' and 'do_barriers' are used.
> > 
> > NeilBrown
> > 
> 
> You are right! (I didn't look)
> 
> the use of "bool" was wrong from the get go. it was never a bool operation.
> What was the guy thinking? What is that do_XXX name? that name should change
> as well. Perhaps flg_sync, flg_barriers.

Check the git history - 'bool' was originally appropriate.  But when the
value was recently changed, the type and name were not.
I would actually prefer "sync_flg" and "barrier_flg", but your suggestion
that we change the name as well as the type is a good one.

Thanks,
NeilBrown

  reply	other threads:[~2010-07-22 12:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-22  7:04 BUG at drivers/scsi/scsi_lib.c:1113 Jiri Slaby
2010-07-22  7:37 ` Neil Brown
2010-07-22  8:06   ` Jiri Slaby
2010-07-22  8:36   ` Christoph Hellwig
2010-07-22  8:39     ` Jiri Slaby
2010-07-22 10:39   ` Boaz Harrosh
2010-07-22 11:44     ` [PATCH] md: bitwise operations might not fit in a "bool" Boaz Harrosh
2010-07-22 11:55       ` Neil Brown
2010-07-22 12:20         ` Boaz Harrosh
2010-07-22 12:37           ` Neil Brown [this message]
2010-07-27 22:27         ` H. Peter Anvin

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=20100722223740.7baa68a1@notabene \
    --to=neilb@suse.de \
    --cc=James.Bottomley@suse.de \
    --cc=bharrosh@panasas.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=jaxboe@fusionio.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.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).