Jeff Mahoney changed bug 1172378
What Removed Added
Status NEW CONFIRMED
Assignee colyli@suse.com jeffm@suse.com

Comment # 2 on bug 1172378 from
Got it.

The BUG is:
drivers/md/dm.c:
 966         if (endio) {
 967                 int r = endio(tio->ti, bio, &error);
 968                 switch (r) {
 969                 case DM_ENDIO_REQUEUE:
 970                         error = BLK_STS_DM_REQUEUE;
 971                         /*FALLTHRU*/
 972                 case DM_ENDIO_DONE:
 973                         break;
 974                 case DM_ENDIO_INCOMPLETE:
 975                         /* The target will handle the io */
 976                         return;                                           
 977                 default:
 978                         DMWARN("unimplemented target endio return value:
%d     ", r);
 979                         BUG();   <----
 980                 }
 981         }
 982


Caused by:

drivers/md/dm-raid1.c:
1263         if (unlikely(*error)) {
1264                 if (!bio_record->details.bi_disk) {
1265                         /*
1266                          * There wasn't enough memory to record necessary
1267                          * information for a retry or there was no other
1268                          * mirror in-sync.
1269                          */
1270                         DMERR_LIMIT("Mirror read failed.");
1271                         return -EIO;  <---
1272                 }
1273

This was introduced by:

commit 48276ca8755dc4cf8d5844eedab789bfd3092543
Author: Coly Li <colyli@suse.de>
Date:   Wed Sep 13 23:14:57 2017 +0800

    dm: change ->end_io calling convention
    (fate#322738,fate#322919,fate#322950,fate#323773).


Which is missing chunks from the merge commit: 
commit c6b1e36c8fa04a6680c44fe0321d0370400e90b6
Merge: 81e3e044897b a84ebb837b41
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Mon Jul 3 10:34:51 2017 -0700

    Merge branch 'for-4.13/block' of git://git.kernel.dk/linux-block

[...]

-       if (unlikely(error)) {
+       if (unlikely(*error)) {
 +              if (!bio_record->details.bi_bdev) {
 +                      /*
 +                       * There wasn't enough memory to record necessary
 +                       * information for a retry or there was no other
 +                       * mirror in-sync.
 +                       */
 +                      DMERR_LIMIT("Mirror read failed.");
-                       return -EIO;
++                      return DM_ENDIO_DONE;
 +              }
 +

This is an easy fix and download.opensuse.org is down.  I'll take this one.


You are receiving this mail because: