Whamcloud - gitweb
LU-16314 obdclass: Migrate LASSERTF %p to %px 05/49405/10
authorShaun Tancheff <shaun.tancheff@hpe.com>
Thu, 25 May 2023 12:01:32 +0000 (07:01 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 15 Feb 2024 07:04:57 +0000 (07:04 +0000)
This change covers lustre/obdclass through lustre/target and
converts LASSERTF statements to explicitly use %px.

Use %px to explicitly report the non-hashed pointer value
messages printed when a kernel panic is imminent. When
analyzing a crash dump the associated kernel address can
be used to determine the system state that lead to the
system crash.

As crash dumps can and are provided by customers from
production systems the use of the kernel command line
parameter:
    no_hash_pointers
is not always possible.

Ref: Documentation/core-api/printk-formats.rst

Test-Parameters: trivial
HPE-bug-id: LUS-10945
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: Ia256dc1f74f976640ec82746a5d761ef662f45ae
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49405
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
15 files changed:
lustre/obdclass/genops.c
lustre/obdclass/obd_config.c
lustre/osc/osc_io.c
lustre/osc/osc_lock.c
lustre/osc/osc_request.c
lustre/osd-ldiskfs/osd_io.c
lustre/osp/osp_object.c
lustre/ptlrpc/client.c
lustre/ptlrpc/llog_net.c
lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/recover.c
lustre/ptlrpc/sec_ctx.c
lustre/ptlrpc/sec_null.c
lustre/quota/qmt_pool.c
lustre/target/update_trans.c

index 611a8ec..5e20d30 100644 (file)
@@ -78,10 +78,10 @@ static void obd_device_free(struct obd_device *obd)
 {
        LASSERT(obd != NULL);
        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC,
-                "obd %p obd_magic %08x != %08x\n",
+                "obd %px obd_magic %08x != %08x\n",
                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
        if (obd->obd_namespace != NULL) {
-               CERROR("obd %p: namespace %p was not properly cleaned up (obd_force=%d)!\n",
+               CERROR("obd %px: namespace %px was not properly cleaned up (obd_force=%d)!\n",
                       obd, obd->obd_namespace, obd->obd_force);
                LBUG();
        }
@@ -430,10 +430,11 @@ void class_free_dev(struct obd_device *obd)
 {
        struct obd_type *obd_type = obd->obd_type;
 
-       LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "%p obd_magic %08x "
-                "!= %08x\n", obd, obd->obd_magic, OBD_DEVICE_MAGIC);
+       LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC,
+                "%px obd_magic %08x != %08x\n",
+                obd, obd->obd_magic, OBD_DEVICE_MAGIC);
        LASSERTF(obd->obd_minor == -1 || class_num2obd(obd->obd_minor) == obd,
-                "obd %p != obd_devs[%d] %p\n",
+                "obd %px != obd_devs[%d] %px\n",
                 obd, obd->obd_minor, class_num2obd(obd->obd_minor));
        LASSERTF(kref_read(&obd->obd_refcount) == 0,
                 "obd_refcount should be 0, not %d\n",
index d6dbf85..89a5804 100644 (file)
@@ -628,10 +628,10 @@ int class_attach(struct lustre_cfg *lcfg)
                RETURN(rc);
        }
        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC,
-                "obd %p obd_magic %08X != %08X\n",
+                "obd %px obd_magic %08X != %08X\n",
                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
        LASSERTF(strncmp(obd->obd_name, name, strlen(name)) == 0,
-                "%p obd_name %s != %s\n", obd, obd->obd_name, name);
+                "%px obd_name %s != %s\n", obd, obd->obd_name, name);
 
        exp = class_new_export_self(obd, &obd->obd_uuid);
        if (IS_ERR(exp)) {
@@ -670,10 +670,10 @@ int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
        LASSERT(obd != NULL);
        LASSERTF(obd == class_num2obd(obd->obd_minor),
-                "obd %p != obd_devs[%d] %p\n",
+                "obd %px != obd_devs[%d] %px\n",
                 obd, obd->obd_minor, class_num2obd(obd->obd_minor));
        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC,
-                "obd %p obd_magic %08x != %08x\n",
+                "obd %px obd_magic %08x != %08x\n",
                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
 
        /* have we attached a type to this device? */
index 34f9764..816d743 100644 (file)
@@ -337,7 +337,7 @@ int osc_io_commit_async(const struct lu_env *env,
                oap = &opg->ops_oap;
 
                LASSERTF(osc == oap->oap_obj,
-                        "obj mismatch: %p / %p\n", osc, oap->oap_obj);
+                        "obj mismatch: %px / %px\n", osc, oap->oap_obj);
 
                if (!list_empty(&oap->oap_rpc_item)) {
                        CDEBUG(D_CACHE, "Busy oap %p page %p for submit.\n",
index d67c0b1..3502f70 100644 (file)
@@ -958,7 +958,7 @@ static int osc_lock_enqueue(const struct lu_env *env,
         ENTRY;
 
        LASSERTF(ergo(oscl->ols_glimpse, lock->cll_descr.cld_mode <= CLM_READ),
-               "lock = %p, ols = %p\n", lock, oscl);
+               "lock = %px, ols = %px\n", lock, oscl);
 
        if (oscl->ols_state == OLS_GRANTED)
                RETURN(0);
index d64e54c..15382ec 100644 (file)
@@ -1819,28 +1819,28 @@ no_bulk:
 
        LASSERT(page_count > 0);
        pg_prev = pga[0];
-        for (requested_nob = i = 0; i < page_count; i++, niobuf++) {
-                struct brw_page *pg = pga[i];
+       for (requested_nob = i = 0; i < page_count; i++, niobuf++) {
+               struct brw_page *pg = pga[i];
                int poff = pg->bp_off & ~PAGE_MASK;
 
-                LASSERT(pg->bp_count > 0);
-                /* make sure there is no gap in the middle of page array */
+               LASSERT(pg->bp_count > 0);
+               /* make sure there is no gap in the middle of page array */
                LASSERTF(page_count == 1 ||
                         (ergo(i == 0, poff + pg->bp_count == PAGE_SIZE) &&
                          ergo(i > 0 && i < page_count - 1,
                               poff == 0 && pg->bp_count == PAGE_SIZE)   &&
                          ergo(i == page_count - 1, poff == 0)),
-                        "i: %d/%d pg: %p off: %llu, count: %u\n",
+                        "i: %d/%d pg: %px off: %llu, count: %u\n",
                         i, page_count, pg, pg->bp_off, pg->bp_count);
-                LASSERTF(i == 0 || pg->bp_off > pg_prev->bp_off,
-                        "i %d p_c %u pg %p [pri %lu ind %lu] off %llu"
-                        " prev_pg %p [pri %lu ind %lu] off %llu\n",
-                         i, page_count,
-                         pg->bp_page, page_private(pg->bp_page), pg->bp_page->index, pg->bp_off,
-                         pg_prev->bp_page, page_private(pg_prev->bp_page),
-                         pg_prev->bp_page->index, pg_prev->bp_off);
-                LASSERT((pga[0]->bp_flag & OBD_BRW_SRVLOCK) ==
-                        (pg->bp_flag & OBD_BRW_SRVLOCK));
+               LASSERTF(i == 0 || pg->bp_off > pg_prev->bp_off,
+                        "i %d p_c %u pg %px [pri %lu ind %lu] off %llu prev_pg %px [pri %lu ind %lu] off %llu\n",
+                        i, page_count,
+                        pg->bp_page, page_private(pg->bp_page),
+                        pg->bp_page->index, pg->bp_off,
+                        pg_prev->bp_page, page_private(pg_prev->bp_page),
+                        pg_prev->bp_page->index, pg_prev->bp_off);
+               LASSERT((pga[0]->bp_flag & OBD_BRW_SRVLOCK) ==
+                       (pg->bp_flag & OBD_BRW_SRVLOCK));
                if (short_io_size != 0 && opc == OST_WRITE) {
                        unsigned char *ptr = kmap_atomic(pg->bp_page);
 
@@ -1855,33 +1855,34 @@ no_bulk:
                }
                requested_nob += pg->bp_count;
 
-                if (i > 0 && can_merge_pages(pg_prev, pg)) {
-                        niobuf--;
+               if (i > 0 && can_merge_pages(pg_prev, pg)) {
+                       niobuf--;
                        niobuf->rnb_len += pg->bp_count;
                } else {
                        niobuf->rnb_offset = pg->bp_off;
                        niobuf->rnb_len    = pg->bp_count;
                        niobuf->rnb_flags  = pg->bp_flag;
-                }
-                pg_prev = pg;
-        }
+               }
+               pg_prev = pg;
+       }
 
-        LASSERTF((void *)(niobuf - niocount) ==
-                req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE),
-                "want %p - real %p\n", req_capsule_client_get(&req->rq_pill,
-                &RMF_NIOBUF_REMOTE), (void *)(niobuf - niocount));
+       LASSERTF((void *)(niobuf - niocount) ==
+                req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE),
+                "want %px - real %px\n",
+                req_capsule_client_get(&req->rq_pill, &RMF_NIOBUF_REMOTE),
+                (void *)(niobuf - niocount));
 
-        osc_announce_cached(cli, &body->oa, opc == OST_WRITE ? requested_nob:0);
-        if (resend) {
-                if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0) {
-                        body->oa.o_valid |= OBD_MD_FLFLAGS;
-                        body->oa.o_flags = 0;
-                }
-                body->oa.o_flags |= OBD_FL_RECOV_RESEND;
-        }
+       osc_announce_cached(cli, &body->oa, opc == OST_WRITE ? requested_nob:0);
+       if (resend) {
+               if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0) {
+                       body->oa.o_valid |= OBD_MD_FLFLAGS;
+                       body->oa.o_flags = 0;
+               }
+               body->oa.o_flags |= OBD_FL_RECOV_RESEND;
+       }
 
