Whamcloud - gitweb
LU-4669 type: change "%llx" to "LPX64” 11/9811/4
authorJian Yu <jian.yu@intel.com>
Wed, 16 Apr 2014 08:04:57 +0000 (16:04 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 24 Apr 2014 15:47:28 +0000 (15:47 +0000)
This patch fixes the following compile errors by using "LPX64”:
error: format '%llx' expects type 'long long unsigned int',
       but argument 5 has type '__u64'
error: format '%#llx' expects type 'long long unsigned int',
       but argument 3 has type '__u64'

Signed-off-by: Jian Yu <jian.yu@intel.com>
Change-Id: Ica703160923e5f2b987217d97e623fe16eb667ad
Reviewed-on: http://review.whamcloud.com/9811
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/include/darwin/lustre_lite.h
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_request.c
lustre/liblustre/super.c
lustre/osc/osc_lock.c
lustre/utils/lhsmtool_posix.c

index 243e23b..e88c8c2 100644 (file)
@@ -79,8 +79,8 @@ struct lookup_intent {
        int     it_magic;
        void    (*it_op_release)(struct lookup_intent *);
        int     it_op;
-       int     it_flags;
        int     it_create_mode;
+       __u64   it_flags;
        union {
                 struct lustre_intent_data lustre;
                void *fs_data;
index 26a1bf4..09655be 100644 (file)
@@ -139,7 +139,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, ldlm_mode_t mode, __u64 flags)
 {
        ENTRY;
 
-       LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: 0x%llx)",
+       LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: "LPX64")",
                   mode, flags);
 
        /* Safe to not lock here, since it should be empty anyway */
@@ -309,7 +309,7 @@ ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags, int first_enq,
         const struct ldlm_callback_suite null_cbs = { NULL };
         ENTRY;
 
