Ignore:
Timestamp:
Apr 21, 2017, 4:28:29 AM (2 months ago)
Author:
brainslayer
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-3.18/drivers/md/raid10.c

    r31869 r31885  
    15791579                }
    15801580
     1581                /*
     1582                 * If a bio is splitted, the first part of bio will pass
     1583                 * barrier but the bio is queued in current->bio_list (see
     1584                 * generic_make_request). If there is a raise_barrier() called
     1585                 * here, the second part of bio can't pass barrier. But since
     1586                 * the first part bio isn't dispatched to underlaying disks
     1587                 * yet, the barrier is never released, hence raise_barrier will
     1588                 * alays wait. We have a deadlock.
     1589                 * Note, this only happens in read path. For write path, the
     1590                 * first part of bio is dispatched in a schedule() call
     1591                 * (because of blk plug) or offloaded to raid10d.
     1592                 * Quitting from the function immediately can change the bio
     1593                 * order queued in bio_list and avoid the deadlock.
     1594                 */
    15811595                __make_request(mddev, split);
     1596                if (split != bio && bio_data_dir(bio) == READ) {
     1597                        generic_make_request(bio);
     1598                        break;
     1599                }
    15821600        } while (split != bio);
    15831601
Note: See TracChangeset for help on using the changeset viewer.