-        if (osc_should_shrink_grant(cli))
-                osc_shrink_grant_local(cli, &body->oa);
+       if (osc_should_shrink_grant(cli))
+               osc_shrink_grant_local(cli, &body->oa);
 
        if (!cli->cl_checksum || sptlrpc_flavor_has_bulk(&req->rq_flvr))
                enable_checksum = false;
@@ -2421,7 +2422,7 @@ static int osc_brw_redo_request(struct ptlrpc_request *request,
        list_for_each_entry(oap, &aa->aa_oaps, oap_rpc_item) {
                if (oap->oap_request != NULL) {
                        LASSERTF(request == oap->oap_request,
-                                "request %p != oap_request %p\n",
+                                "request %px != oap_request %px\n",
                                 request, oap->oap_request);
                }
        }
@@ -2979,7 +2980,7 @@ static int osc_enqueue_interpret(const struct lu_env *env,
         * be valid. */
        lock = ldlm_handle2lock(lockh);
        LASSERTF(lock != NULL,
-                "lockh %#llx, req %p, aa %p - client evicted?\n",
+                "lockh %#llx, req %px, aa %px - client evicted?\n",
                 lockh->cookie, req, aa);
 
        /* Take an additional reference so that a blocking AST that
index b90ca67..9133823 100644 (file)
@@ -117,7 +117,7 @@ static int __osd_init_iobuf(struct osd_device *d, struct osd_iobuf *iobuf,
        int blocks, i;
 
        LASSERTF(iobuf->dr_elapsed_valid == 0,
-                "iobuf %p, reqs %d, rw %d, line %d\n", iobuf,
+                "iobuf %px, reqs %d, rw %d, line %d\n", iobuf,
                 atomic_read(&iobuf->dr_numreqs), iobuf->dr_rw,
                 iobuf->dr_init_at);
        LASSERT(pages <= PTLRPC_MAX_BRW_PAGES);
index 193cee1..ef21c44 100644 (file)
@@ -1585,7 +1585,7 @@ static int osp_create(const struct lu_env *env, struct dt_object *dt,
 
        memcpy(fid, lu_object_fid(&dt->do_lu), sizeof(*fid));
 
-       LASSERTF(fid_is_sane(fid), "fid for osp_object %p is insane"DFID"!\n",
+       LASSERTF(fid_is_sane(fid), "fid for osp_object %px is insane"DFID"!\n",
                 o, PFID(fid));
 
        if (!o->opo_reserved) {
index a1bf146..c8f75ef 100644 (file)
@@ -924,9 +924,9 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp,
        if (request) {
                ptlrpc_cli_req_init(request);
 
-               LASSERTF((unsigned long)imp > 0x1000, "%p\n", imp);
+               LASSERTF((unsigned long)imp > 0x1000, "%px\n", imp);
                LASSERT(imp != LP_POISON);
-               LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p\n",
+               LASSERTF((unsigned long)imp->imp_client > 0x1000, "%px\n",
                         imp->imp_client);
                LASSERT(imp->imp_client != LP_POISON);
 
@@ -2650,10 +2650,10 @@ static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked)
 
        LASSERT(!request->rq_srv_req);
        LASSERT(request->rq_export == NULL);
-       LASSERTF(!request->rq_receiving_reply, "req %p\n", request);
-       LASSERTF(list_empty(&request->rq_list), "req %p\n", request);
-       LASSERTF(list_empty(&request->rq_set_chain), "req %p\n", request);
-       LASSERTF(!request->rq_replay, "req %p\n", request);
+       LASSERTF(!request->rq_receiving_reply, "req %px\n", request);
+       LASSERTF(list_empty(&request->rq_list), "req %px\n", request);
+       LASSERTF(list_empty(&request->rq_set_chain), "req %px\n", request);
+       LASSERTF(!request->rq_replay, "req %px\n", request);
 
        req_capsule_fini(&request->rq_pill);
 
@@ -2669,7 +2669,7 @@ static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked)
                if (!locked)
                        spin_unlock(&request->rq_import->imp_lock);
        }
-       LASSERTF(list_empty(&request->rq_replay_list), "req %p\n", request);
+       LASSERTF(list_empty(&request->rq_replay_list), "req %px\n", request);
 
        if (atomic_read(&request->rq_refcount) != 0) {
                DEBUG_REQ(D_ERROR, request,
index 5be7dfc..8a48d8c 100644 (file)
@@ -54,7 +54,7 @@ int llog_initiator_connect(struct llog_ctxt *ctxt)
        LASSERT(ctxt);
        new_imp = ctxt->loc_obd->u.cli.cl_import;
        LASSERTF(!ctxt->loc_imp || ctxt->loc_imp == new_imp,
-                "%p - %p\n", ctxt->loc_imp, new_imp);
+                "%px - %px\n", ctxt->loc_imp, new_imp);
        mutex_lock(&ctxt->loc_mutex);
        if (ctxt->loc_imp != new_imp) {
                if (ctxt->loc_imp)
index cab83de..08f92b8 100644 (file)
@@ -421,7 +421,7 @@ void *lustre_msg_buf(struct lustre_msg *m, __u32 n, __u32 min_size)
        case LUSTRE_MSG_MAGIC_V2:
                return lustre_msg_buf_v2(m, n, min_size);
        default:
-               LASSERTF(0, "incorrect message magic: %08x (msg:%p)\n",
+               LASSERTF(0, "incorrect message magic: %08x (msg:%px)\n",
                         m->lm_magic, m);
                return NULL;
        }
@@ -905,7 +905,7 @@ void lustre_msg_add_flags(struct lustre_msg *msg, __u32 flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_flags |= flags;
                return;
        }
@@ -920,7 +920,7 @@ void lustre_msg_set_flags(struct lustre_msg *msg, __u32 flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_flags = flags;
                return;
        }
@@ -934,7 +934,7 @@ void lustre_msg_clear_flags(struct lustre_msg *msg, __u32 flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_flags &= ~flags;
 
                return;
@@ -966,7 +966,7 @@ void lustre_msg_add_op_flags(struct lustre_msg *msg, __u32 flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_op_flags |= flags;
                return;
        }
@@ -1033,7 +1033,7 @@ void lustre_msg_add_version(struct lustre_msg *msg, __u32 version)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_version |= version;
                return;
        }
@@ -1431,7 +1431,7 @@ void lustre_msg_set_handle(struct lustre_msg *msg, struct lustre_handle *handle)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_handle = *handle;
                return;
        }
@@ -1445,7 +1445,7 @@ void lustre_msg_set_type(struct lustre_msg *msg, __u32 type)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_type = type;
                return;
                }
@@ -1459,7 +1459,7 @@ void lustre_msg_set_opc(struct lustre_msg *msg, __u32 opc)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_opc = opc;
                return;
        }
@@ -1473,7 +1473,7 @@ void lustre_msg_set_last_xid(struct lustre_msg *msg, __u64 last_xid)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_last_xid = last_xid;
                return;
        }
@@ -1488,7 +1488,7 @@ void lustre_msg_set_tag(struct lustre_msg *msg, __u16 tag)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_tag = tag;
                return;
        }
@@ -1503,7 +1503,7 @@ void lustre_msg_set_last_committed(struct lustre_msg *msg, __u64 last_committed)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_last_committed = last_committed;
                return;
        }
@@ -1517,7 +1517,7 @@ void lustre_msg_set_versions(struct lustre_msg *msg, __u64 *versions)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_pre_versions[0] = versions[0];
                pb->pb_pre_versions[1] = versions[1];
                pb->pb_pre_versions[2] = versions[2];
@@ -1535,7 +1535,7 @@ void lustre_msg_set_transno(struct lustre_msg *msg, __u64 transno)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_transno = transno;
                return;
        }
@@ -1550,7 +1550,7 @@ void lustre_msg_set_status(struct lustre_msg *msg, __u32 status)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_status = status;
                return;
        }
@@ -1565,7 +1565,7 @@ void lustre_msg_set_conn_cnt(struct lustre_msg *msg, __u32 conn_cnt)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_conn_cnt = conn_cnt;
                return;
        }
@@ -1581,7 +1581,7 @@ void lustre_msg_set_timeout(struct lustre_msg *msg, timeout_t timeout)
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
 
                LASSERT(timeout >= 0);
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_timeout = timeout;
                return;
        }
@@ -1598,7 +1598,7 @@ void lustre_msg_set_service_timeout(struct lustre_msg *msg,
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
 
                LASSERT(service_timeout >= 0);
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_service_time = service_timeout;
                return;
        }
@@ -1621,7 +1621,7 @@ void lustre_msg_set_uid_gid(struct lustre_msg *msg, __u32 *uid, __u32 *gid)
 
                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF,
                                       sizeof(struct ptlrpc_body));
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
 
                if (uid && gid) {
                        pb->pb_uid = *uid;
@@ -1656,7 +1656,7 @@ void lustre_msg_set_jobid(struct lustre_msg *msg, char *jobid)
 
                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF,
                                       sizeof(struct ptlrpc_body));
-               LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb, "invalid msg %px: no ptlrpc body!\n", msg);
 
                if (jobid != NULL)
                        memcpy(pb->pb_jobid, jobid, sizeof(pb->pb_jobid));
@@ -1687,7 +1687,7 @@ void lustre_msg_set_mbits(struct lustre_msg *msg, __u64 mbits)
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
 
-               LASSERTF(pb != NULL, "invalid msg %p: no ptlrpc body!\n", msg);
+               LASSERTF(pb != NULL, "invalid msg %px: no ptlrpc body!\n", msg);
                pb->pb_mbits = mbits;
                return;
        }
index 565ec13..ef5b4e7 100644 (file)
@@ -176,8 +176,8 @@ int ptlrpc_resend(struct obd_import *imp)
 
        list_for_each_entry(req, &imp->imp_sending_list, rq_list) {
                LASSERTF((long)req > PAGE_SIZE && req != LP_POISON,
-                        "req %p bad\n", req);
-               LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req);
+                        "req %px bad\n", req);
+               LASSERTF(req->rq_type != LI_POISON, "req %px freed\n", req);
 
                /* If the request is allowed to be sent during replay and it
                 * is not timeout yet, then it does not need to be resent. */
index a5de864..065a13d 100644 (file)
@@ -96,9 +96,9 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx)
 
        ASSERT_CTXT_MAGIC(saved->magic);
 
-       LASSERTF(current->fs->pwd.dentry == new_ctx->pwd, "%p != %p\n",
+       LASSERTF(current->fs->pwd.dentry == new_ctx->pwd, "%px != %px\n",
                 current->fs->pwd.dentry, new_ctx->pwd);
-       LASSERTF(current->fs->pwd.mnt == new_ctx->pwdmnt, "%p != %p\n",
+       LASSERTF(current->fs->pwd.mnt == new_ctx->pwdmnt, "%px != %px\n",
                 current->fs->pwd.mnt, new_ctx->pwdmnt);
 
        ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
index b965cb4..d7ea81d 100644 (file)
@@ -184,10 +184,10 @@ void null_free_reqbuf(struct ptlrpc_sec *sec,
 {
        if (!req->rq_pool) {
                LASSERTF(req->rq_reqmsg == req->rq_reqbuf,
-                        "req %p: reqmsg %p is not reqbuf %p in null sec\n",
+                        "req %px: reqmsg %px is not reqbuf %px in null sec\n",
                         req, req->rq_reqmsg, req->rq_reqbuf);
                LASSERTF(req->rq_reqbuf_len >= req->rq_reqlen,
-                        "req %p: reqlen %d should smaller than buflen %d\n",
+                        "req %px: reqlen %d should smaller than buflen %d\n",
                         req, req->rq_reqlen, req->rq_reqbuf_len);
 
                OBD_FREE_LARGE(req->rq_reqbuf, req->rq_reqbuf_len);
index 9c89695..e12308d 100644 (file)
@@ -321,7 +321,7 @@ static inline int qti_pools_add(const struct lu_env *env,
 
        pools = qti_pools(qti);
        LASSERTF(qti->qti_pools_num >= QMT_MAX_POOL_NUM,
-                "Forgot init? %p\n", qti);
+                "Forgot init? %px\n", qti);
 
        if (qti->qti_pools_cnt >= qti->qti_pools_num) {
                OBD_ALLOC(pools, sizeof(qpi) * qti->qti_pools_num * 2);
index 336dba5..c5b8cf9 100644 (file)
@@ -1556,9 +1556,8 @@ static int distribute_txn_commit_thread(void *_arg)
                        } else if (!tdtd->tdtd_lut->lut_obd->obd_recovering) {
                                __set_current_state(TASK_RUNNING);
                                LASSERTF(tmt->tmt_batchid >= batchid,
-                                        "tmt %p tmt_batchid: %llu, batchid "
-                                         "%llu\n", tmt, tmt->tmt_batchid,
-                                        batchid);
+                                        "tmt %px tmt_batchid: %llu, batchid %llu\n",
+                                        tmt, tmt->tmt_batchid, batchid);
                                /* There are three types of distribution
                                 * transaction result
                                 *