Whamcloud - gitweb
LU-6354 mdd: use cr_tfid on error in mdd_changelog_ns_store() 27/14027/3
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 10 Mar 2015 14:35:56 +0000 (09:35 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 28 May 2015 20:59:24 +0000 (20:59 +0000)
In mdd_changelog_ns_store() use the target FID in the the changelog
record for the CERROR() message rather than the sfid parameter (which
may be NULL).

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: If493f982c4ec6ae36dc9703353c35a9f7b6b0d43
Reviewed-on: http://review.whamcloud.com/14027
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_dir.c

index 9d03d17..b472596 100644 (file)
@@ -851,8 +851,10 @@ int mdd_changelog_ns_store(const struct lu_env *env,
 
        rc = mdd_changelog_store(env, mdd, rec, handle);
        if (rc < 0) {
 
        rc = mdd_changelog_store(env, mdd, rec, handle);
        if (rc < 0) {
-               CERROR("changelog failed: rc=%d, op%d %s c"DFID" p"DFID"\n",
-                       rc, type, tname->ln_name, PFID(sfid), PFID(tpfid));
+               CERROR("%s: cannot store changelog record: type = %d, "
+                      "name = '%s', t = "DFID", p = "DFID": rc = %d\n",
+                      mdd2obd_dev(mdd)->obd_name, type, tname->ln_name,
+                      PFID(&rec->cr.cr_tfid), PFID(&rec->cr.cr_pfid), rc);
                return -EFAULT;
        }
 
                return -EFAULT;
        }