]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
libceph: drop started parameter of __ceph_open_session()
authorIlya Dryomov <idryomov@gmail.com>
Mon, 3 Nov 2025 20:34:01 +0000 (21:34 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 26 Nov 2025 22:29:11 +0000 (23:29 +0100)
With the previous commit revamping the timeout handling, started isn't
used anymore.  It could be taken into account by adjusting the initial
value of the timeout, but there is little point as both callers capture
the timestamp shortly before calling __ceph_open_session() -- the only
thing of note that happens in the interim is taking client->mount_mutex
and that isn't expected to take multiple seconds.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
fs/ceph/super.c
include/linux/ceph/libceph.h
net/ceph/ceph_common.c

index ad0cf177e75ab51538249c82516995ed3128f6d4..f6bf24b5c683ef0023e654a1e6c433111394d774 100644 (file)
@@ -1149,7 +1149,7 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc,
                const char *path = fsc->mount_options->server_path ?
                                     fsc->mount_options->server_path + 1 : "";
 
-               err = __ceph_open_session(fsc->client, started);
+               err = __ceph_open_session(fsc->client);
                if (err < 0)
                        goto out;
 
index 733e7f93db66a7a29a4a8eba97e9ebf2c49da1f9..63e0e2aa1ce986e6a2a30131345015ec160a9c9e 100644 (file)
@@ -306,8 +306,7 @@ struct ceph_entity_addr *ceph_client_addr(struct ceph_client *client);
 u64 ceph_client_gid(struct ceph_client *client);
 extern void ceph_destroy_client(struct ceph_client *client);
 extern void ceph_reset_client_addr(struct ceph_client *client);
-extern int __ceph_open_session(struct ceph_client *client,
-                              unsigned long started);
+extern int __ceph_open_session(struct ceph_client *client);
 extern int ceph_open_session(struct ceph_client *client);
 int ceph_wait_for_latest_osdmap(struct ceph_client *client,
                                unsigned long timeout);
index 285e981730e5cb6a4d150c7df1c6d06870f39fc4..e734e57be083a3ca07f4a6ca0ee35916290bd0f9 100644 (file)
@@ -788,7 +788,7 @@ EXPORT_SYMBOL(ceph_reset_client_addr);
 /*
  * mount: join the ceph cluster, and open root directory.
  */
-int __ceph_open_session(struct ceph_client *client, unsigned long started)
+int __ceph_open_session(struct ceph_client *client)
 {
        DEFINE_WAIT_FUNC(wait, woken_wake_function);
        long timeout = ceph_timeout_jiffies(client->options->mount_timeout);
@@ -844,12 +844,11 @@ EXPORT_SYMBOL(__ceph_open_session);
 int ceph_open_session(struct ceph_client *client)
 {
        int ret;
-       unsigned long started = jiffies;  /* note the start time */
 
        dout("open_session start\n");
        mutex_lock(&client->mount_mutex);
 
-       ret = __ceph_open_session(client, started);
+       ret = __ceph_open_session(client);
 
        mutex_unlock(&client->mount_mutex);
        return ret;