From: Tejun Heo <tj@kernel.org>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Jens Axboe <jens.axboe@oracle.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>,
Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH 2/4] block: use the same failfast bits for bio and request
Date: Wed, 15 Jul 2009 18:27:57 +0900 [thread overview]
Message-ID: <4A5DA11D.90401@kernel.org> (raw)
In-Reply-To: <4A59D1AB.2040705@panasas.com>
Hello, Boaz.
Boaz Harrosh wrote:
>>> flags as bit positions generally only make sense if you use
>>> test/set/clear_bit, otherwise they just confuse things.
>
> first please make a distinction between test/set/clear_bit and
> test/__set/__clear_bit the former is not an option since it's not what
> we need.
Block flags look like the way they do today because a while back they
were accessed with atomic bitops (the versions w/o the underbars).
Now that they're all inside spinlocks, it all became moot.
> What can be more clear then rq_set_flags(req, QUEUE_FLAG_QUEUED) then
> rq_clear_flags(req, QUEUE_FLAG_QUEUED) later.
req->cmd_flags |= QUEUE_FLAG_QUEUED / &= ~QUEUE_FLAG_QUEUED might not
be as clear but should be sufficient, I suppose.
> That's why I suggested the set/clear_flags() variable size macro
> which can set/clear multiple bit-flags at same cost of masks, only
> that the compiler calculates the mask in compile time.
>
> This can also be good for the greps above. .eg:
> test_flags(&rq->cmd_flags, REQ_FAILFAST_DEV, REQ_FAILFAST_TRANSPORT, REQ_FAILFAST_DRIVER);
...
> As said, yes, the the lower-case accessors for upper-case bits does nothing,
> but use __set/__clear/test is a different matter that can also replace the
> sugary need of these.
Heh.. I don't know. What about things like flags & mask == mask2
test? The vararg macros would work for most cases and I wouldn't be
violently against them if they were already in place but I don't see
much benefit of all those when people are already very accustomed to
using c bitops to handle flags.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-07-15 9:28 UTC|newest]
Thread overview: 24+ 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 ` Tejun Heo
2009-07-03 8:48 ` [PATCH 1/4] block: don't merge requests of " Tejun Heo
2009-07-03 8:48 ` Tejun Heo
2009-07-03 8:48 ` [PATCH 2/4] block: use the same failfast bits for bio and request Tejun Heo
2009-07-03 8:48 ` 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
2009-07-10 13:18 ` Tejun Heo
2009-07-12 12:06 ` Boaz Harrosh
2009-07-15 9:27 ` Tejun Heo [this message]
2009-07-03 8:48 ` [PATCH 3/4] block: implement mixed merge of different failfast requests Tejun Heo
2009-07-03 8:48 ` 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 8:48 ` 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=4A5DA11D.90401@kernel.org \
--to=tj@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=axboe@kernel.dk \
--cc=bharrosh@panasas.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hch@infradead.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=niel.lambrechts@gmail.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.