linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Christoph Hellwig <hch@infradead.org>, Tejun Heo <tj@kernel.org>,
	Boaz Harrosh <bharrosh@panasas.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Niel Lambrechts <niel.lambrechts@gmail.com>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: [PATCH 2/4] block: use the same failfast bits for bio and request
Date: Thu, 9 Jul 2009 19:39:00 +0200	[thread overview]
Message-ID: <20090709173900.GO23611@kernel.dk> (raw)
In-Reply-To: <4A5626F2.7070404@garzik.org>

On Thu, Jul 09 2009, Jeff Garzik wrote:
> Christoph Hellwig wrote:
>> On Thu, Jul 09, 2009 at 09:45:24AM +0900, Tejun Heo wrote:
>>> What's more disturbing to me is the different between RQ and BIO
>>> flags.  __REQ_* are bit positions, REQ_* are masks while BIO_* are bit
>>> positions.  Sadly it seems it's already too late to change that.  I
>>> personally an not a big fan of simple accessors or flags defined as
>>> bit positions.  They seem to obscure things without much benefit.
>>
>> flags as bit positions generally only make sense if you use
>> test/set/clear_bit, otherwise they just confuse things.  And the
>> accessors are pretty annoying, especially in the block layer.  Trying to
>> find the places where a BIO flag has an actual effect is pretty painful
>> due to the mix of the different flags and the accessors.
>
> Indeed -- the accessors mean in practice that you always have at least  
> _two_ things to grep for, just to catch all accesses.  Block layer is  
> pretty bad about that style of usage :/

Yeah, I'm not too fond of it either, it does add to the confusion. I'll
sanitize it.

-- 
Jens Axboe


  reply	other threads:[~2009-07-09 17:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-03  8:48 [PATCHSET] block: fix merge of requests with different failfast settings Tejun Heo
2009-07-03  8:48 ` [PATCH 1/4] block: don't merge requests of " Tejun Heo
2009-07-03  8:48 ` [PATCH 2/4] block: use the same failfast bits for bio and request Tejun Heo
2009-07-05  9:27   ` Boaz Harrosh
2009-07-09  0:45     ` Tejun Heo
2009-07-09  9:12       ` Boaz Harrosh
2009-07-09 13:37       ` Christoph Hellwig
2009-07-09 17:20         ` Jeff Garzik
2009-07-09 17:39           ` Jens Axboe [this message]
2009-07-10 13:18         ` Tejun Heo
2009-07-12 12:06           ` Boaz Harrosh
2009-07-15  9:27             ` Tejun Heo
2009-07-03  8:48 ` [PATCH 3/4] block: implement mixed merge of different failfast requests Tejun Heo
2009-07-05  9:27   ` Boaz Harrosh
2009-07-09  0:47     ` Tejun Heo
2009-07-09  9:17       ` Boaz Harrosh
2009-07-15  9:41         ` Tejun Heo
2009-07-03  8:48 ` [PATCH 4/4] scsi,block: update SCSI to handle mixed merge failures Tejun Heo
2009-07-03 10:54 ` [PATCHSET] block: fix merge of requests with different failfast settings Jens Axboe

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=20090709173900.GO23611@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bharrosh@panasas.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=hch@infradead.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=niel.lambrechts@gmail.com \
    --cc=tj@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).