Skip to content

Commit

Permalink
libceph: unlink from o_linger_requests when clearing r_osd
Browse files Browse the repository at this point in the history
Requests have to be unlinked from both osd->o_requests (normal
requests) and osd->o_linger_requests (linger requests) lists when
clearing req->r_osd.  Otherwise __unregister_linger_request() gets
confused and we trip over a !list_empty(&osd->o_linger_requests)
assert in __remove_osd().

MON=1 OSD=1:

    # cat remove-osd.sh
    #!/bin/bash
    rbd create --size 1 test
    DEV=$(rbd map test)
    ceph osd out 0
    sleep 3
    rbd map dne/dne # obtain a new osdmap as a side effect
    rbd unmap $DEV & # will block
    sleep 3
    ceph osd in 0

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Alex Elder <elder@linaro.org>
  • Loading branch information
Ilya Dryomov committed Nov 13, 2014
1 parent aaef317 commit a390de0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,7 @@ static int __map_request(struct ceph_osd_client *osdc,
if (req->r_osd) {
__cancel_request(req);
list_del_init(&req->r_osd_item);
list_del_init(&req->r_linger_osd_item);
req->r_osd = NULL;
}

Expand Down

0 comments on commit a390de0

Please sign in to comment.