From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Linus <torvalds@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Subject: [PATCH] PPC64 iSeries virtual disk update
Date: Mon, 1 Mar 2004 15:37:34 +1100 [thread overview]
Message-ID: <20040301153734.4cc3742e.sfr@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1956 bytes --]
Hi Linus,
This patch (hopefully) addresses concerns Christoph Hellwig had with
the virtual disk probing code.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
diff -ruN 2.6.4-rc1.boottime/drivers/block/viodasd.c 2.6.4-rc1.boottime.dasd/drivers/block/viodasd.c
--- 2.6.4-rc1.boottime/drivers/block/viodasd.c 2004-03-01 01:17:20.000000000 +1100
+++ 2.6.4-rc1.boottime.dasd/drivers/block/viodasd.c 2004-03-01 14:53:50.000000000 +1100
@@ -70,7 +70,6 @@
MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name)
};
-static int viodasd_max_disk;
static spinlock_t viodasd_spinlock = SPIN_LOCK_UNLOCKED;
#define VIOMAXREQ 16
@@ -209,7 +208,6 @@
(int)we.rc, we.sub_result, err->msg);
return -EIO;
}
- viodasd_max_disk = we.max_disk;
return 0;
}
@@ -483,7 +481,17 @@
if (we.rc != 0)
return;
- viodasd_max_disk = we.max_disk;
+ if (we.max_disk > (MAX_DISKNO - 1)) {
+ static int warned;
+
+ if (warned == 0) {
+ warned++;
+ printk(VIOD_KERN_INFO
+ "Only examining the first %d "
+ "of %d disks connected\n",
+ MAX_DISKNO, we.max_disk + 1);
+ }
+ }
/* Send the close event to OS/400. We DON'T expect a response */
hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
@@ -744,21 +752,8 @@
/* Initialize our request handler */
vio_setHandler(viomajorsubtype_blockio, handle_block_event);
- viodasd_max_disk = MAX_DISKNO - 1;
- for (i = 0; (i <= viodasd_max_disk) && (i < MAX_DISKNO); i++) {
- /*
- * Note that probe_disk has side effects:
- * a) it updates the size of the disk
- * b) it updates viodasd_max_disk
- * c) it registers the disk if it has not done so already
- */
+ for (i = 0; i < MAX_DISKNO; i++)
probe_disk(&viodasd_devices[i]);
- }
-
- if (viodasd_max_disk > (MAX_DISKNO - 1))
- printk(VIOD_KERN_INFO
- "Only examining the first %d of %d disks connected\n",
- MAX_DISKNO, viodasd_max_disk + 1);
return 0;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
reply other threads:[~2004-03-01 4:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040301153734.4cc3742e.sfr@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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).