Whamcloud - gitweb
LU-2336 llog: hide the harmless log message
authorHongchao Zhang <hongchao.zhang@whamcloud.com>
Sun, 13 Jan 2013 13:15:49 +0000 (21:15 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 26 Jan 2013 02:56:21 +0000 (21:56 -0500)
in llog_cat_add_rec, the llog_write_rec could return -ENOSPC
if the current log is full, and it will move to the next log
file, then it should not be treated as an error.

Change-Id: Ie2e203dc01572e170e9a383c63dcc670db093355
Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/5146
Tested-by: Hudson
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/obdclass/llog_cat.c

index 3fe67f6..5ba5300 100644 (file)
@@ -348,8 +348,9 @@ int llog_cat_add_rec(const struct lu_env *env, struct llog_handle *cathandle,
        }
        /* now let's try to add the record */
        rc = llog_write_rec(env, loghandle, rec, reccookie, 1, buf, -1, th);
        }
        /* now let's try to add the record */
        rc = llog_write_rec(env, loghandle, rec, reccookie, 1, buf, -1, th);
-        if (rc < 0)
-                CERROR("llog_write_rec %d: lh=%p\n", rc, loghandle);
+       if (rc < 0)
+               CDEBUG_LIMIT(rc == -ENOSPC ? D_HA : D_ERROR,
+                            "llog_write_rec %d: lh=%p\n", rc, loghandle);
        up_write(&loghandle->lgh_lock);
         if (rc == -ENOSPC) {
                /* try to use next log */
        up_write(&loghandle->lgh_lock);
         if (rc == -ENOSPC) {
                /* try to use next log */