Эх сурвалжийг харах

libceph: nuke unused fields and functions

Either unused or useless:

    osdmap->mkfs_epoch
    osd->o_marked_for_keepalive
    monc->num_generic_requests
    osdc->map_waiters
    osdc->last_requested_map
    osdc->timeout_tid

    osd_req_op_cls_response_data()

    osdmap_apply_incremental() @msgr arg

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Ilya Dryomov 9 жил өмнө
parent
commit
0c0a8de13f

+ 0 - 1
include/linux/ceph/mon_client.h

@@ -77,7 +77,6 @@ struct ceph_mon_client {
 
 
 	/* pending generic requests */
 	/* pending generic requests */
 	struct rb_root generic_request_tree;
 	struct rb_root generic_request_tree;
-	int num_generic_requests;
 	u64 last_tid;
 	u64 last_tid;
 
 
 	/* subs, indexed with CEPH_SUB_* */
 	/* subs, indexed with CEPH_SUB_* */

+ 0 - 8
include/linux/ceph/osd_client.h

@@ -37,11 +37,9 @@ struct ceph_osd {
 	struct list_head o_osd_lru;
 	struct list_head o_osd_lru;
 	struct ceph_auth_handshake o_auth;
 	struct ceph_auth_handshake o_auth;
 	unsigned long lru_ttl;
 	unsigned long lru_ttl;
-	int o_marked_for_keepalive;
 	struct list_head o_keepalive_item;
 	struct list_head o_keepalive_item;
 };
 };
 
 
-
 #define CEPH_OSD_SLAB_OPS	2
 #define CEPH_OSD_SLAB_OPS	2
 #define CEPH_OSD_MAX_OPS	16
 #define CEPH_OSD_MAX_OPS	16
 
 
