diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2012-03-26 17:29:30 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:58:24 +0100 |
commit | 4439c400ab278378a82efb543bb3bb91b184d8db (patch) | |
tree | 8573efc9416f0a5c22899018aa93ccd064e2f992 /drivers/block/drbd/drbd_worker.c | |
parent | 2415308eb94e7bddf9c9a0f210374600210274d7 (diff) | |
download | op-kernel-dev-4439c400ab278378a82efb543bb3bb91b184d8db.zip op-kernel-dev-4439c400ab278378a82efb543bb3bb91b184d8db.tar.gz |
drbd: simplify retry path of failed READ requests
If a local or remote READ request fails, just push it back to the retry
workqueue. It will re-enter __drbd_make_request, and be re-assigned to
a suitable local or remote path, or failed, if we do not have access to
good data anymore.
This obsoletes w_read_retry_remote(),
and eliminates two goto...retry blocks in __req_mod()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index f104517..d7573f4 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -244,26 +244,6 @@ void drbd_request_endio(struct bio *bio, int error) complete_master_bio(mdev, &m); } -int w_read_retry_remote(struct drbd_work *w, int cancel) -{ - struct drbd_request *req = container_of(w, struct drbd_request, w); - struct drbd_conf *mdev = w->mdev; - - /* We should not detach for read io-error, - * but try to WRITE the P_DATA_REPLY to the failed location, - * to give the disk the chance to relocate that block */ - - spin_lock_irq(&mdev->tconn->req_lock); - if (cancel || mdev->state.pdsk != D_UP_TO_DATE) { - _req_mod(req, READ_RETRY_REMOTE_CANCELED); - spin_unlock_irq(&mdev->tconn->req_lock); - return 0; - } - spin_unlock_irq(&mdev->tconn->req_lock); - - return w_send_read_req(w, 0); -} - void drbd_csum_ee(struct drbd_conf *mdev, struct crypto_hash *tfm, struct drbd_peer_request *peer_req, void *digest) { |