staging/lustre: obd: remove unused data structures
authorArnd Bergmann <arnd@arndb.de>
Sun, 27 Sep 2015 20:45:03 +0000 (16:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Sep 2015 02:03:33 +0000 (04:03 +0200)
We want to get rid of all uses of time_t, and it turns out
that obd.h contains a bunch of them that are completely unused.

This removes those structures, along with a couple of other
structures and functions in the same file that also turned
out to be unused.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd.h
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/obdclass/obd_config.c
drivers/staging/lustre/lustre/obdecho/echo_client.c
drivers/staging/lustre/lustre/osc/osc_io.c

index bafef4e6fe947ca393283946e9b454fe0df6d7fe..0dbac3f53f01e30cf587d2a8c9e0f7b93a76abd5 100644 (file)
@@ -144,10 +144,6 @@ typedef int (*obd_enqueue_update_f)(void *cookie, int rc);
 
 /* obd info for a particular level (lov, osc). */
 struct obd_info {
-       /* Lock policy. It keeps an extent which is specific for a particular
-        * OSC. (e.g. lov_prep_enqueue_set initialises extent of the policy,
-        * and osc_enqueue passes it into ldlm_lock_match & ldlm_cli_enqueue. */
-       ldlm_policy_data_t      oi_policy;
        /* Flags used for set request specific flags:
           - while lock handling, the flags obtained on the enqueue
           request are set here.
@@ -155,8 +151,6 @@ struct obd_info {
           - while setattr, the flags used for distinguish punch operation
         */
        __u64              oi_flags;
-       /* Lock handle specific for every OSC lock. */
-       struct lustre_handle   *oi_lockh;
        /* lsm data specific for every OSC. */
        struct lov_stripe_md   *oi_md;
        /* obdo data specific for every OSC, if needed at all. */
@@ -171,8 +165,6 @@ struct obd_info {
        /* oss capability, its type is obd_capa in client to avoid copy.
         * in contrary its type is lustre_capa in OSS. */
        void               *oi_capa;
-       /* transfer jobid from ost_sync() to filter_sync()... */
-       char               *oi_jobid;
 };
 
 /* compare all relevant fields. */
@@ -455,25 +447,6 @@ struct echo_client_obd {
        __u64           ec_unique;
 };
 
-struct lov_qos_oss {
-       struct obd_uuid     lqo_uuid;       /* ptlrpc's c_remote_uuid */
-       struct list_head          lqo_oss_list;   /* link to lov_qos */
-       __u64          lqo_bavail;     /* total bytes avail on OSS */
-       __u64          lqo_penalty;    /* current penalty */
-       __u64          lqo_penalty_per_obj;/* penalty decrease every obj*/
-       time_t        lqo_used;       /* last used time, seconds */
-       __u32          lqo_ost_count;  /* number of osts on this oss */
-};
-
-struct ltd_qos {
-       struct lov_qos_oss *ltq_oss;     /* oss info */
-       __u64          ltq_penalty;     /* current penalty */
-       __u64          ltq_penalty_per_obj; /* penalty decrease every obj*/
-       __u64          ltq_weight;      /* net weighting */
-       time_t        ltq_used; /* last used time, seconds */
-       unsigned int    ltq_usable:1;    /* usable for striping */
-};
-
 /* Generic subset of OSTs */
 struct ost_pool {
        __u32         *op_array;      /* array of index of
@@ -524,7 +497,6 @@ struct lov_tgt_desc {
        struct obd_uuid     ltd_uuid;
        struct obd_device  *ltd_obd;
        struct obd_export  *ltd_exp;
-       struct ltd_qos      ltd_qos;     /* qos info per target */
        __u32          ltd_gen;
        __u32          ltd_index;   /* index in lov_obd->tgts */
        unsigned long       ltd_active:1,/* is this target up for requests */
@@ -883,12 +855,7 @@ struct obd_device {
        int                           obd_requests_queued_for_recovery;
        wait_queue_head_t                     obd_next_transno_waitq;
        /* protected by obd_recovery_task_lock */
-       struct timer_list       obd_recovery_timer;
-       time_t                  obd_recovery_start; /* seconds */
-       time_t                  obd_recovery_end; /* seconds, for lprocfs_status */
-       int                           obd_recovery_time_hard;
        int                           obd_recovery_timeout;
-       int                           obd_recovery_ir_factor;
 
        /* new recovery stuff from CMD2 */
        struct target_recovery_data      obd_recovery_data;
index ce6fa55aded74b9631b6b1ff1b00f100c0dcd7f8..7308cda6f5e6f597d2b296f0542fe19974f4ca9c 100644 (file)
@@ -1114,7 +1114,7 @@ static inline int obd_statfs_rqset(struct obd_export *exp,
                                   __u32 flags)
 {
        struct ptlrpc_request_set *set = NULL;
-       struct obd_info oinfo = { { { 0 } } };
+       struct obd_info oinfo = { };
        int rc = 0;
 
        set =  ptlrpc_prep_set();
index 31ed2487377b22bea956b6905c90e1ad8beb8901..5627c0f6dca160d370b02bc33198f69deb200b21 100644 (file)
@@ -916,7 +916,7 @@ static int ll_lsm_getattr(struct lov_stripe_md *lsm, struct obd_export *exp,
                          __u64 ioepoch, int sync)
 {
        struct ptlrpc_request_set *set;
-       struct obd_info     oinfo = { { { 0 } } };
+       struct obd_info     oinfo = { };
        int                     rc;
 
        LASSERT(lsm != NULL);
index aa68608c3cbd7d77c10275283f8362e2a9a2ec69..8dc3de11bb74dab3068eed91a732b84a1dddfcf9 100644 (file)
@@ -1824,7 +1824,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
        }
        case FSFILT_IOC_SETFLAGS: {
                struct lov_stripe_md *lsm;
-               struct obd_info oinfo = { { { 0 } } };
+               struct obd_info oinfo = { };
                struct md_op_data *op_data;
 
                if (get_user(flags, (int *)arg))
index 906503b0597984a3fa23b29c28f7d578538b295e..d51311c9c7532aa1c6006aec949bf4c9f1e604c9 100644 (file)
@@ -1365,7 +1365,7 @@ static int lov_statfs(const struct lu_env *env, struct obd_export *exp,
                      struct obd_statfs *osfs, __u64 max_age, __u32 flags)
 {
        struct ptlrpc_request_set *set = NULL;
-       struct obd_info oinfo = { { { 0 } } };
+       struct obd_info oinfo = { };
        int rc = 0;
 
        /* for obdclass we forbid using obd_statfs_rqset, but prefer using async
index 32b40eab8d8efb84fd6eaeea33aece73037f595e..b86a47c540296f2a878999f6d828e8277caa8680 100644 (file)
@@ -393,7 +393,6 @@ int class_attach(struct lustre_cfg *lcfg)
        /* XXX belongs in setup not attach  */
        init_rwsem(&obd->obd_observer_link_sem);
        /* recovery data */
-       cfs_init_timer(&obd->obd_recovery_timer);
        spin_lock_init(&obd->obd_recovery_task_lock);
        init_waitqueue_head(&obd->obd_next_transno_waitq);
        init_waitqueue_head(&obd->obd_evict_inprogress_waitq);
index 27bd170c3a2831c6e2c1c9a5980cdb956900d569..81304e456dbdca75f86f8ecde98f886c7368b70c 100644 (file)
@@ -1917,7 +1917,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
        case OBD_IOC_GETATTR:
                rc = echo_get_object(&eco, ed, oa);
                if (rc == 0) {
-                       struct obd_info oinfo = { { { 0 } } };
+                       struct obd_info oinfo = { };
 
                        oinfo.oi_md = eco->eo_lsm;
                        oinfo.oi_oa = oa;
@@ -1934,7 +1934,7 @@ echo_client_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 
                rc = echo_get_object(&eco, ed, oa);
                if (rc == 0) {
-                       struct obd_info oinfo = { { { 0 } } };
+                       struct obd_info oinfo = { };
 
                        oinfo.oi_oa = oa;
                        oinfo.oi_md = eco->eo_lsm;
index be058c289d765c4f1668107f4b8e7c67f25800ba..67bf0bdeb8530597d4c1414723dcf8efa5fc1b4e 100644 (file)
@@ -402,7 +402,7 @@ static int osc_io_setattr_start(const struct lu_env *env,
        __u64 size = io->u.ci_setattr.sa_attr.lvb_size;
        unsigned int ia_valid = io->u.ci_setattr.sa_valid;
        int result = 0;
-       struct obd_info oinfo = { { { 0 } } };
+       struct obd_info oinfo = { };
 
        /* truncate cache dirty pages first */
        if (cl_io_is_trunc(io))