Whamcloud - gitweb
LU-4423 ptlrpc: use 64-bit times in ptlrpc_enc_page_pool
[fs/lustre-release.git] / lustre / mdt / mdt_hsm_cdt_client.c
index 8362627..23ab4db 100644 (file)
@@ -23,6 +23,7 @@
  * (C) Copyright 2012 Commissariat a l'energie atomique et aux energies
  *     alternatives
  *
+ * Copyright (c) 2013, 2014, Intel Corporation.
  */
 /*
  * lustre/mdt/mdt_hsm_cdt_client.c
@@ -199,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,
@@ -289,13 +290,12 @@ hsm_action_permission(struct mdt_thread_info *mti,
  * register a list of requests
  * \param mti [IN]
  * \param hal [IN] list of requests
- * \param compound_id [OUT] id of the compound request
  * \retval 0 success
  * \retval -ve failure
  * in case of restore, caller must hold layout lock
  */
 int mdt_hsm_add_actions(struct mdt_thread_info *mti,
-                       struct hsm_action_list *hal, __u64 *compound_id)
+                       struct hsm_action_list *hal)
 {
        struct mdt_device       *mdt = mti->mti_mdt;
        struct coordinator      *cdt = &mdt->mdt_coordinator;
@@ -304,6 +304,7 @@ int mdt_hsm_add_actions(struct mdt_thread_info *mti,
        int                      rc = 0, i;
        struct md_hsm            mh;
        bool                     is_restore = false;
+       __u64                    compound_id;
        ENTRY;
 
        /* no coordinator started, so we cannot serve requests */
@@ -313,7 +314,7 @@ int mdt_hsm_add_actions(struct mdt_thread_info *mti,
        if (!hal_is_sane(hal))
                RETURN(-EINVAL);
 
-       *compound_id = atomic_inc_return(&cdt->cdt_compound_id);
+       compound_id = atomic_inc_return(&cdt->cdt_compound_id);
 
        /* search for compatible request, if found hai_cookie is set
         * to the request cookie
@@ -451,7 +452,7 @@ int mdt_hsm_add_actions(struct mdt_thread_info *mti,
                }
 record:
                /* record request */
-               rc = mdt_agent_record_add(mti->mti_env, mdt, *compound_id,
+               rc = mdt_agent_record_add(mti->mti_env, mdt, compound_id,
                                          archive_id, flags, hai);
                if (rc)
                        GOTO(out, rc);
@@ -599,4 +600,3 @@ int mdt_hsm_get_actions(struct mdt_thread_info *mti,
 
        RETURN(0);
 }
-