Skip to content

Commit 32844fd

Browse files
Dr. David Alan Gilbertidryomov
authored andcommitted
libceph: Remove unused ceph_osdc_watch_check
ceph_osdc_watch_check() has been unused since it was added in commit b07d3c4 ("libceph: support for checking on status of watch") Remove it. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent ee1eb8c commit 32844fd

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

include/linux/ceph/osd_client.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,8 +626,6 @@ int ceph_osdc_notify(struct ceph_osd_client *osdc,
626626
u32 timeout,
627627
struct page ***preply_pages,
628628
size_t *preply_len);
629-
int ceph_osdc_watch_check(struct ceph_osd_client *osdc,
630-
struct ceph_osd_linger_request *lreq);
631629
int ceph_osdc_list_watchers(struct ceph_osd_client *osdc,
632630
struct ceph_object_id *oid,
633631
struct ceph_object_locator *oloc,

net/ceph/osd_client.c

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4999,40 +4999,6 @@ int ceph_osdc_notify(struct ceph_osd_client *osdc,
49994999
}
50005000
EXPORT_SYMBOL(ceph_osdc_notify);
50015001

5002-
/*
5003-
* Return the number of milliseconds since the watch was last
5004-
* confirmed, or an error. If there is an error, the watch is no
5005-
* longer valid, and should be destroyed with ceph_osdc_unwatch().
5006-
*/
5007-
int ceph_osdc_watch_check(struct ceph_osd_client *osdc,
5008-
struct ceph_osd_linger_request *lreq)
5009-
{
5010-
unsigned long stamp, age;
5011-
int ret;
5012-
5013-
down_read(&osdc->lock);
5014-
mutex_lock(&lreq->lock);
5015-
stamp = lreq->watch_valid_thru;
5016-
if (!list_empty(&lreq->pending_lworks)) {
5017-
struct linger_work *lwork =
5018-
list_first_entry(&lreq->pending_lworks,
5019-
struct linger_work,
5020-
pending_item);
5021-
5022-
if (time_before(lwork->queued_stamp, stamp))
5023-
stamp = lwork->queued_stamp;
5024-
}
5025-
age = jiffies - stamp;
5026-
dout("%s lreq %p linger_id %llu age %lu last_error %d\n", __func__,
5027-
lreq, lreq->linger_id, age, lreq->last_error);
5028-
/* we are truncating to msecs, so return a safe upper bound */
5029-
ret = lreq->last_error ?: 1 + jiffies_to_msecs(age);
5030-
5031-
mutex_unlock(&lreq->lock);
5032-
up_read(&osdc->lock);
5033-
return ret;
5034-
}
5035-
50365002
static int decode_watcher(void **p, void *end, struct ceph_watch_item *item)
50375003
{
50385004
u8 struct_v;

0 commit comments

Comments
 (0)