[dm-devel] Re: [PATCH] fix resubmit/end_io bug in dm-mpath (take 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joe,

Sorry for the late comment.

 		spin_lock(&m->path_lock);
 		path = __find_path(m, bio->bi_bdev);
 		__fail_path(path);
+		r = __remap_io(m, bio);
 		spin_unlock(&m->path_lock);
- r = __resubmit_io(m, bio);
+		if (!r) {
+			/* queue for the daemon to resubmit */
+			spin_lock_irqsave(&m->failed_lock, flags);
+			bio->bi_next = m->failed_ios;
+			m->failed_ios = bio;
+			spin_unlock_irqrestore(&m->failed_lock, flags);
+

I think it might be better if the __remap_io call was in dispatch_failed_ios before generic_make_request is called.

dispatch_failed_ios would need to be tweaked to handle __remap_io failing, but similar modifications are needed for devices that need to send a command to activate a path before it can be used.

Mike Christie




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux