*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
int osc_lvb_print(const struct lu_env *env, void *cookie,
lu_printer_t p, const struct ost_lvb *lvb)
{
- return (*p)(env, cookie, "size: "LPU64" mtime: "LPU64" atime: "LPU64" "
- "ctime: "LPU64" blocks: "LPU64,
+ return (*p)(env, cookie, "size: %llu mtime: %llu atime: %llu "
+ "ctime: %llu blocks: %llu",
lvb->lvb_size, lvb->lvb_mtime, lvb->lvb_atime,
lvb->lvb_ctime, lvb->lvb_blocks);
}
struct osc_async_rc *ar = &oinfo->loi_ar;
(*p)(env, cookie, "id: "DOSTID" "
- "idx: %d gen: %d kms_valid: %u kms "LPU64" "
- "rc: %d force_sync: %d min_xid: "LPU64" ",
+ "idx: %d gen: %d kms_valid: %u kms %llu "
+ "rc: %d force_sync: %d min_xid: %llu ",
POSTID(&oinfo->loi_oi), oinfo->loi_ost_idx,
oinfo->loi_ost_gen, oinfo->loi_kms_valid, oinfo->loi_kms,
ar->ar_rc, ar->ar_force_sync, ar->ar_min_xid);
if (valid & CAT_BLOCKS)
lvb->lvb_blocks = attr->cat_blocks;
if (valid & CAT_KMS) {
- CDEBUG(D_CACHE, "set kms from "LPU64"to "LPU64"\n",
+ CDEBUG(D_CACHE, "set kms from %lluto %llu\n",
oinfo->loi_kms, (__u64)attr->cat_kms);
loi_kms_set(oinfo, attr->cat_kms);
}
osc_object_ast_clear, osc);
return 0;
}
-/**
- * Find any ldlm lock covers the osc object.
- * \retval 0 not found
- * \retval 1 find one
- * \retval < 0 error
- */
-static int osc_object_find_cbdata(const struct lu_env *env,
- struct cl_object *obj, ldlm_iterator_t iter,
- void *data)
-{
- struct ldlm_res_id res_id;
- struct obd_device *obd;
- int rc = 0;
-
- ostid_build_res_name(&cl2osc(obj)->oo_oinfo->loi_oi, &res_id);
- obd = obj->co_lu.lo_dev->ld_obd;
- rc = ldlm_resource_iterate(obd->obd_namespace, &res_id, iter, data);
- if (rc == LDLM_ITER_STOP)
- return 1;
-
- if (rc == LDLM_ITER_CONTINUE)
- return 0;
-
- return rc;
-}
static int osc_object_fiemap(const struct lu_env *env, struct cl_object *obj,
struct ll_fiemap_info_key *fmkey,
if (!(fmkey->lfik_fiemap.fm_flags & FIEMAP_FLAG_SYNC))
goto skip_locking;
- policy.l_extent.start = fmkey->lfik_fiemap.fm_start & PAGE_CACHE_MASK;
+ policy.l_extent.start = fmkey->lfik_fiemap.fm_start & PAGE_MASK;
if (OBD_OBJECT_EOF - fmkey->lfik_fiemap.fm_length <=
- fmkey->lfik_fiemap.fm_start + PAGE_CACHE_SIZE - 1)
+ fmkey->lfik_fiemap.fm_start + PAGE_SIZE - 1)
policy.l_extent.end = OBD_OBJECT_EOF;
else
policy.l_extent.end = (fmkey->lfik_fiemap.fm_start +
fmkey->lfik_fiemap.fm_length +
- PAGE_CACHE_SIZE - 1) & PAGE_CACHE_MASK;
+ PAGE_SIZE - 1) & PAGE_MASK;
ostid_build_res_name(&fmkey->lfik_oa.o_oi, &resid);
mode = ldlm_lock_match(exp->exp_obd->obd_namespace,
.coo_attr_update = osc_attr_update,
.coo_glimpse = osc_object_glimpse,
.coo_prune = osc_object_prune,
- .coo_find_cbdata = osc_object_find_cbdata,
.coo_fiemap = osc_object_fiemap,
.coo_req_attr_set = osc_req_attr_set
};