Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

libceph: replace ceph_monc_request_next_osdmap()

... with a wrapper around maybe_request_map() - no need for two
osdmap-specific functions.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

+9 -16
+1 -1
drivers/block/rbd.c
··· 4902 4902 return ret; 4903 4903 4904 4904 if (rbdc->client->osdc.osdmap->epoch < newest_epoch) { 4905 - ceph_monc_request_next_osdmap(&rbdc->client->monc); 4905 + ceph_osdc_maybe_request_map(&rbdc->client->osdc); 4906 4906 (void) ceph_monc_wait_osdmap(&rbdc->client->monc, 4907 4907 newest_epoch, 4908 4908 opts->mount_timeout);
-1
include/linux/ceph/mon_client.h
··· 128 128 void ceph_monc_got_map(struct ceph_mon_client *monc, int sub, u32 epoch); 129 129 void ceph_monc_renew_subs(struct ceph_mon_client *monc); 130 130 131 - extern void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc); 132 131 extern int ceph_monc_wait_osdmap(struct ceph_mon_client *monc, u32 epoch, 133 132 unsigned long timeout); 134 133
+1
include/linux/ceph/osd_client.h
··· 381 381 extern void ceph_osdc_sync(struct ceph_osd_client *osdc); 382 382 383 383 extern void ceph_osdc_flush_notifies(struct ceph_osd_client *osdc); 384 + void ceph_osdc_maybe_request_map(struct ceph_osd_client *osdc); 384 385 385 386 extern int ceph_osdc_readpages(struct ceph_osd_client *osdc, 386 387 struct ceph_vino vino,
-14
net/ceph/mon_client.c
··· 385 385 EXPORT_SYMBOL(ceph_monc_renew_subs); 386 386 387 387 /* 388 - * Register interest in the next osdmap 389 - */ 390 - void ceph_monc_request_next_osdmap(struct ceph_mon_client *monc) 391 - { 392 - dout("%s have %u\n", __func__, monc->subs[CEPH_SUB_OSDMAP].have); 393 - mutex_lock(&monc->mutex); 394 - if (__ceph_monc_want_map(monc, CEPH_SUB_OSDMAP, 395 - monc->subs[CEPH_SUB_OSDMAP].have + 1, false)) 396 - __send_subscribe(monc); 397 - mutex_unlock(&monc->mutex); 398 - } 399 - EXPORT_SYMBOL(ceph_monc_request_next_osdmap); 400 - 401 - /* 402 388 * Wait for an osdmap with a given epoch. 403 389 * 404 390 * @epoch: epoch to wait for
+7
net/ceph/osd_client.c
··· 3869 3869 } 3870 3870 EXPORT_SYMBOL(ceph_osdc_flush_notifies); 3871 3871 3872 + void ceph_osdc_maybe_request_map(struct ceph_osd_client *osdc) 3873 + { 3874 + down_read(&osdc->lock); 3875 + maybe_request_map(osdc); 3876 + up_read(&osdc->lock); 3877 + } 3878 + EXPORT_SYMBOL(ceph_osdc_maybe_request_map); 3872 3879 3873 3880 /* 3874 3881 * init, shutdown