Skip to contentSkip to conversation

Handle READA requests in dm-mpath.c

PATCH In review Lars Marowsky-Bree 2 participants 3 messages Jun 8, 2005 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Handle READA requests in dm-mpath.c

READA errors failing with EWOULDBLOCK/EAGAIN do not constitute a valid reason for failing the path; this lead to erratic errors on DM multipath devices. This error can be safely propagated upwards without failing the path.

drivers/md/dm-mpath.c +3 -0
@@ -985,6 +985,9 @@
 	if (!error)
 		return 0;	/* I/O complete */
 
+	if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
+		return error;
+
 	spin_lock(&m->lock);
 	if (!m->nr_valid_paths) {
 		if (!m->queue_if_no_path || m->suspended) {
Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#1 lore raw
Quoted 6 lines · Lars Marowsky-Bree

READA errors failing with EWOULDBLOCK/EAGAIN do not constitute a valid reason for failing the path; this lead to erratic errors on DM multipath devices. This error can be safely propagated upwards without failing the path.

Why do you describe this as a -mm patch? We want this in 2.6.12, no?

Quoted 19 lines
drivers/md/dm-mpath.c +3 -0
@@ -985,6 +985,9 @@
 	if (!error)
 		return 0;	/* I/O complete */
 
+	if ((error == -EWOULDBLOCK) && bio_rw_ahead(bio))
+		return error;
+
 	spin_lock(&m->lock);
 	if (!m->nr_valid_paths) {
 		if (!m->queue_if_no_path || m->suspended) {
Signature · 5 lines
-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#2 lore raw
Quoted 9 lines · Andrew Morton
Quoted 6 lines · Lars Marowsky-Bree

READA errors failing with EWOULDBLOCK/EAGAIN do not constitute a valid reason for failing the path; this lead to erratic errors on DM multipath devices. This error can be safely propagated upwards without failing the path.

Why do you describe this as a -mm patch? We want this in 2.6.12, no?

Uhm, right. I just diff'ed it against -mm out of habit, I guess, because I also assumed you were the fastest path to Linus ;-)

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"