Skip to content

Commit

Permalink
drbd: don't expose failed local READ to upper layers
Browse files Browse the repository at this point in the history
fix regression introduced in 8.3.3:
 commit a9b17323f2875f5d9b132c2b476a750bf44b10c7
 Author: Lars Ellenberg <[email protected]>
 Date:   Wed Aug 12 15:18:33 2009 +0200

     out-of-spinlock completion of master bio

 : (bio_rw(bio) == READA)
    ? read_completed_with_error
    : read_ahead_completed_with_error;

is obviously not what was intended.

No one noticed because of
 * page-cache at work,
 * local RAIDs

Impact:
Failed local READs are not retried remotely,
but errored to upper layers, causing filesystems
to remount read-only, or worse.

Signed-off-by: Philipp Reisner <[email protected]>
Signed-off-by: Lars Ellenberg <[email protected]>
  • Loading branch information
lge authored and Philipp-Reisner committed May 3, 2010
1 parent 3c2023d commit 5c3c7e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void drbd_endio_pri(struct bio *bio, int error)
if (unlikely(error)) {
what = (bio_data_dir(bio) == WRITE)
? write_completed_with_error
: (bio_rw(bio) == READA)
: (bio_rw(bio) == READ)
? read_completed_with_error
: read_ahead_completed_with_error;
} else
Expand Down

0 comments on commit 5c3c7e6

Please sign in to comment.