Skip to content

Commit cd634fb

Browse files
committed
libceph: subscribe to osdmap when cluster is full
When the cluster is marked full, subscribe to subsequent map updates to ensure we find out promptly when it is no longer full. This will prevent us from spewing ENOSPC for (much) longer than necessary. Signed-off-by: Sage Weil <sage@newdream.net>
1 parent 7662d8f commit cd634fb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎net/ceph/osd_client.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,15 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
14211421
done:
14221422
downgrade_write(&osdc->map_sem);
14231423
ceph_monc_got_osdmap(&osdc->client->monc, osdc->osdmap->epoch);
1424+
1425+
/*
1426+
* subscribe to subsequent osdmap updates if full to ensure
1427+
* we find out when we are no longer full and stop returning
1428+
* ENOSPC.
1429+
*/
1430+
if (ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_FULL))
1431+
ceph_monc_request_next_osdmap(&osdc->client->monc);
1432+
14241433
send_queued(osdc);
14251434
up_read(&osdc->map_sem);
14261435
wake_up_all(&osdc->client->auth_wq);

0 commit comments

Comments
 (0)