From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, akpm@osdl.org, horst.hummel@de.ibm.com
Subject: [patch 6/13] s390: dasd ioctl never returns.
Date: Mon, 24 Apr 2006 17:04:05 +0200 [thread overview]
Message-ID: <20060424150405.GG15613@skybase> (raw)
From: Horst Hummel <horst.hummel@de.ibm.com>
[patch 6/13] s390: dasd ioctl never returns.
The dasd state machine is not designed to enable an unformatted device,
since 'unformatted' is a final state. The BIODASDENABLE ioctl calls
dasd_enable_device() which never returns if the device is in this
special state. Return -EPERM in dasd_increase_state for unformatted
devices to make dasd_enable_device terminate.
Note: To get such an unformatted device online it has to be re-analyzed.
This means that the device needs to be disabled prior to re-enablement.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---
drivers/s390/block/dasd.c | 5 +++++
1 files changed, 5 insertions(+)
diff -urpN linux-2.6/drivers/s390/block/dasd.c linux-2.6-patched/drivers/s390/block/dasd.c
--- linux-2.6/drivers/s390/block/dasd.c 2006-04-24 16:47:00.000000000 +0200
+++ linux-2.6-patched/drivers/s390/block/dasd.c 2006-04-24 16:47:23.000000000 +0200
@@ -315,6 +315,11 @@ dasd_increase_state(struct dasd_device *
rc = dasd_state_basic_to_ready(device);
if (!rc &&
+ device->state == DASD_STATE_UNFMT &&
+ device->target > DASD_STATE_UNFMT)
+ rc = -EPERM;
+
+ if (!rc &&
device->state == DASD_STATE_READY &&
device->target >= DASD_STATE_ONLINE)
rc = dasd_state_ready_to_online(device);
reply other threads:[~2006-04-24 15:04 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=20060424150405.GG15613@skybase \
--to=schwidefsky@de.ibm.com \
--cc=akpm@osdl.org \
--cc=horst.hummel@de.ibm.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 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.