Whamcloud - gitweb
LU-6635 lfsck: block replacing the OST-object for test
[fs/lustre-release.git] / lustre / osc / osc_object.c
index 88261c0..aa878d2 100644 (file)
  *
  * 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
  */
@@ -131,8 +127,8 @@ static void osc_object_free(const struct lu_env *env, struct lu_object *obj)
 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);
 }
@@ -145,8 +141,8 @@ static int osc_object_print(const struct lu_env *env, void *cookie,
        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);
@@ -182,7 +178,7 @@ static int osc_attr_update(const struct lu_env *env, struct cl_object *obj,
        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);
        }
@@ -241,15 +237,15 @@ static int osc_object_fiemap(const struct lu_env *env, struct cl_object *obj,
        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,