Whamcloud - gitweb
LU-1574 osd: don't use obd_name but od_svname in error messages
authorMikhail Pershin <tappro@whamcloud.com>
Wed, 3 Oct 2012 07:46:59 +0000 (11:46 +0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 5 Oct 2012 04:02:09 +0000 (00:02 -0400)
obd_name is not initialized in OSD, but there is od_svname in
osd_device to be used instead.

Signed-off-by: Mikhail Pershin <tappro@whamcloud.com>
Change-Id: I87a83badc358ad508ecb8a4e593a7e744277e57f
Reviewed-on: http://review.whamcloud.com/4165
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/osd-ldiskfs/osd_quota.c
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_index.c
lustre/osd-zfs/osd_quota.c

index 8dbe02b..5cfd1f5 100644 (file)
@@ -120,7 +120,7 @@ static int osd_acct_index_lookup(const struct lu_env *env,
 #define QUOTA_IT_READ_ERROR(it, rc)                                    \
        CERROR("%s: Error while trying to read quota information, "    \
               "failed with %d\n",                                     \
 #define QUOTA_IT_READ_ERROR(it, rc)                                    \
        CERROR("%s: Error while trying to read quota information, "    \
               "failed with %d\n",                                     \
-              it->oiq_obj->oo_dt.do_lu.lo_dev->ld_obd->obd_name, rc); \
+              osd_dev(it->oiq_obj->oo_dt.do_lu.lo_dev)->od_svname, rc); \
 
 /**
  * Initialize osd Iterator for given osd index object.
 
 /**
  * Initialize osd Iterator for given osd index object.
index 6da92fa..9f0c539 100644 (file)
@@ -209,11 +209,10 @@ static int osd_trans_start(const struct lu_env *env, struct dt_device *d,
                if (!lu_device_is_md(&d->dd_lu_dev) && rc == -ENOSPC)
                        CERROR("%s: failed to start transaction due to ENOSPC. "
                               "Metadata overhead is underestimated or "
                if (!lu_device_is_md(&d->dd_lu_dev) && rc == -ENOSPC)
                        CERROR("%s: failed to start transaction due to ENOSPC. "
                               "Metadata overhead is underestimated or "
-                              "grant_ratio is too low.\n",
-                              osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name);
+                              "grant_ratio is too low.\n", osd->od_svname);
                else
                        CERROR("%s: can't assign tx: rc = %d\n",
                else
                        CERROR("%s: can't assign tx: rc = %d\n",
-                              osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name, rc);
+                              osd->od_svname, rc);
        } else {
                /* add commit callback */
                dmu_tx_callback_register(oh->ot_tx, osd_trans_commit_cb, oh);
        } else {
                /* add commit callback */
                dmu_tx_callback_register(oh->ot_tx, osd_trans_commit_cb, oh);
index d9195a5..73d02a4 100644 (file)
@@ -468,18 +468,18 @@ struct osd_object *osd_object_find(const struct lu_env *env,
                else
                        LU_OBJECT_DEBUG(D_ERROR, env, luch,
                                        "%s: object can't be located "DFID"\n",
                else
                        LU_OBJECT_DEBUG(D_ERROR, env, luch,
                                        "%s: object can't be located "DFID"\n",
-                                       ludev->ld_obd->obd_name, PFID(fid));
+                                       osd_dev(ludev)->od_svname, PFID(fid));
 
                if (child == NULL) {
                        lu_object_put(env, luch);
                        CERROR("%s: Unable to get osd_object "DFID"\n",
 
                if (child == NULL) {
                        lu_object_put(env, luch);
                        CERROR("%s: Unable to get osd_object "DFID"\n",
-                              ludev->ld_obd->obd_name, PFID(fid));
+                              osd_dev(ludev)->od_svname, PFID(fid));
                        child = ERR_PTR(-ENOENT);
                }
        } else {
                LU_OBJECT_DEBUG(D_ERROR, env, luch,
                                "%s: lu_object does not exists "DFID"\n",
                        child = ERR_PTR(-ENOENT);
                }
        } else {
                LU_OBJECT_DEBUG(D_ERROR, env, luch,
                                "%s: lu_object does not exists "DFID"\n",
-                               ludev->ld_obd->obd_name, PFID(fid));
+                               osd_dev(ludev)->od_svname, PFID(fid));
                lu_object_put(env, luch);
                child = ERR_PTR(-ENOENT);
        }
                lu_object_put(env, luch);
                child = ERR_PTR(-ENOENT);
        }
index 3c2fa2b..5470d94 100644 (file)
@@ -96,7 +96,7 @@ static int osd_acct_index_lookup(const struct lu_env *env,
        if (rc == -ENOENT)
                /* user/group has not created anything yet */
                CDEBUG(D_QUOTA, "%s: id %s not found in DMU accounting ZAP\n",
        if (rc == -ENOENT)
                /* user/group has not created anything yet */
                CDEBUG(D_QUOTA, "%s: id %s not found in DMU accounting ZAP\n",
-                       osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name, buf);
+                      osd->od_svname, buf);
        else if (rc)
                RETURN(rc);
 
        else if (rc)
                RETURN(rc);
 
@@ -115,7 +115,7 @@ static int osd_acct_index_lookup(const struct lu_env *env,
        if (rc == -ENOENT)
                /* user/group has not created any file yet */
                CDEBUG(D_QUOTA, "%s: id %s not found in accounting ZAP\n",
        if (rc == -ENOENT)
                /* user/group has not created any file yet */
                CDEBUG(D_QUOTA, "%s: id %s not found in accounting ZAP\n",
-                       osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name, buf);
+                      osd->od_svname, buf);
        else if (rc)
                RETURN(rc);
 
        else if (rc)
                RETURN(rc);
 
@@ -286,7 +286,7 @@ static int osd_it_acct_rec(const struct lu_env *env,
        if (rc == -ENOENT)
                /* user/group has not created any file yet */
                CDEBUG(D_QUOTA, "%s: id %s not found in accounting ZAP\n",
        if (rc == -ENOENT)
                /* user/group has not created any file yet */
                CDEBUG(D_QUOTA, "%s: id %s not found in accounting ZAP\n",
-                       osd->od_dt_dev.dd_lu_dev.ld_obd->obd_name, buf);
+                      osd->od_svname, buf);
        else if (rc)
                RETURN(rc);
 
        else if (rc)
                RETURN(rc);