linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Jens Axboe <jaxboe@fusionio.com>,
	Jan Harkes <jaharkes@cs.cmu.edu>,
	coda@cs.cmu.edu
Cc: stable@kernel.org, Vladislav Bolkhovitin <vst@vlnb.net>,
	Bryan Mesich <bryan.mesich@ndsu.edu>,
	scst-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	linux-raid@vger.kernel.org, dm-devel@redhat.com,
	Neil Brown <neilb@suse.de>
Subject: [PATCH] coda: rename REQ_* to CODA_REQ_*
Date: Tue, 03 Aug 2010 18:02:53 +0200	[thread overview]
Message-ID: <4C583DAD.4080507@kernel.org> (raw)
In-Reply-To: <4C583B3B.3060301@kernel.org>

REQ_* constants are used for block layer requests causing inconsistent
duplicate definitions of REQ_WRITE.  Rename REQ_* used by coda to
CODA_REQ_*.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
So, something like this.  Build tested only.

Thanks.

 fs/coda/psdev.c            |   14 +++++++-------
 fs/coda/upcall.c           |   12 ++++++------
 include/linux/coda_psdev.h |    8 ++++----
 3 files changed, 17 insertions(+), 17 deletions(-)

Index: work/fs/coda/psdev.c
===================================================================
--- work.orig/fs/coda/psdev.c
+++ work/fs/coda/psdev.c
@@ -177,7 +177,7 @@ static ssize_t coda_psdev_write(struct f
 		nbytes = req->uc_outSize; /* don't have more space! */
 	}
         if (copy_from_user(req->uc_data, buf, nbytes)) {
-		req->uc_flags |= REQ_ABORT;
+		req->uc_flags |= CODA_REQ_ABORT;
 		wake_up(&req->uc_sleep);
 		retval = -EFAULT;
 		goto out;
@@ -185,7 +185,7 @@ static ssize_t coda_psdev_write(struct f

 	/* adjust outsize. is this useful ?? */
         req->uc_outSize = nbytes;	
-        req->uc_flags |= REQ_WRITE;
+        req->uc_flags |= CODA_REQ_WRITE;
 	count = nbytes;

 	/* Convert filedescriptor into a file handle */
@@ -254,8 +254,8 @@ static ssize_t coda_psdev_read(struct fi
 	        retval = -EFAULT;

 	/* If request was not a signal, enqueue and don't free */
-	if (!(req->uc_flags & REQ_ASYNC)) {
-		req->uc_flags |= REQ_READ;
+	if (!(req->uc_flags & CODA_REQ_ASYNC)) {
+		req->uc_flags |= CODA_REQ_READ;
 		list_add_tail(&(req->uc_chain), &vcp->vc_processing);
 		goto out;
 	}
@@ -315,19 +315,19 @@ static int coda_psdev_release(struct ino
 		list_del(&req->uc_chain);

 		/* Async requests need to be freed here */
-		if (req->uc_flags & REQ_ASYNC) {
+		if (req->uc_flags & CODA_REQ_ASYNC) {
 			CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
 			kfree(req);
 			continue;
 		}
-		req->uc_flags |= REQ_ABORT;
+		req->uc_flags |= CODA_REQ_ABORT;
 		wake_up(&req->uc_sleep);
 	}

 	list_for_each_entry_safe(req, tmp, &vcp->vc_processing, uc_chain) {
 		list_del(&req->uc_chain);

-		req->uc_flags |= REQ_ABORT;
+		req->uc_flags |= CODA_REQ_ABORT;
 		wake_up(&req->uc_sleep);
 	}

Index: work/fs/coda/upcall.c
===================================================================
--- work.orig/fs/coda/upcall.c
+++ work/fs/coda/upcall.c
@@ -604,7 +604,7 @@ static void coda_unblock_signals(sigset_
 			       (((r)->uc_opcode != CODA_CLOSE && \
 				 (r)->uc_opcode != CODA_STORE && \
 				 (r)->uc_opcode != CODA_RELEASE) || \
-				(r)->uc_flags & REQ_READ))
+				(r)->uc_flags & CODA_REQ_READ))

 static inline void coda_waitfor_upcall(struct upc_req *req)
 {
@@ -624,7 +624,7 @@ static inline void coda_waitfor_upcall(s
 			set_current_state(TASK_UNINTERRUPTIBLE);

 		/* got a reply */
-		if (req->uc_flags & (REQ_WRITE | REQ_ABORT))
+		if (req->uc_flags & (CODA_REQ_WRITE | CODA_REQ_ABORT))
 			break;

 		if (blocked && time_after(jiffies, timeout) &&
@@ -708,7 +708,7 @@ static int coda_upcall(struct venus_comm
 	coda_waitfor_upcall(req);

 	/* Op went through, interrupt or not... */
-	if (req->uc_flags & REQ_WRITE) {
+	if (req->uc_flags & CODA_REQ_WRITE) {
 		out = (union outputArgs *)req->uc_data;
 		/* here we map positive Venus errors to kernel errors */
 		error = -out->oh.result;
@@ -717,13 +717,13 @@ static int coda_upcall(struct venus_comm
 	}

 	error = -EINTR;
-	if ((req->uc_flags & REQ_ABORT) || !signal_pending(current)) {
+	if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) {
 		printk(KERN_WARNING "coda: Unexpected interruption.\n");
 		goto exit;
 	}

 	/* Interrupted before venus read it. */
-	if (!(req->uc_flags & REQ_READ))
+	if (!(req->uc_flags & CODA_REQ_READ))
 		goto exit;

 	/* Venus saw the upcall, make sure we can send interrupt signal */
@@ -747,7 +747,7 @@ static int coda_upcall(struct venus_comm
 	sig_inputArgs->ih.opcode = CODA_SIGNAL;
 	sig_inputArgs->ih.unique = req->uc_unique;

-	sig_req->uc_flags = REQ_ASYNC;
+	sig_req->uc_flags = CODA_REQ_ASYNC;
 	sig_req->uc_opcode = sig_inputArgs->ih.opcode;
 	sig_req->uc_unique = sig_inputArgs->ih.unique;
 	sig_req->uc_inSize = sizeof(struct coda_in_hdr);
Index: work/include/linux/coda_psdev.h
===================================================================
--- work.orig/include/linux/coda_psdev.h
+++ work/include/linux/coda_psdev.h
@@ -86,9 +86,9 @@ struct upc_req {
 	wait_queue_head_t   uc_sleep;   /* process' wait queue */
 };

-#define REQ_ASYNC  0x1
-#define REQ_READ   0x2
-#define REQ_WRITE  0x4
-#define REQ_ABORT  0x8
+#define CODA_REQ_ASYNC		0x1
+#define CODA_REQ_READ		0x2
+#define CODA_REQ_WRITE		0x4
+#define CODA_REQ_ABORT		0x8

 #endif

  reply	other threads:[~2010-08-03 16:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100628010346.GA2376@atlantis.cc.ndsu.nodak.edu>
     [not found] ` <4C28EFD6.2070203@vlnb.net>
     [not found]   ` <20100714190325.GA25148@atlantis.cc.ndsu.nodak.edu>
     [not found]     ` <4C3EF3AD.5070509@vlnb.net>
     [not found]       ` <20100723191844.GB31152@atlantis.cc.ndsu.nodak.edu>
     [not found]         ` <4C4D7DF5.9060909@vlnb.net>
     [not found]           ` <20100727220110.GF31152@atlantis.cc.ndsu.nodak.edu>
2010-07-28 18:16             ` RAID/block regression starting from 2.6.32, bisected Vladislav Bolkhovitin
2010-07-30 10:29               ` Tejun Heo
2010-08-02  0:42                 ` Neil Brown
2010-08-02 14:12                   ` [PATCH 1/2 block#for-linus] bio, fs: update READA and SWRITE to match the corresponding BIO_RW_* bits Tejun Heo
2010-08-02 14:13                     ` [PATCH 2/2 block#for-linus] bio, fs: separate out bio_types.h and define READ/WRITE constants in terms of BIO_RW_* flags Tejun Heo
2010-08-02 14:15                     ` [PATCH RESEND " Tejun Heo
2010-08-02 14:18                     ` Tejun Heo
2010-08-02 14:15                   ` [PATCH RESEND 1/2 block#for-linus] bio, fs: update READA and SWRITE to match the corresponding BIO_RW_* bits Tejun Heo
2010-08-02 21:52                     ` Neil Brown
2010-08-03  9:27                       ` Tejun Heo
2010-08-05 18:45                     ` Jeff Moyer
2010-08-05 18:57                       ` Vladislav Bolkhovitin
2010-08-05 19:30                         ` Jeff Moyer
2010-08-06  4:04                       ` Tao Ma
2010-08-06  6:29                         ` Tejun Heo
2010-08-19  8:38                         ` [dm-devel] " Christoph Hellwig
2010-08-02 14:17                   ` Tejun Heo
2010-08-02 20:04                     ` Jens Axboe
2010-08-03  9:53                       ` [PATCH 1/2 block#for-2.6.36] bio, fs: update RWA_MASK, " Tejun Heo
2010-08-03 11:15                         ` Jens Axboe
2010-08-03 11:21                           ` Jens Axboe
2010-08-03 15:52                             ` Tejun Heo
2010-08-03 16:02                               ` Tejun Heo [this message]
2010-08-03 16:11                                 ` [PATCH] coda: rename REQ_* to CODA_REQ_* Jan Harkes
2010-08-03 17:31                                 ` Jens Axboe
2010-08-03  9:54                       ` [PATCH 2/2 block#for-2.6.36] bio, fs: separate out bio_types.h and define READ/WRITE constants in terms of BIO_RW_* flags Tejun Heo

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=4C583DAD.4080507@kernel.org \
    --to=tj@kernel.org \
    --cc=bryan.mesich@ndsu.edu \
    --cc=coda@cs.cmu.edu \
    --cc=dm-devel@redhat.com \
    --cc=jaharkes@cs.cmu.edu \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=stable@kernel.org \
    --cc=vst@vlnb.net \
    /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).