From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: kill not-so-popular simple flag testing macros
Date: Thu, 09 Feb 2006 13:42:52 -0500 [thread overview]
Message-ID: <43EB8D2C.6020708@pobox.com> (raw)
In-Reply-To: <20060208085728.GA21065@htj.dyndns.org>
Tejun Heo wrote:
> This patch kills the following request flag testing macros.
>
> blk_noretry_request()
> blk_rq_started()
> blk_pm_suspend_request()
> blk_pm_resume_request()
> blk_sorted_rq()
> blk_barrier_rq()
> blk_fua_rq()
>
> All above macros test for single request flag and not used widely and
> seem to contribute more to obscurity than readability.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
heh, I guess that's a manner of opinion :)
To me, your patch makes things less readable. Example:
> - int is_barrier = blk_fs_request(rq) && blk_barrier_rq(rq);
> + int is_barrier = blk_fs_request(rq) && rq->flags & REQ_HARDBARRIER;
After your change is applied, the above statement is no longer visually
consistent with itself. The reader must decode two different styles of
test in his brain, as opposed to one.
Jeff
next prev parent reply other threads:[~2006-02-09 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 8:57 [PATCH] block: kill not-so-popular simple flag testing macros Tejun Heo
2006-02-08 9:04 ` Jens Axboe
2006-02-09 18:42 ` Jeff Garzik [this message]
2006-02-10 0:21 ` Tejun Heo
2006-02-10 1:19 ` Jeff Garzik
2006-02-10 7:25 ` 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=43EB8D2C.6020708@pobox.com \
--to=jgarzik@pobox.com \
--cc=axboe@suse.de \
--cc=htejun@gmail.com \
--cc=linux-kernel@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