Whamcloud - gitweb
LU-6245 server: remove types abstraction from MDS/MGS code 71/22371/4
authorJames Simmons <uja.ornl@yahoo.com>
Fri, 9 Sep 2016 16:19:43 +0000 (12:19 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 22 Sep 2016 03:04:18 +0000 (03:04 +0000)
Originally when lustre code was built for userland we needed
a proper way to handle 32 bit and 64 bit platforms when
reporting unsigned longs. Now that this code is only built
for kernel space and the kernel has it own special string
handling functions we don't need this abstraction anymore.
Remove this abstraction from the MGS/MDS server side code.

Change-Id: I963ab240abbc650289040ee14f267f344c9f4124
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: http://review.whamcloud.com/22371
Reviewed-by: Frank Zago <fzago@cray.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
28 files changed:
lustre/lod/lod_dev.c
lustre/lod/lod_lov.c
lustre/lod/lod_qos.c
lustre/lod/lproc_lod.c
lustre/mdd/mdd_device.c
lustre/mdd/mdd_dir.c
lustre/mdd/mdd_lproc.c
lustre/mdd/mdd_object.c
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_hsm.c
lustre/mdt/mdt_hsm_cdt_actions.c
lustre/mdt/mdt_hsm_cdt_agent.c
lustre/mdt/mdt_hsm_cdt_client.c
lustre/mdt/mdt_hsm_cdt_requests.c
lustre/mdt/mdt_identity.c
lustre/mdt/mdt_lib.c
lustre/mdt/mdt_open.c
lustre/mdt/mdt_recovery.c
lustre/mdt/mdt_reint.c
lustre/mdt/mdt_xattr.c
lustre/mgs/mgs_handler.c
lustre/osp/lproc_osp.c
lustre/osp/osp_dev.c
lustre/osp/osp_md_object.c
lustre/osp/osp_precreate.c
lustre/osp/osp_sync.c
lustre/osp/osp_trans.c

index 86035fa..b5aec94 100644 (file)
@@ -164,7 +164,7 @@ int lod_fld_lookup(const struct lu_env *env, struct lod_device *lod,
        *tgt = range.lsr_index;
        *type = range.lsr_flags;
 
-       CDEBUG(D_INFO, "%s: got tgt %x for sequence: "LPX64"\n",
+       CDEBUG(D_INFO, "%s: got tgt %x for sequence: %#llx\n",
               lod2obd(lod)->obd_name, *tgt, fid_seq(fid));
 
        RETURN(0);
index d362f48..384f06b 100644 (file)
@@ -1224,7 +1224,7 @@ void lod_fix_desc_stripe_size(__u64 *val)
                *val = LOV_DESC_STRIPE_SIZE_DEFAULT;
        } else if (*val & (LOV_MIN_STRIPE_SIZE - 1)) {
                *val &= ~(LOV_MIN_STRIPE_SIZE - 1);
-               LCONSOLE_WARN("Changing default stripe size to "LPU64" (a "
+               LCONSOLE_WARN("Changing default stripe size to %llu (a "
                              "multiple of %u)\n",
                              *val, LOV_MIN_STRIPE_SIZE);
        }
index 3de777f..6a7609e 100644 (file)
@@ -517,9 +517,9 @@ static int lod_qos_used(struct lod_device *lod, struct ost_pool *osts,
                if (ost->ltd_qos.ltq_usable)
                        *total_wt += ost->ltd_qos.ltq_weight;
 
-               QOS_DEBUG("recalc tgt %d usable=%d avail="LPU64
-                         " ostppo="LPU64" ostp="LPU64" ossppo="LPU64
-                         " ossp="LPU64" wt="LPU64"\n",
+               QOS_DEBUG("recalc tgt %d usable=%d avail=%llu"
+                         " ostppo=%llu ostp=%llu ossppo=%llu"
+                         " ossp=%llu wt=%llu\n",
                          i, ost->ltd_qos.ltq_usable, TGT_BAVAIL(i) >> 10,
                          ost->ltd_qos.ltq_penalty_per_obj >> 10,
                          ost->ltd_qos.ltq_penalty >> 10,
@@ -1516,8 +1516,8 @@ static int lod_alloc_qos(const struct lu_env *env, struct lod_object *lo,
                                continue;
 
                        cur_weight += ost->ltd_qos.ltq_weight;
-                       QOS_DEBUG("stripe_cnt=%d nfound=%d cur_weight="LPU64
-                                 " rand="LPU64" total_weight="LPU64"\n",
+                       QOS_DEBUG("stripe_cnt=%d nfound=%d cur_weight=%llu"
+                                 " rand=%llu total_weight=%llu\n",
                                  stripe_cnt, nfound, cur_weight, rand,
                                  total_weight);
 
index a30eba2..4345340 100644 (file)
@@ -65,7 +65,7 @@ static int lod_stripesize_seq_show(struct seq_file *m, void *v)
 
        LASSERT(dev != NULL);
        lod  = lu2lod_dev(dev->obd_lu_dev);
-       seq_printf(m, LPU64"\n",
+       seq_printf(m, "%llu\n",
                   lod->lod_desc.ld_default_stripe_size);
        return 0;
 }
@@ -124,7 +124,7 @@ static int lod_stripeoffset_seq_show(struct seq_file *m, void *v)
 
        LASSERT(dev != NULL);
        lod  = lu2lod_dev(dev->obd_lu_dev);
-       seq_printf(m, LPU64"\n",
+       seq_printf(m, "%llu\n",
                   lod->lod_desc.ld_default_stripe_offset);
        return 0;
 }
index 4a7b872..272427a 100644 (file)
@@ -181,7 +181,7 @@ static int changelog_init_cb(const struct lu_env *env, struct llog_handle *llh,
        LASSERT(rec->cr_hdr.lrh_type == CHANGELOG_REC);
 
        CDEBUG(D_INFO,
-              "seeing record at index %d/%d/"LPU64" t=%x %.*s in log"
+              "seeing record at index %d/%d/%llu t=%x %.*s in log"
               DOSTID"\n", hdr->lrh_index, rec->cr_hdr.lrh_index,
               rec->cr.cr_index, rec->cr.cr_type, rec->cr.cr_namelen,
               changelog_rec_name(&rec->cr), POSTID(&llh->lgh_id.lgl_oi));
@@ -201,7 +201,7 @@ static int changelog_user_init_cb(const struct lu_env *env,
         LASSERT(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN);
         LASSERT(rec->cur_hdr.lrh_type == CHANGELOG_USER_REC);
 
-        CDEBUG(D_INFO, "seeing user at index %d/%d id=%d endrec="LPU64
+       CDEBUG(D_INFO, "seeing user at index %d/%d id=%d endrec=%llu"
                " in log "DOSTID"\n", hdr->lrh_index, rec->cur_hdr.lrh_index,
                rec->cur_id, rec->cur_endrec, POSTID(&llh->lgh_id.lgl_oi));
 
@@ -358,7 +358,7 @@ static int mdd_changelog_llog_init(const struct lu_env *env,
                GOTO(out_close, rc);
        }
 
-       CDEBUG(D_IOCTL, "changelog starting index="LPU64"\n",
+       CDEBUG(D_IOCTL, "changelog starting index=%llu\n",
               mdd->mdd_cl.mc_index);
 
        /* setup user changelog */
@@ -589,8 +589,8 @@ static int obf_lookup(const struct lu_env *env, struct md_object *p,
        if (!fid_is_norm(f) && !fid_is_igif(f) && !fid_is_root(f) &&
            !fid_seq_is_dot(f->f_seq)) {
                CWARN("%s: Trying to lookup invalid FID "DFID" in %s/%s, "
-                     "sequence should be >= "LPX64" or within ["LPX64","
-                     ""LPX64"].\n", mdd2obd_dev(mdd)->obd_name, PFID(f),
+                     "sequence should be >= %#llx or within [%#llx,"
+                     "%#llx].\n", mdd2obd_dev(mdd)->obd_name, PFID(f),
                      dot_lustre_name, mdd_obf_dir_name, (__u64)FID_SEQ_NORMAL,
                      (__u64)FID_SEQ_IGIF, (__u64)FID_SEQ_IGIF_MAX);
                GOTO(out, rc = -EINVAL);
@@ -1395,7 +1395,7 @@ static int mdd_changelog_user_purge_cb(const struct lu_env *env,
         }
 
         /* Update the endrec */
-        CDEBUG(D_IOCTL, "Rewriting changelog user %d endrec to "LPU64"\n",
+       CDEBUG(D_IOCTL, "Rewriting changelog user %d endrec to %llu\n",
                mcud->mcud_id, rec->cur_endrec);
 
        rc = llog_write(env, llh, hdr, hdr->lrh_index);
@@ -1438,7 +1438,7 @@ static int mdd_changelog_user_purge(const struct lu_env *env,
                              mdd_changelog_user_purge_cb, (void *)&data,
                              0, 0);
         if ((rc >= 0) && (data.mcud_minrec > 0)) {
-                CDEBUG(D_IOCTL, "Purging changelog entries up to "LPD64
+               CDEBUG(D_IOCTL, "Purging changelog entries up to %lld"
                        ", referenced by "CHANGELOG_USER_PREFIX"%d\n",
                        data.mcud_minrec, data.mcud_minid);
                rc = mdd_changelog_llog_cancel(env, mdd, data.mcud_minrec);
@@ -1451,7 +1451,7 @@ static int mdd_changelog_user_purge(const struct lu_env *env,
 
         if (!data.mcud_found) {
                 CWARN("No entry for user %d.  Last changelog reference is "
-                      LPD64" by changelog user %d\n", data.mcud_id,
+                     "%lld by changelog user %d\n", data.mcud_id,
                       data.mcud_minrec, data.mcud_minid);
                rc = -ENOENT;
         }
index e0e878d..38eef37 100644 (file)
@@ -1820,7 +1820,7 @@ static int mdd_create_data(const struct lu_env *env,
         * XXX: Setting the lov ea is not locked but setting the attr is locked?
         * Should this be fixed?
         */
-       CDEBUG(D_OTHER, "ea %p/%u, cr_flags "LPO64", no_create %u\n",
+       CDEBUG(D_OTHER, "ea %p/%u, cr_flags %#llo, no_create %u\n",
               spec->u.sp_ea.eadata, spec->u.sp_ea.eadatalen,
               spec->sp_cr_flags, spec->no_create);
 
index b291ffd..d6e1d0d 100644 (file)
@@ -137,7 +137,7 @@ static int lprocfs_changelog_users_cb(const struct lu_env *env,
 
        rec = (struct llog_changelog_user_rec *)hdr;
 
-       seq_printf(m, CHANGELOG_USER_PREFIX"%-3d "LPU64"\n",
+       seq_printf(m, CHANGELOG_USER_PREFIX"%-3d %llu\n",
                   rec->cur_id, rec->cur_endrec);
        return 0;
 }
@@ -166,7 +166,7 @@ static int mdd_changelog_users_seq_show(struct seq_file *m, void *data)
        cur = mdd->mdd_cl.mc_index;
        spin_unlock(&mdd->mdd_cl.mc_lock);
 
-       seq_printf(m, "current index: "LPU64"\n", cur);
+       seq_printf(m, "current index: %llu\n", cur);
        seq_printf(m, "%-5s %s\n", "ID", "index");
 
        llog_cat_process(&env, ctxt->loc_handle, lprocfs_changelog_users_cb,
@@ -223,7 +223,7 @@ static int mdd_changelog_size_seq_show(struct seq_file *m, void *data)
        rc = mdd_changelog_size_ctxt(&env, mdd, LLOG_CHANGELOG_USER_ORIG_CTXT,
                                     &tmp);
 
-       seq_printf(m, LPU64"\n", tmp);
+       seq_printf(m, "%llu\n", tmp);
        lu_env_fini(&env);
        return rc;
 }
index 7774803..8a9df17 100644 (file)
@@ -182,9 +182,10 @@ static void mdd_object_free(const struct lu_env *env, struct lu_object *o)
 static int mdd_object_print(const struct lu_env *env, void *cookie,
                             lu_printer_t p, const struct lu_object *o)
 {
-        struct mdd_object *mdd = lu2mdd_obj((struct lu_object *)o);
-        return (*p)(env, cookie, LUSTRE_MDD_NAME"-object@%p(open_count=%d, "
-                    "valid=%x, cltime="LPU64", flags=%lx)",
+       struct mdd_object *mdd = lu2mdd_obj((struct lu_object *)o);
+
+       return (*p)(env, cookie,
+                   LUSTRE_MDD_NAME"-object@%p(open_count=%d, valid=%x, cltime=%llu, flags=%lx)",
                     mdd, mdd->mod_count, mdd->mod_valid,
                     mdd->mod_cltime, mdd->mod_flags);
 }
@@ -861,7 +862,7 @@ int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
        /* no need to setattr anymore */
        if (la_copy->la_valid == 0) {
                CDEBUG(D_INODE, "%s: no valid attribute on "DFID", previous"
-                      "valid is "LPX64"\n", mdd2obd_dev(mdd)->obd_name,
+                      "valid is %#llx\n", mdd2obd_dev(mdd)->obd_name,
                       PFID(mdo2fid(mdd_obj)), la->la_valid);
 
                RETURN(0);
@@ -883,7 +884,7 @@ int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
                handle->th_sync = 1;
 
        if (la->la_valid & (LA_MTIME | LA_CTIME))
-                CDEBUG(D_INODE, "setting mtime "LPU64", ctime "LPU64"\n",
+               CDEBUG(D_INODE, "setting mtime %llu, ctime %llu\n",
                       la->la_mtime, la->la_ctime);
 
        mdd_write_lock(env, mdd_obj, MOR_TGT_CHILD);
index 5f5c20a..9074a90 100644 (file)
@@ -102,8 +102,8 @@ void mdt_hsm_dump_hal(int level, const char *prefix,
        struct hsm_action_item  *hai;
        char                     buf[12];
 
-       CDEBUG(level, "%s: HAL header: version %X count %d compound "LPX64
-                     " archive_id %d flags "LPX64"\n",
+       CDEBUG(level, "%s: HAL header: version %X count %d compound %#llx"
+                     " archive_id %d flags %#llx\n",
               prefix, hal->hal_version, hal->hal_count,
               hal->hal_compound_id, hal->hal_archive_id, hal->hal_flags);
 
@@ -111,8 +111,8 @@ void mdt_hsm_dump_hal(int level, const char *prefix,
        for (i = 0; i < hal->hal_count; i++) {
                sz = hai->hai_len - sizeof(*hai);
                CDEBUG(level, "%s %d: fid="DFID" dfid="DFID
-                      " compound/cookie="LPX64"/"LPX64
-                      " action=%s extent="LPX64"-"LPX64" gid="LPX64
+                      " compound/cookie=%#llx/%#llx"
+                      " action=%s extent=%#llx-%#llx gid=%#llx"
                       " datalen=%d data=[%s]\n",
                       prefix, i,
                       PFID(&hai->hai_fid), PFID(&hai->hai_dfid),
@@ -216,14 +216,8 @@ static int mdt_coordinator_cb(const struct lu_env *env,
                                cfs_size_round(MTI_NAME_MAXLEN+1) +
                                2 * cfs_size_round(larr->arr_hai.hai_len);
                        OBD_ALLOC(hal, request->hal_sz);
-                       if (!hal) {
-                               CERROR("%s: Cannot allocate memory (%d o)"
-                                      "for compound "LPX64"\n",
-                                      mdt_obd_name(mdt),
-                                      request->hal_sz,
-                                      larr->arr_compound_id);
+                       if (!hal)
                                RETURN(-ENOMEM);
-                       }
                        hal->hal_version = HAL_VERSION;
                        strlcpy(hal->hal_fsname, hsd->fs_name,
                                MTI_NAME_MAXLEN + 1);
@@ -257,13 +251,8 @@ static int mdt_coordinator_cb(const struct lu_env *env,
 
                                sz = 2 * request->hal_sz;
                                OBD_ALLOC(hal_buffer, sz);
-                               if (!hal_buffer) {
-                                       CERROR("%s: Cannot allocate memory "
-                                              "(%d o) for compound "LPX64"\n",
-                                              mdt_obd_name(mdt), sz,
-                                              larr->arr_compound_id);
+                               if (!hal_buffer)
                                        RETURN(-ENOMEM);
-                               }
                                memcpy(hal_buffer, request->hal,
                                       request->hal_used_sz);
                                OBD_FREE(request->hal,
@@ -324,7 +313,7 @@ static int mdt_coordinator_cb(const struct lu_env *env,
                rc = mdt_hsm_update_request_state(hsd->mti, &pgs, 0);
                if (rc)
                        CERROR("%s: cannot cleanup timed out request: "
-                              DFID" for cookie "LPX64" action=%s\n",
+                              DFID" for cookie %#llx action=%s\n",
                               mdt_obd_name(mdt),
                               PFID(&pgs.hpk_fid), pgs.hpk_cookie,
                               hsm_copytool_action2name(
@@ -534,13 +523,9 @@ static int mdt_coordinator(void *data)
                         */
                        sz = hal->hal_count * sizeof(__u64);
                        OBD_ALLOC(cookies, sz);
-                       if (cookies == NULL) {
-                               CERROR("%s: Cannot allocate memory (%d o) "
-                                      "for cookies vector "LPX64"\n",
-                                      mdt_obd_name(mdt), sz,
-                                      hal->hal_compound_id);
+                       if (cookies == NULL)
                                continue;
-                       }
+
                        hai = hai_first(hal);
                        for (j = 0; j < hal->hal_count; j++) {
                                cookies[j] = hai->hai_cookie;
@@ -1019,7 +1004,7 @@ int mdt_hsm_add_hal(struct mdt_thread_info *mti,
                        if (rc) {
                                CERROR("%s: mdt_agent_record_update() failed, "
                                       "rc=%d, cannot update status to %s "
-                                      "for cookie "LPX64"\n",
+                                      "for cookie %#llx\n",
                                       mdt_obd_name(mdt), rc,
                                       agent_req_status2name(ARS_CANCELED),
                                       hai->hai_cookie);
@@ -1203,7 +1188,7 @@ static int hsm_cdt_request_completed(struct mdt_thread_info *mti,
                }
 
                if (pgs->hpk_errval > CLF_HSM_MAXERROR) {
-                       CERROR("%s: Request "LPX64" on "DFID
+                       CERROR("%s: Request %#llx on "DFID
                               " failed, error code %d too large\n",
                               mdt_obd_name(mdt),
                               pgs->hpk_cookie, PFID(&pgs->hpk_fid),
@@ -1227,14 +1212,14 @@ static int hsm_cdt_request_completed(struct mdt_thread_info *mti,
                        break;
                case HSMA_CANCEL:
                        hsm_set_cl_event(&cl_flags, HE_CANCEL);
-                       CERROR("%s: Failed request "LPX64" on "DFID
+                       CERROR("%s: Failed request %#llx on "DFID
                               " cannot be a CANCEL\n",
                               mdt_obd_name(mdt),
                               pgs->hpk_cookie,
                               PFID(&pgs->hpk_fid));
                        break;
                default:
-                       CERROR("%s: Failed request "LPX64" on "DFID
+                       CERROR("%s: Failed request %#llx on "DFID
                               " %d is an unknown action\n",
                               mdt_obd_name(mdt),
                               pgs->hpk_cookie, PFID(&pgs->hpk_fid),
@@ -1274,17 +1259,13 @@ static int hsm_cdt_request_completed(struct mdt_thread_info *mti,
                        break;
                case HSMA_CANCEL:
                        hsm_set_cl_event(&cl_flags, HE_CANCEL);
-                       CERROR("%s: Successful request "LPX64
-                              " on "DFID
-                              " cannot be a CANCEL\n",
+                       CERROR("%s: Successful request %#llx on "DFID" cannot be a CANCEL\n",
                               mdt_obd_name(mdt),
                               pgs->hpk_cookie,
                               PFID(&pgs->hpk_fid));
                        break;
                default:
-                       CERROR("%s: Successful request "LPX64
-                              " on "DFID
-                              " %d is an unknown action\n",
+                       CERROR("%s: Successful request %#llx on "DFID" %d is an unknown action\n",
                               mdt_obd_name(mdt),
                               pgs->hpk_cookie, PFID(&pgs->hpk_fid),
                               car->car_hai->hai_action);
@@ -1381,7 +1362,7 @@ int mdt_hsm_update_request_state(struct mdt_thread_info *mti,
        /* first do sanity checks */
        car = mdt_cdt_update_request(cdt, pgs);
        if (IS_ERR(car)) {
-               CERROR("%s: Cannot find running request for cookie "LPX64
+               CERROR("%s: Cannot find running request for cookie %#llx"
                       " on fid="DFID"\n",
                       mdt_obd_name(mdt),
                       pgs->hpk_cookie, PFID(&pgs->hpk_fid));
@@ -1389,7 +1370,7 @@ int mdt_hsm_update_request_state(struct mdt_thread_info *mti,
                RETURN(PTR_ERR(car));
        }
 
-       CDEBUG(D_HSM, "Progress received for fid="DFID" cookie="LPX64
+       CDEBUG(D_HSM, "Progress received for fid="DFID" cookie=%#llx"
                      " action=%s flags=%d err=%d fid="DFID" dfid="DFID"\n",
                      PFID(&pgs->hpk_fid), pgs->hpk_cookie,
                      hsm_copytool_action2name(car->car_hai->hai_action),
@@ -1408,7 +1389,7 @@ int mdt_hsm_update_request_state(struct mdt_thread_info *mti,
             car->car_hai->hai_action == HSMA_ARCHIVE) &&
            (!lu_fid_eq(&pgs->hpk_fid, &car->car_hai->hai_dfid) &&
             !lu_fid_eq(&pgs->hpk_fid, &car->car_hai->hai_fid))) {
-               CERROR("%s: Progress on "DFID" for cookie "LPX64
+               CERROR("%s: Progress on "DFID" for cookie %#llx"
                       " does not match request FID "DFID" nor data FID "
                       DFID"\n",
                       mdt_obd_name(mdt),
@@ -1419,7 +1400,7 @@ int mdt_hsm_update_request_state(struct mdt_thread_info *mti,
        }
 
        if (pgs->hpk_errval != 0 && !(pgs->hpk_flags & HP_FLAG_COMPLETED)) {
-               CERROR("%s: Progress on "DFID" for cookie "LPX64" action=%s"
+               CERROR("%s: Progress on "DFID" for cookie %#llx action=%s"
                       " is not coherent (err=%d and not completed"
                       " (flags=%d))\n",
                       mdt_obd_name(mdt),
@@ -1442,7 +1423,7 @@ int mdt_hsm_update_request_state(struct mdt_thread_info *mti,
                /* remove request from memory list */
                mdt_cdt_remove_request(cdt, pgs->hpk_cookie);
 
-               CDEBUG(D_HSM, "Updating record: fid="DFID" cookie="LPX64
+               CDEBUG(D_HSM, "Updating record: fid="DFID" cookie=%#llx"
                              " action=%s status=%s\n", PFID(&pgs->hpk_fid),
                       pgs->hpk_cookie,
                       hsm_copytool_action2name(car->car_hai->hai_action),
@@ -1457,7 +1438,7 @@ int mdt_hsm_update_request_state(struct mdt_thread_info *mti,
                        if (rc1)
                                CERROR("%s: mdt_agent_record_update() failed,"
                                       " rc=%d, cannot update status to %s"
-                                      " for cookie "LPX64"\n",
+                                      " for cookie %#llx\n",
                                       mdt_obd_name(mdt), rc1,
                                       agent_req_status2name(status),
                                       pgs->hpk_cookie);
@@ -1659,8 +1640,8 @@ bool mdt_hsm_is_action_compat(const struct hsm_action_item *hai,
                is_compat = true;
                break;
        }
-       CDEBUG(D_HSM, "fid="DFID" action=%s flags="LPX64
-                     " extent="LPX64"-"LPX64" hsm_flags=%.8X %s\n",
+       CDEBUG(D_HSM, "fid="DFID" action=%s flags=%#llx"
+                     " extent=%#llx-%#llx hsm_flags=%.8X %s\n",
                      PFID(&hai->hai_fid),
                      hsm_copytool_action2name(hai->hai_action), rq_flags,
                      hai->hai_extent.offset, hai->hai_extent.length,
@@ -1715,7 +1696,7 @@ static void hsm_policy_bit2str(struct seq_file *m, const __u64 mask,
        ENTRY;
 
        if (hexa)
-               seq_printf(m, "("LPX64") ", mask);
+               seq_printf(m, "(%#llx) ", mask);
 
        for (i = 0; i < CDT_POLICY_SHIFT_COUNT; i++) {
                bit = (1ULL << i);
@@ -1808,7 +1789,7 @@ mdt_hsm_policy_seq_write(struct file *file, const char __user *buffer,
 
        } while (start != NULL);
 
-       CDEBUG(D_HSM, "%s: new policy: rm="LPX64" add="LPX64" set="LPX64"\n",
+       CDEBUG(D_HSM, "%s: new policy: rm=%#llx add=%#llx set=%#llx\n",
               mdt_obd_name(mdt), remove_mask, add_mask, set_mask);
 
        /* if no sign in all string, it is a clear and set
@@ -1839,7 +1820,7 @@ static int mdt_hsm_##VAR##_seq_show(struct seq_file *m, void *data)       \
        struct coordinator      *cdt = &mdt->mdt_coordinator;           \
        ENTRY;                                                          \
                                                                        \
-       seq_printf(m, LPU64"\n", (__u64)cdt->VAR);                      \
+       seq_printf(m, "%llu\n", (__u64)cdt->VAR);                       \
        RETURN(0);                                                      \
 }                                                                      \
 static ssize_t                                                         \
index 422c5c3..12cc56e 100644 (file)
@@ -581,7 +581,7 @@ void mdt_pack_attr2body(struct mdt_thread_info *info, struct mdt_body *b,
        if (fid != NULL) {
                b->mbo_fid1 = *fid;
                b->mbo_valid |= OBD_MD_FLID;
-               CDEBUG(D_INODE, DFID": nlink=%d, mode=%o, valid="LPX64"\n",
+               CDEBUG(D_INODE, DFID": nlink=%d, mode=%o, valid=%#llx\n",
                       PFID(fid), b->mbo_nlink, b->mbo_mode, b->mbo_valid);
        }
 
@@ -931,7 +931,7 @@ int mdt_attr_get_complex(struct mdt_thread_info *info,
 #endif
 out:
        ma->ma_need = need;
-       CDEBUG(D_INODE, "after getattr rc = %d, ma_valid = "LPX64" ma_lmm=%p\n",
+       CDEBUG(D_INODE, "after getattr rc = %d, ma_valid = %#llx ma_lmm=%p\n",
               rc, ma->ma_valid, ma->ma_lmm);
        RETURN(rc);
 }
@@ -1775,7 +1775,7 @@ static int mdt_readpage(struct tgt_session_info *tsi)
          */
        rdpg->rp_hash = reqbody->mbo_size;
        if (rdpg->rp_hash != reqbody->mbo_size) {
-               CERROR("Invalid hash: "LPX64" != "LPX64"\n",
+               CERROR("Invalid hash: %#llx != %#llx\n",
                       rdpg->rp_hash, reqbody->mbo_size);
                RETURN(-EFAULT);
        }
@@ -2447,7 +2447,7 @@ int mdt_check_resent_lock(struct mdt_thread_info *info,
                        /* Lock is pinned by ldlm_handle_enqueue0() as it is
                         * a resend case, however, it could be already destroyed
                         * due to client eviction or a raced cancel RPC. */
-                       LDLM_DEBUG_NOLOCK("Invalid lock handle "LPX64,
+                       LDLM_DEBUG_NOLOCK("Invalid lock handle %#llx",
                                          lhc->mlh_reg_lh.cookie);
                        RETURN(-ESTALE);
                }
@@ -2743,14 +2743,14 @@ static void mdt_save_lock(struct mdt_thread_info *info, struct lustre_handle *h,
                        cos = (mdt_cos_is_enabled(mdt) ||
                               mdt_slc_is_enabled(mdt));
 
-                       LASSERTF(lock != NULL, "no lock for cookie "LPX64"\n",
+                       LASSERTF(lock != NULL, "no lock for cookie %#llx\n",
                                 h->cookie);
 
                        /* there is no request if mdt_object_unlock() is called
                         * from mdt_export_cleanup()->mdt_add_dirty_flag() */
                        if (likely(req != NULL)) {
                                CDEBUG(D_HA, "request = %p reply state = %p"
-                                      " transno = "LPD64"\n", req,
+                                      " transno = %lld\n", req,
                                       req->rq_reply_state, req->rq_transno);
                                if (cos) {
                                        ldlm_lock_downgrade(lock, LCK_COS);
@@ -3185,14 +3185,14 @@ mdt_intent_lock_replace(struct mdt_thread_info *info,
                /* Lock is pinned by ldlm_handle_enqueue0() as it is
                 * a resend case, however, it could be already destroyed
                 * due to client eviction or a raced cancel RPC. */
-               LDLM_DEBUG_NOLOCK("Invalid lock handle "LPX64"\n",
+               LDLM_DEBUG_NOLOCK("Invalid lock handle %#llx\n",
                                  lh->mlh_reg_lh.cookie);
                lh->mlh_reg_lh.cookie = 0;
                RETURN(-ESTALE);
        }
 
        LASSERTF(new_lock != NULL,
-                "lockh "LPX64" flags "LPX64" rc %d\n",
+                "lockh %#llx flags %#llx : rc = %d\n",
                 lh->mlh_reg_lh.cookie, flags, result);
 
         /*
@@ -3279,7 +3279,7 @@ static void mdt_intent_fixup_resent(struct mdt_thread_info *info,
                lh->mlh_reg_mode = new_lock->l_granted_mode;
 
                LDLM_DEBUG(new_lock, "Restoring lock cookie");
-               DEBUG_REQ(D_DLMTRACE, req, "restoring lock cookie "LPX64,
+               DEBUG_REQ(D_DLMTRACE, req, "restoring lock cookie %#llx",
                          lh->mlh_reg_lh.cookie);
                return;
        }
@@ -3298,7 +3298,7 @@ static void mdt_intent_fixup_resent(struct mdt_thread_info *info,
          */
         lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
 
-       DEBUG_REQ(D_DLMTRACE, req, "no existing lock with rhandle "LPX64,
+       DEBUG_REQ(D_DLMTRACE, req, "no existing lock with rhandle %#llx",
                  dlmreq->lock_handle[0].cookie);
 }
 
@@ -5093,7 +5093,7 @@ static int mdt_connect_internal(struct obd_export *exp,
        if (!(data->ocd_connect_flags & OBD_CONNECT_MDS_MDS) &&
            !(data->ocd_connect_flags & OBD_CONNECT_IBITS)) {
                CWARN("%s: client %s does not support ibits lock, either "
-                     "very old or an invalid client: flags "LPX64"\n",
+                     "very old or an invalid client: flags %#llx\n",
                      mdt_obd_name(mdt), exp->exp_client_uuid.uuid,
                      data->ocd_connect_flags);
                return -EBADE;
@@ -5109,7 +5109,7 @@ static int mdt_connect_internal(struct obd_export *exp,
                data->ocd_brw_size = min(data->ocd_brw_size,
                                         (__u32)MD_MAX_BRW_SIZE);
                if (data->ocd_brw_size == 0) {
-                       CERROR("%s: cli %s/%p ocd_connect_flags: "LPX64
+                       CERROR("%s: cli %s/%p ocd_connect_flags: %#llx"
                               " ocd_version: %x ocd_grant: %d "
                               "ocd_index: %u ocd_brw_size is "
                               "unexpectedly zero, network data "
@@ -5710,7 +5710,7 @@ static int mdt_fid2path(struct mdt_thread_info *info,
        int    rc;
        ENTRY;
 
-       CDEBUG(D_IOCTL, "path get "DFID" from "LPU64" #%d\n",
+       CDEBUG(D_IOCTL, "path get "DFID" from %llu #%d\n",
                PFID(&fp->gf_fid), fp->gf_recno, fp->gf_linkno);
 
        if (!fid_is_sane(&fp->gf_fid))
@@ -5718,7 +5718,7 @@ static int mdt_fid2path(struct mdt_thread_info *info,
 
        if (!fid_is_namespace_visible(&fp->gf_fid)) {
                CWARN("%s: "DFID" is invalid, sequence should be "
-                     ">= "LPX64"\n", mdt_obd_name(mdt),
+                     ">= %#llx\n", mdt_obd_name(mdt),
                      PFID(&fp->gf_fid), (__u64)FID_SEQ_NORMAL);
                RETURN(-EINVAL);
        }
@@ -5747,7 +5747,7 @@ static int mdt_fid2path(struct mdt_thread_info *info,
 
        rc = mdt_path(info, obj, fp, root_fid);
 
-       CDEBUG(D_INFO, "fid "DFID", path %s recno "LPX64" linkno %u\n",
+       CDEBUG(D_INFO, "fid "DFID", path %s recno %#llx linkno %u\n",
               PFID(&fp->gf_fid), fp->gf_u.gf_path,
               fp->gf_recno, fp->gf_linkno);
 
index acaa4a7..b21cf64 100644 (file)
@@ -121,16 +121,16 @@ int mdt_hsm_progress(struct tgt_session_info *tsi)
 
        hpk->hpk_errval = lustre_errno_ntoh(hpk->hpk_errval);
 
-       CDEBUG(D_HSM, "Progress on "DFID": len="LPU64" err=%d\n",
+       CDEBUG(D_HSM, "Progress on "DFID": len=%llu : rc = %d\n",
               PFID(&hpk->hpk_fid), hpk->hpk_extent.length, hpk->hpk_errval);
 
        if (hpk->hpk_errval)
-               CDEBUG(D_HSM, "Copytool progress on "DFID" failed (%d); %s.\n",
+               CDEBUG(D_HSM, "Copytool progress on "DFID" failed : rc = %d; %s.\n",
                       PFID(&hpk->hpk_fid), hpk->hpk_errval,
                       hpk->hpk_flags & HP_FLAG_RETRY ? "will retry" : "fatal");
 
        if (hpk->hpk_flags & HP_FLAG_COMPLETED)
-               CDEBUG(D_HSM, "Finished "DFID" (%d) cancel cookie="LPX64"\n",
+               CDEBUG(D_HSM, "Finished "DFID" : rc = %d; cancel cookie=%#llx\n",
                       PFID(&hpk->hpk_fid), hpk->hpk_errval, hpk->hpk_cookie);
 
        info = tsi2mdt_info(tsi);
@@ -281,8 +281,8 @@ int mdt_hsm_state_set(struct tgt_session_info *tsi)
 
        /* Detect out-of range masks */
        if ((hss->hss_setmask | hss->hss_clearmask) & ~HSM_FLAGS_MASK) {
-               CDEBUG(D_HSM, "Incompatible masks provided (set "LPX64
-                      ", clear "LPX64") vs supported set (%#x).\n",
+               CDEBUG(D_HSM, "Incompatible masks provided (set %#llx"
+                      ", clear %#llx) vs supported set (%#x).\n",
                       hss->hss_setmask, hss->hss_clearmask, HSM_FLAGS_MASK);
                GOTO(out_unlock, rc = -EINVAL);
        }
@@ -291,8 +291,8 @@ int mdt_hsm_state_set(struct tgt_session_info *tsi)
         * NOT defined in HSM_USER_MASK. */
        if (((hss->hss_setmask | hss->hss_clearmask) & ~HSM_USER_MASK) &&
            !md_capable(mdt_ucred(info), CFS_CAP_SYS_ADMIN)) {
-               CDEBUG(D_HSM, "Incompatible masks provided (set "LPX64
-                      ", clear "LPX64") vs unprivileged set (%#x).\n",
+               CDEBUG(D_HSM, "Incompatible masks provided (set %#llx"
+                      ", clear %#llx) vs unprivileged set (%#x).\n",
                       hss->hss_setmask, hss->hss_clearmask, HSM_USER_MASK);
                GOTO(out_unlock, rc = -EPERM);
        }
@@ -341,7 +341,7 @@ int mdt_hsm_state_set(struct tgt_session_info *tsi)
            (flags & HS_RELEASED && !(flags & HS_ARCHIVED)) ||
            (flags & HS_LOST     && !(flags & HS_ARCHIVED))) {
                CDEBUG(D_HSM, "Incompatible flag change on "DFID
-                             "flags="LPX64"\n",
+                             "flags=%#llx\n",
                       PFID(&info->mti_body->mbo_fid1), flags);
                GOTO(out_unlock, rc = -EINVAL);
        }
index 619103c..14b08f9 100644 (file)
@@ -53,10 +53,10 @@ void dump_llog_agent_req_rec(const char *prefix,
        sz = larr->arr_hai.hai_len - sizeof(larr->arr_hai);
        CDEBUG(D_HSM, "%slrh=[type=%X len=%d idx=%d] fid="DFID
               " dfid="DFID
-              " compound/cookie="LPX64"/"LPX64
-              " status=%s action=%s archive#=%d flags="LPX64
-              " create="LPU64" change="LPU64
-              " extent="LPX64"-"LPX64" gid="LPX64" datalen=%d"
+              " compound/cookie=%#llx/%#llx"
+              " status=%s action=%s archive#=%d flags=%#llx"
+              " create=%llu change=%llu"
+              " extent=%#llx-%#llx gid=%#llx datalen=%d"
               " data=[%s]\n",
               prefix,
               larr->arr_hdr.lrh_type,
@@ -230,7 +230,7 @@ static int mdt_agent_record_update_cb(const struct lu_env *env,
 
        rc = 0;
        for (i = 0 ; i < ducb->cookies_count ; i++) {
-               CDEBUG(D_HSM, "%s: search "LPX64", found "LPX64"\n",
+               CDEBUG(D_HSM, "%s: search %#llx, found %#llx\n",
                       mdt_obd_name(ducb->mdt), ducb->cookies[i],
                       larr->arr_hai.hai_cookie);
                if (larr->arr_hai.hai_cookie == ducb->cookies[i]) {
@@ -331,7 +331,7 @@ static void *mdt_hsm_actions_proc_start(struct seq_file *s, loff_t *pos)
                RETURN(ERR_PTR(-ENOENT));
        }
 
-       CDEBUG(D_HSM, "llog successfully initialized, start from "LPD64"\n",
+       CDEBUG(D_HSM, "llog successfully initialized, start from %lld\n",
               *pos);
        /* first call = rewind */
        if (*pos == 0) {
@@ -384,10 +384,10 @@ static int hsm_actions_show_cb(const struct lu_env *env,
        count = s->count;
        sz = larr->arr_hai.hai_len - sizeof(larr->arr_hai);
        seq_printf(s, "lrh=[type=%X len=%d idx=%d/%d] fid="DFID
-                  " dfid="DFID" compound/cookie="LPX64"/"LPX64
-                  " action=%s archive#=%d flags="LPX64
-                  " extent="LPX64"-"LPX64
-                  " gid="LPX64" datalen=%d status=%s data=[%s]\n",
+                  " dfid="DFID" compound/cookie=%#llx/%#llx"
+                  " action=%s archive#=%d flags=%#llx"
+                  " extent=%#llx-%#llx"
+                  " gid=%#llx datalen=%d status=%s data=[%s]\n",
                   hdr->lrh_type, hdr->lrh_len,
                   llh->lgh_hdr->llh_cat_idx, hdr->lrh_index,
                   PFID(&larr->arr_hai.hai_fid),
index dc8e9ad..24d2d08 100644 (file)
@@ -429,7 +429,7 @@ int mdt_hsm_agent_send(struct mdt_thread_info *mti,
                                CERROR("%s: mdt_agent_record_update() "
                                      "failed, cannot update "
                                      "status to %s for cookie "
-                                     LPX64": rc = %d\n",
+                                     "%#llx: rc = %d\n",
                                      mdt_obd_name(mdt),
                                      agent_req_status2name(ARS_SUCCEED),
                                      hai->hai_cookie, rc2);
@@ -483,7 +483,7 @@ int mdt_hsm_agent_send(struct mdt_thread_info *mti,
                                              "%s: mdt_agent_record_update() "
                                              "failed, cannot update "
                                              "status to %s for cookie "
-                                             LPX64": rc = %d\n",
+                                             "%#llx: rc = %d\n",
                                              mdt_obd_name(mdt),
                                              agent_req_status2name(ARS_FAILED),
                                              hai->hai_cookie, rc);
@@ -508,7 +508,7 @@ int mdt_hsm_agent_send(struct mdt_thread_info *mti,
                                        CERROR("%s: mdt_agent_record_update() "
                                              "failed, cannot update "
                                              "status to %s for cookie "
-                                             LPX64": rc = %d\n",
+                                             "%#llx: rc = %d\n",
                                              mdt_obd_name(mdt),
                                              agent_req_status2name(ARS_FAILED),
                                              hai->hai_cookie, rc);
index 63addc9..23ab4db 100644 (file)
@@ -200,8 +200,8 @@ static bool hsm_action_is_needed(struct hsm_action_item *hai, int hal_an,
                is_needed = true;
                break;
        }
-       CDEBUG(D_HSM, "fid="DFID" action=%s rq_flags="LPX64
-                     " extent="LPX64"-"LPX64" hsm_flags=%X %s\n",
+       CDEBUG(D_HSM, "fid="DFID" action=%s rq_flags=%#llx"
+                     " extent=%#llx-%#llx hsm_flags=%X %s\n",
                      PFID(&hai->hai_fid),
                      hsm_copytool_action2name(hai->hai_action), rq_flags,
                      hai->hai_extent.offset, hai->hai_extent.length,
index bbd7f44..2dcdcd9 100644 (file)
@@ -52,10 +52,10 @@ void dump_requests(char *prefix, struct coordinator *cdt)
        down_read(&cdt->cdt_request_lock);
        list_for_each_entry(car, &cdt->cdt_requests, car_request_list) {
                CDEBUG(D_HSM, "%s fid="DFID" dfid="DFID
-                      " compound/cookie="LPX64"/"LPX64
-                      " action=%s archive#=%d flags="LPX64
-                      " extent="LPX64"-"LPX64
-                      " gid="LPX64" refcount=%d canceled=%d\n",
+                      " compound/cookie=%#llx/%#llx"
+                      " action=%s archive#=%d flags=%#llx"
+                      " extent=%#llx-%#llx"
+                      " gid=%#llx refcount=%d canceled=%d\n",
                       prefix, PFID(&car->car_hai->hai_fid),
                       PFID(&car->car_hai->hai_dfid),
                       car->car_compound_id, car->car_hai->hai_cookie,
@@ -524,10 +524,10 @@ static int mdt_hsm_active_requests_proc_show(struct seq_file *s, void *v)
        mdt_cdt_get_work_done(car, &data_moved);
 
        seq_printf(s, "fid="DFID" dfid="DFID
-                  " compound/cookie="LPX64"/"LPX64
-                  " action=%s archive#=%d flags="LPX64
-                  " extent="LPX64"-"LPX64" gid="LPX64
-                  " data=[%s] canceled=%d uuid=%s done="LPU64"\n",
+                  " compound/cookie=%#llx/%#llx"
+                  " action=%s archive#=%d flags=%#llx"
+                  " extent=%#llx-%#llx gid=%#llx"
+                  " data=[%s] canceled=%d uuid=%s done=%llu\n",
                   PFID(&car->car_hai->hai_fid),
                   PFID(&car->car_hai->hai_dfid),
                   car->car_compound_id, car->car_hai->hai_cookie,
index 7d55a0e..154b48c 100644 (file)
@@ -121,8 +121,8 @@ static int mdt_identity_do_upcall(struct upcall_cache *cache,
                 GOTO(out, rc = -EREMCHG);
         }
 
-        argv[0] = cache->uc_upcall;
-        snprintf(keystr, sizeof(keystr), LPU64, entry->ue_key);
+       argv[0] = cache->uc_upcall;
+       snprintf(keystr, sizeof(keystr), "%llu", entry->ue_key);
 
        do_gettimeofday(&start);
        rc = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC);
index 12cf245..1e788af 100644 (file)
@@ -824,7 +824,7 @@ static __u64 mdt_attr_valid_xlate(__u64 in, struct mdt_reint_record *rr,
                MDS_ATTR_FORCE | MDS_ATTR_KILL_SUID | MDS_ATTR_KILL_SGID |
                MDS_ATTR_FROM_OPEN | MDS_OPEN_OWNEROVERRIDE);
        if (in != 0)
-               CERROR("Unknown attr bits: "LPX64"\n", in);
+               CERROR("Unknown attr bits: %#llx\n", in);
        return out;
 }
 
index 7872e9c..94a5c96 100644 (file)
@@ -224,7 +224,7 @@ static void mdt_empty_transno(struct mdt_thread_info *info, int rc)
                if (info->mti_transno != 0) {
                        struct obd_export *exp = req->rq_export;
 
-                       CERROR("%s: replay trans "LPU64" NID %s: rc = %d\n",
+                       CERROR("%s: replay trans %llu NID %s: rc = %d\n",
                               mdt_obd_name(mdt), info->mti_transno,
                               libcfs_nid2str(exp->exp_connection->c_peer.nid),
                               rc);
@@ -240,7 +240,7 @@ static void mdt_empty_transno(struct mdt_thread_info *info, int rc)
        }
        spin_unlock(&mdt->mdt_lut.lut_translock);
 
-       CDEBUG(D_INODE, "transno = "LPU64", last_committed = "LPU64"\n",
+       CDEBUG(D_INODE, "transno = %llu, last_committed = %llu\n",
               info->mti_transno,
               req->rq_export->exp_obd->obd_last_committed);
 
@@ -259,7 +259,7 @@ static void mdt_empty_transno(struct mdt_thread_info *info, int rc)
                 * otherwise the following resend(after replay) can not
                 * be checked correctly by xid */
                mutex_unlock(&ted->ted_lcd_lock);
-               CDEBUG(D_HA, "%s: transno = "LPU64" < last_transno = "LPU64"\n",
+               CDEBUG(D_HA, "%s: transno = %llu < last_transno = %llu\n",
                       mdt_obd_name(mdt), info->mti_transno,
                       lcd->lcd_last_transno);
                RETURN_EXIT;
@@ -295,7 +295,7 @@ void mdt_mfd_set_mode(struct mdt_file_data *mfd, __u64 mode)
 {
        LASSERT(mfd != NULL);
 
-       CDEBUG(D_HA, DFID " Change mfd mode "LPO64" -> "LPO64".\n",
+       CDEBUG(D_HA, DFID " Change mfd mode %#llo -> %#llo.\n",
               PFID(mdt_object_fid(mfd->mfd_object)), mfd->mfd_mode, mode);
 
        mfd->mfd_mode = mode;
@@ -363,8 +363,8 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p,
                        mdt_set_disposition(info, rep, DISP_OPEN_STRIPE);
         }
 
-        CDEBUG(D_INODE, "after open, ma_valid bit = "LPX64" lmm_size = %d\n",
-               ma->ma_valid, ma->ma_lmm_size);
+       CDEBUG(D_INODE, "after open, ma_valid bit = %#llx lmm_size = %d\n",
+              ma->ma_valid, ma->ma_lmm_size);
 
         if (ma->ma_valid & MA_LOV) {
                 LASSERT(ma->ma_lmm_size != 0);
@@ -443,7 +443,7 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p,
                old_mfd = mdt_handle2mfd(med, info->mti_rr.rr_handle, true);
                if (old_mfd != NULL) {
                        CDEBUG(D_HA, "delete orphan mfd = %p, fid = "DFID", "
-                              "cookie = "LPX64"\n", mfd,
+                              "cookie = %#llx\n", mfd,
                               PFID(mdt_object_fid(mfd->mfd_object)),
                               info->mti_rr.rr_handle->cookie);
                        class_handle_unhash(&old_mfd->mfd_handle);
@@ -459,12 +459,12 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p,
                } else {
                        spin_unlock(&med->med_open_lock);
                        CDEBUG(D_HA, "orphan mfd not found, fid = "DFID", "
-                              "cookie = "LPX64"\n",
+                              "cookie = %#llx\n",
                               PFID(mdt_object_fid(mfd->mfd_object)),
                               info->mti_rr.rr_handle->cookie);
                }
 
-               CDEBUG(D_HA, "Store old cookie "LPX64" in new mfd\n",
+               CDEBUG(D_HA, "Store old cookie %#llx in new mfd\n",
                       info->mti_rr.rr_handle->cookie);
 
                mfd->mfd_old_handle.cookie = info->mti_rr.rr_handle->cookie;
@@ -643,7 +643,7 @@ void mdt_reconstruct_open(struct mdt_thread_info *info,
        opdata = mdt_req_from_lrd(req, info->mti_reply_data);
        mdt_set_disposition(info, ldlm_rep, opdata);
 
-        CDEBUG(D_INODE, "This is reconstruct open: disp="LPX64", result=%d\n",
+       CDEBUG(D_INODE, "This is reconstruct open: disp=%#llx, result=%d\n",
                ldlm_rep->lock_policy_res1, req->rq_status);
 
         if (mdt_get_disposition(ldlm_rep, DISP_OPEN_CREATE) &&
@@ -811,9 +811,10 @@ static int mdt_object_open_lock(struct mdt_thread_info *info,
 
                /* Lease must be with open lock */
                if (!(open_flags & MDS_OPEN_LOCK)) {
-                       CERROR("Request lease for file:"DFID ", but open lock "
-                               "is missed, open_flags = "LPO64".\n",
-                               PFID(mdt_object_fid(obj)), open_flags);
+                       CERROR("%s: Request lease for file:"DFID ", but open lock "
+                              "is missed, open_flags = %#llo : rc = %d\n",
+                              mdt_obd_name(info->mti_mdt),
+                              PFID(mdt_object_fid(obj)), open_flags, -EPROTO);
                        GOTO(out, rc = -EPROTO);
                }
 
@@ -873,16 +874,17 @@ static int mdt_object_open_lock(struct mdt_thread_info *info,
                rc = mdt_object_lock(info, obj, lhc, *ibits);
        }
 
-       CDEBUG(D_INODE, "Requested bits lock:"DFID ", ibits = "LPX64
-               ", open_flags = "LPO64", try_layout = %d, rc = %d\n",
-               PFID(mdt_object_fid(obj)), *ibits, open_flags, try_layout, rc);
+       CDEBUG(D_INODE, "%s: Requested bits lock:"DFID ", ibits = %#llx"
+              ", open_flags = %#llo, try_layout = %d : rc = %d\n",
+              mdt_obd_name(info->mti_mdt), PFID(mdt_object_fid(obj)),
+              *ibits, open_flags, try_layout, rc);
 
        /* will change layout, revoke layout locks by enqueuing EX lock. */
        if (rc == 0 && create_layout) {
                struct mdt_lock_handle *ll = &info->mti_lh[MDT_LH_LAYOUT];
 
                CDEBUG(D_INODE, "Will create layout, get EX layout lock:"DFID
-                       ", open_flags = "LPO64"\n",
+                       ", open_flags = %#llo\n",
                        PFID(mdt_object_fid(obj)), open_flags);
 
                /* We cannot enqueue another lock for the same resource we
@@ -1261,7 +1263,7 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
                GOTO(out, result = -EROFS);
 
        CDEBUG(D_INODE, "I am going to open "DFID"/("DNAME"->"DFID") "
-              "cr_flag="LPO64" mode=0%06o msg_flag=0x%x\n",
+              "cr_flag=%#llo mode=0%06o msg_flag=0x%x\n",
               PFID(rr->rr_fid1), PNAME(&rr->rr_name),
               PFID(rr->rr_fid2), create_flags,
               ma->ma_attr.la_mode, msg_flags);
@@ -1718,8 +1720,8 @@ static int mdt_hsm_release(struct mdt_thread_info *info, struct mdt_object *o,
 
        /* Compare on-disk and packed data_version */
        if (data->cd_data_version != ma->ma_hsm.mh_arch_ver) {
-               CDEBUG(D_HSM, DFID" data_version mismatches: packed="LPU64
-                      " and on-disk="LPU64"\n", PFID(mdt_object_fid(o)),
+               CDEBUG(D_HSM, DFID" data_version mismatches: packed=%llu"
+                      " and on-disk=%llu\n", PFID(mdt_object_fid(o)),
                       data->cd_data_version, ma->ma_hsm.mh_arch_ver);
                GOTO(out_unlock, rc = -EPERM);
        }
@@ -2065,7 +2067,7 @@ int mdt_close_internal(struct mdt_thread_info *info, struct ptlrpc_request *req,
        if (mdt_mfd_closed(mfd)) {
                spin_unlock(&med->med_open_lock);
                CDEBUG(D_INODE, "no handle for file close: fid = "DFID
-                      ": cookie = "LPX64"\n", PFID(info->mti_rr.rr_fid1),
+                      ": cookie = %#llx\n", PFID(info->mti_rr.rr_fid1),
                       info->mti_close_handle.cookie);
                /** not serious error since bug 3633 */
                rc = -ESTALE;
index a2bbdc8..dcdccbc 100644 (file)
@@ -141,21 +141,21 @@ static void mdt_steal_ack_locks(struct ptlrpc_request *req)
                oldrep = list_entry(tmp, struct ptlrpc_reply_state,
                                    rs_exp_list);
 
-                if (oldrep->rs_xid != req->rq_xid)
-                        continue;
+               if (oldrep->rs_xid != req->rq_xid)
+                       continue;
 
-                if (oldrep->rs_opc != lustre_msg_get_opc(req->rq_reqmsg))
-                        CERROR ("Resent req xid "LPU64" has mismatched opc: "
-                                "new %d old %d\n", req->rq_xid,
-                                lustre_msg_get_opc(req->rq_reqmsg),
-                                oldrep->rs_opc);
+               if (oldrep->rs_opc != lustre_msg_get_opc(req->rq_reqmsg))
+                       CERROR("%s: Resent req xid %llu has mismatched opc: "
+                              "new %d old %d\n", exp->exp_obd->obd_name,
+                              req->rq_xid, lustre_msg_get_opc(req->rq_reqmsg),
+                              oldrep->rs_opc);
 
                svcpt = oldrep->rs_svcpt;
                spin_lock(&svcpt->scp_rep_lock);
 
                list_del_init(&oldrep->rs_exp_list);
 
-               CDEBUG(D_HA, "Stealing %d locks from rs %p x"LPD64".t"LPD64
+               CDEBUG(D_HA, "Stealing %d locks from rs %p x%lld.t%lld"
                       " o%d NID %s\n",
                       oldrep->rs_nlocks, oldrep,
                       oldrep->rs_xid, oldrep->rs_transno, oldrep->rs_opc,
@@ -185,7 +185,7 @@ __u64 mdt_req_from_lrd(struct ptlrpc_request *req,
        LASSERT(trd != NULL);
        lrd = &trd->trd_reply;
 
-       DEBUG_REQ(D_HA, req, "restoring transno "LPD64"/status %d",
+       DEBUG_REQ(D_HA, req, "restoring transno %lld/status %d",
                  lrd->lrd_transno, lrd->lrd_result);
 
        req->rq_transno = lrd->lrd_transno;
@@ -198,7 +198,7 @@ __u64 mdt_req_from_lrd(struct ptlrpc_request *req,
        lustre_msg_set_transno(req->rq_repmsg, req->rq_transno);
        lustre_msg_set_status(req->rq_repmsg, req->rq_status);
 
-       DEBUG_REQ(D_RPCTRACE, req, "restoring transno "LPD64"/status %d",
+       DEBUG_REQ(D_RPCTRACE, req, "restoring transno %lld/status %d",
                  req->rq_transno, req->rq_status);
 
        mdt_steal_ack_locks(req);
index 5274339..6ad1c43 100644 (file)
@@ -65,14 +65,15 @@ static inline void mdt_reint_init_ma(struct mdt_thread_info *info,
 static void mdt_obj_version_get(struct mdt_thread_info *info,
                                 struct mdt_object *o, __u64 *version)
 {
-        LASSERT(o);
+       LASSERT(o);
+
        if (mdt_object_exists(o) && !mdt_object_remote(o) &&
            !fid_is_obf(mdt_object_fid(o)))
-                *version = dt_version_get(info->mti_env, mdt_obj2dt(o));
-        else
-                *version = ENOENT_VERSION;
-        CDEBUG(D_INODE, "FID "DFID" version is "LPX64"\n",
-               PFID(mdt_object_fid(o)), *version);
+               *version = dt_version_get(info->mti_env, mdt_obj2dt(o));
+       else
+               *version = ENOENT_VERSION;
+       CDEBUG(D_INODE, "FID "DFID" version is %#llx\n",
+              PFID(mdt_object_fid(o)), *version);
 }
 
 /**
@@ -100,7 +101,7 @@ static int mdt_version_check(struct ptlrpc_request *req,
                spin_unlock(&req->rq_export->exp_lock);
                RETURN(-EOVERFLOW);
        } else if (pre_ver[idx] != version) {
-               CDEBUG(D_INODE, "Version mismatch "LPX64" != "LPX64"\n",
+               CDEBUG(D_INODE, "Version mismatch %#llx != %#llx\n",
                       pre_ver[idx], version);
                spin_lock(&req->rq_export->exp_lock);
                req->rq_export->exp_vbr_failed = 1;
index c25d471..33938f9 100644 (file)
@@ -90,10 +90,10 @@ static int mdt_getxattr_pack_reply(struct mdt_thread_info * info)
                req_capsule_set_size(pill, &RMF_EAVALS, RCL_SERVER, size);
                req_capsule_set_size(pill, &RMF_EAVALS_LENS, RCL_SERVER, size);
        } else {
-               CDEBUG(D_INFO, "Valid bits: "LPX64"\n",
+               CDEBUG(D_INFO, "Valid bits: %#llx\n",
                       info->mti_body->mbo_valid);
-                RETURN(-EINVAL);
-        }
+               RETURN(-EINVAL);
+       }
 
        if (size == -ENODATA) {
                size = 0;
@@ -358,7 +358,7 @@ int mdt_reint_setxattr(struct mdt_thread_info *info,
                /* This isn't strictly an error, but all current clients
                 * should set OBD_MD_FLCTIME when setting attributes. */
                CWARN("%s: client miss to set OBD_MD_FLCTIME when "
-                     "setxattr %s: [object "DFID"] [valid "LPU64"]\n",
+                     "setxattr %s: [object "DFID"] [valid %llu]\n",
                      mdt_obd_name(info->mti_mdt), xattr_name,
                      PFID(rr->rr_fid1), valid);
                attr->la_ctime = cfs_time_current_sec();
@@ -392,11 +392,11 @@ int mdt_reint_setxattr(struct mdt_thread_info *info,
                         ma->ma_attr_flags |= MDS_PERM_BYPASS;
                         mo_attr_set(env, child, ma);
                 }
-        } else {
-                CDEBUG(D_INFO, "valid bits: "LPX64"\n", valid);
-                rc = -EINVAL;
-        }
-        if (rc == 0)
+       } else {
+               CDEBUG(D_INFO, "valid bits: %#llx\n", valid);
+               rc = -EINVAL;
+       }
+       if (rc == 0)
                mdt_counter_incr(req, LPROC_MDT_SETXATTR);
 
         EXIT;
index 15269b6..2c9b9f3 100644 (file)
@@ -262,7 +262,8 @@ void mgs_revoke_lock(struct mgs_device *mgs, struct fs_db *fsdb, int type)
                                            NULL, fsdb, 0, LVB_T_NONE, NULL,
                                            &lockh);
                if (rc != ELDLM_OK) {
-                       CERROR("can't take cfg lock for "LPX64"/"LPX64"(%d)\n",
+                       CERROR("%s: can't take cfg lock for %#llx/%#llx : rc = %d\n",
+                              mgs->mgs_obd->obd_name,
                               le64_to_cpu(res_id.name[0]),
                               le64_to_cpu(res_id.name[1]), rc);
 
index 58fcb2d..b1d782d 100644 (file)
@@ -89,7 +89,7 @@ osp_active_seq_write(struct file *file, const char __user *buffer,
        if (dev->u.cli.cl_import->imp_deactive == val)
                rc = ptlrpc_set_import_active(dev->u.cli.cl_import, val);
        else
-               CDEBUG(D_CONFIG, "activate "LPD64": ignoring repeat request\n",
+               CDEBUG(D_CONFIG, "activate %lld: ignoring repeat request\n",
                       val);
 
        LPROCFS_CLIMP_EXIT(dev);
@@ -490,7 +490,7 @@ static int osp_prealloc_next_seq_seq_show(struct seq_file *m, void *data)
        if (osp == NULL || osp->opd_pre == NULL)
                return 0;
 
-       seq_printf(m, LPX64"\n", fid_seq(&osp->opd_pre_used_fid));
+       seq_printf(m, "%#llx\n", fid_seq(&osp->opd_pre_used_fid));
        return 0;
 }
 LPROC_SEQ_FOPS_RO(osp_prealloc_next_seq);
@@ -511,7 +511,7 @@ static int osp_prealloc_last_seq_seq_show(struct seq_file *m, void *data)
        if (osp == NULL || osp->opd_pre == NULL)
                return 0;
 
-       seq_printf(m, LPX64"\n",
+       seq_printf(m, "%#llx\n",
                   fid_seq(&osp->opd_pre_last_created_fid));
        return 0;
 }
@@ -533,7 +533,7 @@ static int osp_prealloc_reserved_seq_show(struct seq_file *m, void *data)
        if (osp == NULL || osp->opd_pre == NULL)
                return 0;
 
-       seq_printf(m, LPU64"\n", osp->opd_pre_reserved);
+       seq_printf(m, "%llu\n", osp->opd_pre_reserved);
        return 0;
 }
 LPROC_SEQ_FOPS_RO(osp_prealloc_reserved);
index f20d8c6..0e46380 100644 (file)
@@ -756,8 +756,8 @@ static int osp_statfs(const struct lu_env *env, struct dt_device *dev,
 
        LASSERT(sfs->os_fprecreated <= OST_MAX_PRECREATE * 2);
 
-       CDEBUG(D_OTHER, "%s: "LPU64" blocks, "LPU64" free, "LPU64" avail, "
-              LPU64" files, "LPU64" free files\n", d->opd_obd->obd_name,
+       CDEBUG(D_OTHER, "%s: %llu blocks, %llu free, %llu avail, "
+              "%llu files, %llu free files\n", d->opd_obd->obd_name,
               sfs->os_blocks, sfs->os_bfree, sfs->os_bavail,
               sfs->os_files, sfs->os_ffree);
        RETURN(0);
@@ -813,7 +813,7 @@ static int osp_sync(const struct lu_env *env, struct dt_device *dev)
        if (rc != 0)
                GOTO(out, rc);
 
-       CDEBUG(D_CACHE, "%s: id: used %lu, processed "LPU64"\n",
+       CDEBUG(D_CACHE, "%s: id: used %lu, processed %llu\n",
               d->opd_obd->obd_name, id, d->opd_syn_last_processed_id);
 
        /* wait till all-in-line are processed */
index 8b88358..984de0f 100644 (file)
@@ -1077,7 +1077,7 @@ static ssize_t osp_md_write(const struct lu_env *env, struct dt_object *dt,
        update = thandle_to_osp_update_request(th);
        LASSERT(update != NULL);
 
-       CDEBUG(D_INFO, "write "DFID" offset = "LPU64" length = %zu\n",
+       CDEBUG(D_INFO, "write "DFID" offset = %llu length = %zu\n",
               PFID(lu_object_fid(&dt->do_lu)), *pos, buf->lb_len);
 
        rc = osp_update_rpc_pack(env, write, update, OUT_WRITE,
index ff9711d..022254b 100644 (file)
@@ -453,7 +453,7 @@ static int osp_precreate_rollover_new_seq(struct lu_env *env,
                RETURN(rc);
        }
 
-       LCONSOLE_INFO("%s: update sequence from "LPX64" to "LPX64"\n",
+       LCONSOLE_INFO("%s: update sequence from %#llx to %#llx\n",
                      osp->opd_obd->obd_name, fid_seq(last_fid),
                      fid_seq(fid));
        /* Update last_xxx to the new seq */
@@ -966,8 +966,8 @@ void osp_pre_update_status(struct osp_device *d, int rc)
                if ((msfs->os_ffree < 32) || (msfs->os_bavail < used)) {
                        d->opd_pre_status = -ENOSPC;
                        if (old != -ENOSPC)
-                               CDEBUG(D_INFO, "%s: status: "LPU64" blocks, "
-                                      LPU64" free, "LPU64" used, "LPU64" "
+                               CDEBUG(D_INFO, "%s: status: %llu blocks, "
+                                      "%llu free, %llu used, %llu "
                                       "avail -> %d: rc = %d\n",
                                       d->opd_obd->obd_name, msfs->os_blocks,
                                       msfs->os_bfree, used, msfs->os_bavail,
@@ -983,8 +983,8 @@ void osp_pre_update_status(struct osp_device *d, int rc)
                        d->opd_pre_create_count = OST_MIN_PRECREATE;
                        spin_unlock(&d->opd_pre_lock);
                        wake_up(&d->opd_pre_waitq);
-                       CDEBUG(D_INFO, "%s: no space: "LPU64" blocks, "LPU64
-                              " free, "LPU64" used, "LPU64" avail -> %d: "
+                       CDEBUG(D_INFO, "%s: no space: %llu blocks, %llu"
+                              " free, %llu used, %llu avail -> %d: "
                               "rc = %d\n", d->opd_obd->obd_name,
                               msfs->os_blocks, msfs->os_bfree, used,
                               msfs->os_bavail, d->opd_pre_status, rc);
@@ -1188,7 +1188,7 @@ static int osp_precreate_thread(void *_arg)
 
                        if (unlikely(osp_precreate_end_seq(&env, d) &&
                                     osp_create_end_seq(&env, d))) {
-                               LCONSOLE_INFO("%s:"LPX64" is used up."
+                               LCONSOLE_INFO("%s:%#llx is used up."
                                              " Update to new seq\n",
                                              d->opd_obd->obd_name,
                                         fid_seq(&d->opd_pre_last_created_fid));
@@ -1270,7 +1270,7 @@ static int osp_precreate_timeout_condition(void *data)
        struct osp_device *d = data;
 
        CDEBUG(D_HA, "%s: slow creates, last="DFID", next="DFID", "
-             "reserved="LPU64", syn_changes=%u, "
+             "reserved=%llu, syn_changes=%u, "
              "syn_rpc_in_progress=%d, status=%d\n",
              d->opd_obd->obd_name, PFID(&d->opd_pre_last_created_fid),
              PFID(&d->opd_pre_used_fid), d->opd_pre_reserved,
index c44ab5b..98f18ec 100644 (file)
@@ -491,7 +491,7 @@ static void osp_sync_request_commit_cb(struct ptlrpc_request *req)
        struct osp_device *d = req->rq_cb_data;
        struct osp_job_req_args *jra;
 
-       CDEBUG(D_HA, "commit req %p, transno "LPU64"\n", req, req->rq_transno);
+       CDEBUG(D_HA, "commit req %p, transno %llu\n", req, req->rq_transno);
 
        if (unlikely(req->rq_transno == 0))
                return;
@@ -570,7 +570,7 @@ static int osp_sync_interpret(const struct lu_env *env,
                 */
                LASSERTF(req->rq_transno == 0 ||
                         req->rq_import_generation < imp->imp_generation,
-                        "transno "LPU64", rc %d, gen: req %d, imp %d\n",
+                        "transno %llu, rc %d, gen: req %d, imp %d\n",
                         req->rq_transno, rc, req->rq_import_generation,
                         imp->imp_generation);
                if (req->rq_transno == 0) {
@@ -731,7 +731,7 @@ static int osp_sync_new_setattr_job(struct osp_device *d,
        /* lsr_valid can only be 0 or have OBD_MD_{FLUID,FLGID} set,
         * so no bits other than these should be set. */
        if ((rec->lsr_valid & ~(OBD_MD_FLUID | OBD_MD_FLGID)) != 0) {
-               CERROR("%s: invalid setattr record, lsr_valid:"LPU64"\n",
+               CERROR("%s: invalid setattr record, lsr_valid:%llu\n",
                       d->opd_obd->obd_name, rec->lsr_valid);
                /* return 1 on invalid record */
                RETURN(1);
@@ -1049,7 +1049,7 @@ static void osp_sync_process_committed(const struct lu_env *env,
                                CERROR("%s: can't cancel record: %d\n",
                                       obd->obd_name, rc);
                } else {
-                       DEBUG_REQ(D_OTHER, req, "imp_committed = "LPU64,
+                       DEBUG_REQ(D_OTHER, req, "imp_committed = %llu",
                                  imp->imp_peer_committed_transno);
                }
                ptlrpc_req_finished(req);
@@ -1513,7 +1513,7 @@ static void osp_sync_tracker_commit_cb(struct thandle *th, void *cookie)
 
        spin_lock(&tr->otr_lock);
        if (likely(txn->oti_current_id > tr->otr_committed_id)) {
-               CDEBUG(D_OTHER, "committed: "LPU64" -> "LPU64"\n",
+               CDEBUG(D_OTHER, "committed: %llu -> %llu\n",
                       tr->otr_committed_id, txn->oti_current_id);
                tr->otr_committed_id = txn->oti_current_id;
 
@@ -1654,7 +1654,7 @@ static __u64 osp_sync_id_get(struct osp_device *d, __u64 id)
 
        if (unlikely(tr->otr_next_id <= d->opd_syn_last_used_id)) {
                spin_unlock(&tr->otr_lock);
-               CERROR("%s: next "LPU64", last synced "LPU64"\n",
+               CERROR("%s: next %llu, last synced %llu\n",
                       d->opd_obd->obd_name, tr->otr_next_id,
                       d->opd_syn_last_used_id);
                LBUG();
@@ -1667,7 +1667,7 @@ static __u64 osp_sync_id_get(struct osp_device *d, __u64 id)
        if (list_empty(&d->opd_syn_ontrack))
                list_add(&d->opd_syn_ontrack, &tr->otr_wakeup_list);
        spin_unlock(&tr->otr_lock);
-       CDEBUG(D_OTHER, "new id "LPU64"\n", id);
+       CDEBUG(D_OTHER, "new id %llu\n", id);
 
        return id;
 }
index c9c15c0..4b5d59f 100644 (file)
@@ -264,7 +264,7 @@ object_update_request_dump(const struct object_update_request *ourq,
                update = object_update_request_get(ourq, i, &size);
                LASSERT(update != NULL);
                CDEBUG(mask, "i = %u fid = "DFID" op = %s "
-                      "params = %d batchid = "LPU64" size = %zu repsize %u\n",
+                      "params = %d batchid = %llu size = %zu repsize %u\n",
                       i, PFID(&update->ou_fid),
                       update_op_str(update->ou_type),
                       update->ou_params_count,
@@ -1045,7 +1045,7 @@ static void osp_request_commit_cb(struct ptlrpc_request *req)
                last_committed_transno =
                        req->rq_import->imp_peer_committed_transno;
 
-       CDEBUG(D_HA, "trans no "LPU64" committed transno "LPU64"\n",
+       CDEBUG(D_HA, "trans no %llu committed transno %llu\n",
               req->rq_transno, last_committed_transno);
 
        /* If the transaction is not really committed, mark result = 1 */
@@ -1295,7 +1295,7 @@ int osp_check_and_set_rpc_version(struct osp_thandle *oth,
        spin_unlock(&ou->ou_lock);
 
        LASSERT(oth->ot_super.th_wait_submit == 1);
-       CDEBUG(D_INFO, "%s: version "LPU64" oth:version %p:"LPU64"\n",
+       CDEBUG(D_INFO, "%s: version %llu oth:version %p:%llu\n",
               osp->opd_obd->obd_name, ou->ou_version, oth,
               oth->ot_our->our_version);
 
@@ -1325,7 +1325,7 @@ osp_get_next_request(struct osp_updates *ou, struct osp_update_request **ourp)
        spin_lock(&ou->ou_lock);
        list_for_each_entry_safe(our, tmp, &ou->ou_list, our_list) {
                LASSERT(our->our_th != NULL);
-               CDEBUG(D_HA, "ou %p version "LPU64" rpc_version "LPU64"\n",
+               CDEBUG(D_HA, "ou %p version %llu rpc_version %llu\n",
                       ou, our->our_version, ou->ou_rpc_version);
                spin_lock(&our->our_list_lock);
                /* Find next osp_update_request in the list */
@@ -1577,7 +1577,7 @@ int osp_trans_stop(const struct lu_env *env, struct dt_device *dt,
                GOTO(out, rc = -EIO);
        }
 
-       CDEBUG(D_HA, "%s: add oth %p with version "LPU64"\n",
+       CDEBUG(D_HA, "%s: add oth %p with version %llu\n",
               osp->opd_obd->obd_name, oth, our->our_version);
 
        LASSERT(our->our_req_ready == 0);