From: Christoph Hellwig <hch@infradead.org>
To: michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
ceph-devel@vger.kernel.org, axboe@kernel.dk,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] block: add function to issue compare and write
Date: Fri, 17 Oct 2014 02:55:55 -0700 [thread overview]
Message-ID: <20141017095555.GA360@infradead.org> (raw)
In-Reply-To: <1413437835-13778-3-git-send-email-michaelc@cs.wisc.edu>
On Thu, Oct 16, 2014 at 12:37:12AM -0500, michaelc@cs.wisc.edu wrote:
> @@ -160,7 +160,7 @@ enum rq_flag_bits {
> __REQ_DISCARD, /* request to discard sectors */
> __REQ_SECURE, /* secure discard (used with __REQ_DISCARD) */
> __REQ_WRITE_SAME, /* write same block many times */
> -
> + __REQ_CMP_AND_WRITE, /* compare data and write if matched */
I think it's time that we stop overloading the request flags with
request types.
We already have req->cmd_type which actually is a fairly good
description of what we get except for REQ_TYPE_FS, which is a horrible
overload using req->cmd_flags.
Given that you're just one of many currently ongoing patches to add
more flags here I think you need to byte the bullet and fix this up
by replacing REQ_TYPE_FS with:
REQ_TYPE_WRITE
REQ_TYPE_READ
REQ_TYPE_FLUSH
REQ_TYPE_DISCARD
REQ_TYPE_WRITE_SAME
REQ_TYPE_CMP_AND_WRITE
sd.c is a nice guide of what should be a flag and what a type since my
last refactoring of the command_init function.
next parent reply other threads:[~2014-10-17 9:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1413437835-13778-1-git-send-email-michaelc@cs.wisc.edu>
[not found] ` <1413437835-13778-3-git-send-email-michaelc@cs.wisc.edu>
2014-10-17 9:55 ` Christoph Hellwig [this message]
2014-10-17 23:38 ` [PATCH 2/5] block: add function to issue compare and write Martin K. Petersen
2014-10-18 15:16 ` Christoph Hellwig
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=20141017095555.GA360@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=ceph-devel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=target-devel@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