@@ -206,13 +204,10 @@ struct ceph_osd_client {
 
 
 	struct ceph_osdmap     *osdmap;       /* current map */
 	struct ceph_osdmap     *osdmap;       /* current map */
 	struct rw_semaphore    map_sem;
 	struct rw_semaphore    map_sem;
-	struct completion      map_waiters;
-	u64                    last_requested_map;
 
 
 	struct mutex           request_mutex;
 	struct mutex           request_mutex;
 	struct rb_root         osds;          /* osds */
 	struct rb_root         osds;          /* osds */
 	struct list_head       osd_lru;       /* idle osds */
 	struct list_head       osd_lru;       /* idle osds */
-	u64                    timeout_tid;   /* tid of timeout triggering rq */
 	u64                    last_tid;      /* tid of last request */
 	u64                    last_tid;      /* tid of last request */
 	struct rb_root         requests;      /* pending requests */
 	struct rb_root         requests;      /* pending requests */
 	struct list_head       req_lru;	      /* in-flight lru */
 	struct list_head       req_lru;	      /* in-flight lru */
@@ -271,9 +266,6 @@ extern void osd_req_op_extent_dup_last(struct ceph_osd_request *osd_req,
 extern struct ceph_osd_data *osd_req_op_extent_osd_data(
 extern struct ceph_osd_data *osd_req_op_extent_osd_data(
 					struct ceph_osd_request *osd_req,
 					struct ceph_osd_request *osd_req,
 					unsigned int which);
 					unsigned int which);
-extern struct ceph_osd_data *osd_req_op_cls_response_data(
-					struct ceph_osd_request *osd_req,
-					unsigned int which);
 
 
 extern void osd_req_op_extent_osd_data_pages(struct ceph_osd_request *,
 extern void osd_req_op_extent_osd_data_pages(struct ceph_osd_request *,
 					unsigned int which,
 					unsigned int which,

+ 2 - 4
include/linux/ceph/osdmap.h

@@ -123,7 +123,6 @@ struct ceph_pg_mapping {
 struct ceph_osdmap {
 struct ceph_osdmap {
 	struct ceph_fsid fsid;
 	struct ceph_fsid fsid;
 	u32 epoch;
 	u32 epoch;
-	u32 mkfs_epoch;
 	struct ceph_timespec created, modified;
 	struct ceph_timespec created, modified;
 
 
 	u32 flags;         /* CEPH_OSDMAP_* */
 	u32 flags;         /* CEPH_OSDMAP_* */
@@ -205,9 +204,8 @@ static inline int ceph_decode_pgid(void **p, void *end, struct ceph_pg *pgid)
 }
 }
 
 
 extern struct ceph_osdmap *ceph_osdmap_decode(void **p, void *end);
 extern struct ceph_osdmap *ceph_osdmap_decode(void **p, void *end);
-extern struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
-					    struct ceph_osdmap *map,
-					    struct ceph_messenger *msgr);
+struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
+					     struct ceph_osdmap *map);
 extern void ceph_osdmap_destroy(struct ceph_osdmap *map);
 extern void ceph_osdmap_destroy(struct ceph_osdmap *map);
 
 
 /* calculate mapping of a file extent to an object */
 /* calculate mapping of a file extent to an object */

+ 0 - 3
net/ceph/mon_client.c

@@ -579,7 +579,6 @@ static int __do_generic_request(struct ceph_mon_client *monc, u64 tid,
 	req->tid = tid != 0 ? tid : ++monc->last_tid;
 	req->tid = tid != 0 ? tid : ++monc->last_tid;
 	req->request->hdr.tid = cpu_to_le64(req->tid);
 	req->request->hdr.tid = cpu_to_le64(req->tid);
 	__insert_generic_request(monc, req);
 	__insert_generic_request(monc, req);
-	monc->num_generic_requests++;
 	ceph_con_send(&monc->con, ceph_msg_get(req->request));
 	ceph_con_send(&monc->con, ceph_msg_get(req->request));
 	mutex_unlock(&monc->mutex);
 	mutex_unlock(&monc->mutex);
 
 
@@ -587,7 +586,6 @@ static int __do_generic_request(struct ceph_mon_client *monc, u64 tid,
 
 
 	mutex_lock(&monc->mutex);
 	mutex_lock(&monc->mutex);
 	rb_erase(&req->node, &monc->generic_request_tree);
 	rb_erase(&req->node, &monc->generic_request_tree);
-	monc->num_generic_requests--;
 
 
 	if (!err)
 	if (!err)
 		err = req->result;
 		err = req->result;
@@ -914,7 +912,6 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl)
 
 
 	INIT_DELAYED_WORK(&monc->delayed_work, delayed_work);
 	INIT_DELAYED_WORK(&monc->delayed_work, delayed_work);
 	monc->generic_request_tree = RB_ROOT;
 	monc->generic_request_tree = RB_ROOT;
-	monc->num_generic_requests = 0;
 	monc->last_tid = 0;
 	monc->last_tid = 0;
 
 
 	return 0;
 	return 0;

+ 1 - 12
net/ceph/osd_client.c

@@ -143,14 +143,6 @@ osd_req_op_extent_osd_data(struct ceph_osd_request *osd_req,
 }
 }
 EXPORT_SYMBOL(osd_req_op_extent_osd_data);
 EXPORT_SYMBOL(osd_req_op_extent_osd_data);
 
 
-struct ceph_osd_data *
-osd_req_op_cls_response_data(struct ceph_osd_request *osd_req,
-			unsigned int which)
-{
-	return osd_req_op_data(osd_req, which, cls, response_data);
-}
-EXPORT_SYMBOL(osd_req_op_cls_response_data);	/* ??? */
-
 void osd_req_op_raw_data_in_pages(struct ceph_osd_request *osd_req,
 void osd_req_op_raw_data_in_pages(struct ceph_osd_request *osd_req,
 			unsigned int which, struct page **pages,
 			unsigned int which, struct page **pages,
 			u64 length, u32 alignment,
 			u64 length, u32 alignment,
@@ -2166,8 +2158,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg)
 			dout("applying incremental map %u len %d\n",
 			dout("applying incremental map %u len %d\n",
 			     epoch, maplen);
 			     epoch, maplen);
 			newmap = osdmap_apply_incremental(&p, next,
 			newmap = osdmap_apply_incremental(&p, next,
-							  osdc->osdmap,
-							  &osdc->client->msgr);
+							  osdc->osdmap);
 			if (IS_ERR(newmap)) {
 			if (IS_ERR(newmap)) {
 				err = PTR_ERR(newmap);
 				err = PTR_ERR(newmap);
 				goto bad;
 				goto bad;
@@ -2674,8 +2665,6 @@ int ceph_osdc_init(struct ceph_osd_client *osdc, struct ceph_client *client)
 	osdc->client = client;
 	osdc->client = client;
 	osdc->osdmap = NULL;
 	osdc->osdmap = NULL;
 	init_rwsem(&osdc->map_sem);
 	init_rwsem(&osdc->map_sem);
-	init_completion(&osdc->map_waiters);
-	osdc->last_requested_map = 0;
 	mutex_init(&osdc->request_mutex);
 	mutex_init(&osdc->request_mutex);
 	osdc->last_tid = 0;
 	osdc->last_tid = 0;
 	osdc->osds = RB_ROOT;
 	osdc->osds = RB_ROOT;

+ 1 - 2
net/ceph/osdmap.c

@@ -1204,8 +1204,7 @@ struct ceph_osdmap *ceph_osdmap_decode(void **p, void *end)
  * decode and apply an incremental map update.
  * decode and apply an incremental map update.
  */
  */
 struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
 struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
-					     struct ceph_osdmap *map,
-					     struct ceph_messenger *msgr)
+					     struct ceph_osdmap *map)
 {
 {
 	struct crush_map *newcrush = NULL;
 	struct crush_map *newcrush = NULL;
 	struct ceph_fsid fsid;
 	struct ceph_fsid fsid;