Skip to content

Commit a390de0

Browse files
committed
libceph: unlink from o_linger_requests when clearing r_osd
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 <[email protected]> Reviewed-by: Alex Elder <[email protected]>
1 parent aaef317 commit a390de0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/ceph/osd_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,6 +1395,7 @@ static int __map_request(struct ceph_osd_client *osdc,
13951395
if (req->r_osd) {
13961396
__cancel_request(req);
13971397
list_del_init(&req->r_osd_item);
1398+
list_del_init(&req->r_linger_osd_item);
13981399
req->r_osd = NULL;
13991400
}
14001401

0 commit comments

Comments
 (0)