From: "Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
To: device-mapper development <dm-devel@redhat.com>,
christophe.varoqui@free.fr
Subject: [PATCH] Fix fast_io_fail capping
Date: Mon, 12 Mar 2012 20:56:52 +0900 [thread overview]
Message-ID: <4F5DE484.2040307@ce.jp.nec.com> (raw)
Hi Christophe,
fast_io_fail is only meaningful if it is smaller than dev_loss_tmo.
Setting dev_loss_tmo value to fast_io_fail ends up with -EINVAL.
If the fast_io_fail is not configured properly, turning it off
seems to be the right behavior.
MP_FAST_IO_FAIL_OFF is -1, defined in the following patch:
[PATCH] Fix for setting '0' to fast_io_fail
http://www.redhat.com/archives/dm-devel/2012-March/msg00047.html
--
Jun'ichi Nomura, NEC Corporation
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 16f786d..8009893 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -307,10 +307,10 @@ sysfs_set_scsi_tmo (struct multipath *mpp)
mpp->alias, dev_loss_tmo);
}
mpp->dev_loss = dev_loss_tmo;
- if (mpp->fast_io_fail > (int)mpp->dev_loss) {
- mpp->fast_io_fail = mpp->dev_loss;
- condlog(3, "%s: update fast_io_fail to %d",
+ if (mpp->dev_loss && mpp->fast_io_fail >= (int)mpp->dev_loss) {
+ condlog(3, "%s: turning off fast_io_fail (%d is not smaller than dev_loss_tmo)",
mpp->alias, mpp->fast_io_fail);
+ mpp->fast_io_fail = MP_FAST_IO_FAIL_OFF;
}
if (!mpp->dev_loss && !mpp->fast_io_fail)
return 0;
reply other threads:[~2012-03-12 11:56 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=4F5DE484.2040307@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.com \
--cc=christophe.varoqui@free.fr \
--cc=dm-devel@redhat.com \
/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.