-       CDEBUG(D_DLMTRACE, "flags %#llx owner "LPU64" pid %u mode %u start "
+       CDEBUG(D_DLMTRACE, "flags "LPX64" owner "LPU64" pid %u mode %u start "
               LPU64" end "LPU64"\n", *flags,
               new->l_policy_data.l_flock.owner,
                new->l_policy_data.l_flock.pid, mode,
@@ -673,13 +673,13 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
         int                             rc = 0;
         ENTRY;
 
-       CDEBUG(D_DLMTRACE, "flags: 0x%llx data: %p getlk: %p\n",
-               flags, data, getlk);
+       CDEBUG(D_DLMTRACE, "flags: "LPX64" data: %p getlk: %p\n",
+              flags, data, getlk);
 
-        /* Import invalidation. We need to actually release the lock
-         * references being held, so that it can go away. No point in
-         * holding the lock even if app still believes it has it, since
-         * server already dropped it anyway. Only for granted locks too. */
+       /* Import invalidation. We need to actually release the lock
+        * references being held, so that it can go away. No point in
+        * holding the lock even if app still believes it has it, since
+        * server already dropped it anyway. Only for granted locks too. */
        if ((lock->l_flags & (LDLM_FL_FAILED|LDLM_FL_LOCAL_ONLY)) ==
            (LDLM_FL_FAILED|LDLM_FL_LOCAL_ONLY)) {
                if (lock->l_req_mode == lock->l_granted_mode &&
index 972083b..d01c9d6 100644 (file)
@@ -611,20 +611,20 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                                              LDLM_FL_NO_TIMEOUT);
         unlock_res_and_lock(lock);
 
-       CDEBUG(D_INFO, "local: %p, remote cookie: "LPX64", flags: 0x%llx\n",
-               lock, reply->lock_handle.cookie, *flags);
-
-        /* If enqueue returned a blocked lock but the completion handler has
-         * already run, then it fixed up the resource and we don't need to do it
-         * again. */
-        if ((*flags) & LDLM_FL_LOCK_CHANGED) {
-                int newmode = reply->lock_desc.l_req_mode;
-                LASSERT(!is_replay);
-                if (newmode && newmode != lock->l_req_mode) {
-                        LDLM_DEBUG(lock, "server returned different mode %s",
-                                   ldlm_lockname[newmode]);
-                        lock->l_req_mode = newmode;
-                }
+       CDEBUG(D_INFO, "local: %p, remote cookie: "LPX64", flags: "LPX64"\n",
+              lock, reply->lock_handle.cookie, *flags);
+
+       /* If enqueue returned a blocked lock but the completion handler has
+        * already run, then it fixed up the resource and we don't need to do it
+        * again. */
+       if ((*flags) & LDLM_FL_LOCK_CHANGED) {
+               int newmode = reply->lock_desc.l_req_mode;
+               LASSERT(!is_replay);
+               if (newmode && newmode != lock->l_req_mode) {
+                       LDLM_DEBUG(lock, "server returned different mode %s",
+                                  ldlm_lockname[newmode]);
+                       lock->l_req_mode = newmode;
+               }
 
                if (!ldlm_res_eq(&reply->lock_desc.l_resource.lr_name,
                                 &lock->l_resource->lr_name)) {
@@ -922,9 +922,9 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
 
                        lock->l_req_extent = policy->l_extent;
                }
-                LDLM_DEBUG(lock, "client-side enqueue START, flags %llx\n",
+               LDLM_DEBUG(lock, "client-side enqueue START, flags "LPX64"\n",
                           *flags);
-        }
+       }
 
        lock->l_conn_export = exp;
        lock->l_export = NULL;
index 43aeeee..35fbb57 100644 (file)
@@ -1298,11 +1298,11 @@ static int llu_file_flock(struct inode *ino,
                 LBUG();
         }
 
-       CDEBUG(D_DLMTRACE, "inode=%llu, pid=%u, cmd=%d, flags=%#llx, mode=%u, "
-               "start="LPX64", end="LPX64"\n", (unsigned long long)st->st_ino,
-               flock.l_flock.pid, cmd, flags, einfo.ei_mode, flock.l_flock.start,
-               flock.l_flock.end);
-
+       CDEBUG(D_DLMTRACE, "inode=%llu, pid=%u, cmd=%d, flags="LPX64", "
+              "mode=%u, start="LPX64", end="LPX64"\n",
+              (unsigned long long)st->st_ino,
+              flock.l_flock.pid, cmd, flags, einfo.ei_mode,
+              flock.l_flock.start, flock.l_flock.end);
         {
                 struct lmv_obd *lmv;
                 struct obd_device *lmv_obd;
index 3422d54..816cc78 100644 (file)
@@ -1562,18 +1562,18 @@ static void osc_lock_state(const struct lu_env *env,
 }
 
 static int osc_lock_print(const struct lu_env *env, void *cookie,
-                          lu_printer_t p, const struct cl_lock_slice *slice)
+                         lu_printer_t p, const struct cl_lock_slice *slice)
 {
-        struct osc_lock *lock = cl2osc_lock(slice);
+       struct osc_lock *lock = cl2osc_lock(slice);
 
-        /*
-         * XXX print ldlm lock and einfo properly.
-         */
-       (*p)(env, cookie, "%p %#16llx "LPX64" %d %p ",
-             lock->ols_lock, lock->ols_flags, lock->ols_handle.cookie,
-             lock->ols_state, lock->ols_owner);
-        osc_lvb_print(env, cookie, p, &lock->ols_lvb);
-        return 0;
+       /*
+        * XXX print ldlm lock and einfo properly.
+        */
+       (*p)(env, cookie, "%p "LPX64" "LPX64" %d %p ",
+            lock->ols_lock, lock->ols_flags, lock->ols_handle.cookie,
+            lock->ols_state, lock->ols_owner);
+       osc_lvb_print(env, cookie, p, &lock->ols_lvb);
+       return 0;
 }
 
 static int osc_lock_fits_into(const struct lu_env *env,
@@ -1749,7 +1749,7 @@ int osc_lock_init(const struct lu_env *env,
                if (clk->ols_locklessable && !(enqflags & CEF_DISCARD_DATA))
                        clk->ols_flags |= LDLM_FL_DENY_ON_CONTENTION;
 
-               LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx\n",
+               LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags "LPX64"\n",
                                lock, clk, clk->ols_flags);
 
                result = 0;
index d90b725..36fe50f 100644 (file)
@@ -1677,7 +1677,7 @@ static int ct_max_sequence(void)
                sprintf(path + strlen(path), "/%04x", subseq);
        }
 
-       printf("max_sequence: %016Lx\n", seq);
+       printf("max_sequence: "LPX64"\n", seq);
 
        return 0;
 }