From 37e327a63542b40e80e676f868f9be5c0ba60736 Mon Sep 17 00:00:00 2001 From: braam Date: Tue, 2 Apr 2002 20:58:26 +0000 Subject: [PATCH] - update a 3 year old message - split the failing (uml) part of the io-failure mechanism into a separate patch --- lustre/patches/patch-2.4.18 | 34 ---------------------------------- lustre/patches/ubd-io-fail-2.4.18 | 34 ++++++++++++++++++++++++++++++++++ lustre/tests/llmount.sh | 4 ++-- 3 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 lustre/patches/ubd-io-fail-2.4.18 diff --git a/lustre/patches/patch-2.4.18 b/lustre/patches/patch-2.4.18 index 271c24a..c604d12 100644 --- a/lustre/patches/patch-2.4.18 +++ b/lustre/patches/patch-2.4.18 @@ -126,37 +126,3 @@ if (IDE_CONTROL_REG) OUT_BYTE(drive->ctl,IDE_CONTROL_REG); OUT_BYTE(0x00, IDE_FEATURE_REG); ---- lum/arch/um/drivers/ubd.c.orig Wed Mar 13 14:04:59 2002 -+++ lum/arch/um/drivers/ubd.c Thu Mar 28 23:39:15 2002 -@@ -693,14 +697,23 @@ - spin_unlock(&io_request_lock); - return(1); - } -- if((req->cmd == WRITE) && -- ((dev->openflags & O_ACCMODE) == O_RDONLY)){ -- printk("Write attempted on readonly ubd device %d\n", -- minor(req->rq_dev)); -- spin_lock(&io_request_lock); -- end_request(0); -- spin_unlock(&io_request_lock); -- return(1); -+ if (req->cmd == WRITE) { -+#ifdef CONFIG_DEV_RDONLY -+ if (dev_check_rdonly(req->rq_dev)) { -+ spin_lock(&io_request_lock); -+ end_request(1); -+ spin_unlock(&io_request_lock); -+ return(0); -+ } -+#endif -+ if ((dev->openflags & O_ACCMODE) == O_RDONLY) { -+ printk("Write attempted on readonly ubd device %d\n", -+ minor(req->rq_dev)); -+ spin_lock(&io_request_lock); -+ end_request(0); -+ spin_unlock(&io_request_lock); -+ return(1); -+ } - } - - block = req->sector; diff --git a/lustre/patches/ubd-io-fail-2.4.18 b/lustre/patches/ubd-io-fail-2.4.18 new file mode 100644 index 0000000..56c3742 --- /dev/null +++ b/lustre/patches/ubd-io-fail-2.4.18 @@ -0,0 +1,34 @@ +--- lum/arch/um/drivers/ubd.c.orig Wed Mar 13 14:04:59 2002 ++++ lum/arch/um/drivers/ubd.c Thu Mar 28 23:39:15 2002 +@@ -693,14 +697,23 @@ + spin_unlock(&io_request_lock); + return(1); + } +- if((req->cmd == WRITE) && +- ((dev->openflags & O_ACCMODE) == O_RDONLY)){ +- printk("Write attempted on readonly ubd device %d\n", +- minor(req->rq_dev)); +- spin_lock(&io_request_lock); +- end_request(0); +- spin_unlock(&io_request_lock); +- return(1); ++ if (req->cmd == WRITE) { ++#ifdef CONFIG_DEV_RDONLY ++ if (dev_check_rdonly(req->rq_dev)) { ++ spin_lock(&io_request_lock); ++ end_request(1); ++ spin_unlock(&io_request_lock); ++ return(0); ++ } ++#endif ++ if ((dev->openflags & O_ACCMODE) == O_RDONLY) { ++ printk("Write attempted on readonly ubd device %d\n", ++ minor(req->rq_dev)); ++ spin_lock(&io_request_lock); ++ end_request(0); ++ spin_unlock(&io_request_lock); ++ return(1); ++ } + } + + block = req->sector; diff --git a/lustre/tests/llmount.sh b/lustre/tests/llmount.sh index c3f656f..0779888 100755 --- a/lustre/tests/llmount.sh +++ b/lustre/tests/llmount.sh @@ -24,8 +24,8 @@ device 0 attach mds setup ${MDS} ${MDSFS} device 1 -attach obdext2 -setup ${OST} +attach obdfilter +setup ${OST} ext2 device 2 attach ost setup 1 -- 1.8.3.1