Whamcloud - gitweb
LU-5823 clio: add cl_object_find_cbdata()
[fs/lustre-release.git] / lustre / lov / lov_obd.c
index 1161be3..3f8bbb6 100644 (file)
@@ -1181,80 +1181,6 @@ static int lov_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
        RETURN(0);
 }
 
-static int lov_change_cbdata(struct obd_export *exp,
-                             struct lov_stripe_md *lsm, ldlm_iterator_t it,
-                             void *data)
-{
-        struct lov_obd *lov;
-        int rc = 0, i;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_stripe_md submd;
-                struct lov_oinfo *loi = lsm->lsm_oinfo[i];
-
-               if (lov_oinfo_is_dummy(loi))
-                       continue;
-
-               if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                       CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx);
-                       continue;
-               }
-
-               submd.lsm_oi = loi->loi_oi;
-               submd.lsm_stripe_count = 0;
-               rc = obd_change_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                      &submd, it, data);
-       }
-       RETURN(rc);
-}
-
-/* find any ldlm lock of the inode in lov
- * return 0    not find
- *        1    find one
- *      < 0    error */
-static int lov_find_cbdata(struct obd_export *exp,
-                           struct lov_stripe_md *lsm, ldlm_iterator_t it,
-                           void *data)
-{
-        struct lov_obd *lov;
-        int rc = 0, i;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_stripe_md submd;
-                struct lov_oinfo *loi = lsm->lsm_oinfo[i];
-
-               if (lov_oinfo_is_dummy(loi))
-                       continue;
-
-               if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                       CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx);
-                       continue;
-               }
-
-               submd.lsm_oi = loi->loi_oi;
-               submd.lsm_stripe_count = 0;
-               rc = obd_find_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                    &submd, it, data);
-               if (rc != 0)
-                       RETURN(rc);
-       }
-       RETURN(rc);
-}
-
 int lov_statfs_interpret(struct ptlrpc_request_set *rqset, void *data, int rc)
 {
        struct lov_request_set *lovset = (struct lov_request_set *)data;
@@ -2147,8 +2073,6 @@ static struct obd_ops lov_obd_ops = {
        .o_unpackmd             = lov_unpackmd,
        .o_getattr_async        = lov_getattr_async,
        .o_setattr_async        = lov_setattr_async,
-       .o_change_cbdata        = lov_change_cbdata,
-       .o_find_cbdata          = lov_find_cbdata,
        .o_iocontrol            = lov_iocontrol,
        .o_get_info             = lov_get_info,
        .o_set_info_async       = lov_set_info_async,