Whamcloud - gitweb
LU-7925 llite: avoid clearing i_nlink for inodes in use
[fs/lustre-release.git] / lustre / lov / lov_object.c
index 85243d1..c1b12fe 100644 (file)
@@ -80,8 +80,6 @@ struct lov_layout_operations {
                             struct cl_object *obj, struct cl_io *io);
         int  (*llo_getattr)(const struct lu_env *env, struct cl_object *obj,
                             struct cl_attr *attr);
-       int  (*llo_find_cbdata)(const struct lu_env *env, struct cl_object *obj,
-                               ldlm_iterator_t iter, void *data);
 };
 
 static int lov_layout_wait(const struct lu_env *env, struct lov_object *lov);
@@ -593,37 +591,6 @@ static int lov_attr_get_raid0(const struct lu_env *env, struct cl_object *obj,
        RETURN(result);
 }
 
-static int lov_find_cbdata_empty(const struct lu_env *env,
-                                struct cl_object *obj, ldlm_iterator_t iter,
-                                void *data)
-{
-       return 0;
-}
-
-static int lov_find_cbdata_raid0(const struct lu_env *env,
-                                struct cl_object *obj, ldlm_iterator_t iter,
-                                void *data)
-{
-       struct lov_object       *lov = cl2lov(obj);
-       struct lov_layout_raid0 *r0 = lov_r0(lov);
-       struct cl_object        *subobj;
-       int                     i;
-       int                     rc = 0;
-
-       for (i = 0; i < r0->lo_nr; ++i) {
-               if (r0->lo_sub[i] == NULL)
-                       continue;
-
-               subobj = lovsub2cl(r0->lo_sub[i]);
-
-               rc = cl_object_find_cbdata(env, subobj, iter, data);
-               if (rc != 0)
-                       break;
-       }
-
-       return rc;
-}
-
 const static struct lov_layout_operations lov_dispatch[] = {
         [LLT_EMPTY] = {
                 .llo_init      = lov_init_empty,
@@ -635,7 +602,6 @@ const static struct lov_layout_operations lov_dispatch[] = {
                 .llo_lock_init = lov_lock_init_empty,
                 .llo_io_init   = lov_io_init_empty,
                .llo_getattr   = lov_attr_get_empty,
-               .llo_find_cbdata = lov_find_cbdata_empty
         },
         [LLT_RAID0] = {
                 .llo_init      = lov_init_raid0,
@@ -647,7 +613,6 @@ const static struct lov_layout_operations lov_dispatch[] = {
                 .llo_lock_init = lov_lock_init_raid0,
                 .llo_io_init   = lov_io_init_raid0,
                .llo_getattr   = lov_attr_get_raid0,
-               .llo_find_cbdata = lov_find_cbdata_raid0
        },
         [LLT_RELEASED] = {
                 .llo_init      = lov_init_released,
@@ -659,7 +624,6 @@ const static struct lov_layout_operations lov_dispatch[] = {
                 .llo_lock_init = lov_lock_init_empty,
                 .llo_io_init   = lov_io_init_released,
                .llo_getattr   = lov_attr_get_empty,
-               .llo_find_cbdata = lov_find_cbdata_empty
         }
 };
 
@@ -1516,18 +1480,6 @@ static loff_t lov_object_maxbytes(struct cl_object *obj)
        return maxbytes;
 }
 
-static int lov_object_find_cbdata(const struct lu_env *env,
-                                 struct cl_object *obj, ldlm_iterator_t iter,
-                                 void *data)
-{
-       int rc;
-       ENTRY;
-
-       /* call cl_object_find_cbdata for sub obj */
-       rc = LOV_2DISPATCH(cl2lov(obj), llo_find_cbdata, env, obj, iter, data);
-       RETURN(rc);
-}
-
 static const struct cl_object_operations lov_ops = {
        .coo_page_init    = lov_page_init,
        .coo_lock_init    = lov_lock_init,
@@ -1538,7 +1490,6 @@ static const struct cl_object_operations lov_ops = {
        .coo_getstripe    = lov_object_getstripe,
        .coo_layout_get   = lov_object_layout_get,
        .coo_maxbytes     = lov_object_maxbytes,
-       .coo_find_cbdata  = lov_object_find_cbdata,
        .coo_fiemap       = lov_object_fiemap,
 };