GFS2: Use fs_<level> more often
authorJoe Perches <joe@perches.com>
Thu, 6 Mar 2014 20:10:46 +0000 (12:10 -0800)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 7 Mar 2014 09:32:31 +0000 (09:32 +0000)
Convert a couple of uses of pr_<level> to fs_<level>
Add and use fs_emerg.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/quota.c
fs/gfs2/util.c
fs/gfs2/util.h

index 73ed92535c8a0fd4a7ce943587be92fc4c38cbfb..27f9435ddd204ab2422a4ea571736624a7a108e5 100644 (file)
@@ -1083,8 +1083,8 @@ static int print_message(struct gfs2_quota_data *qd, char *type)
 {
        struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
 
-       pr_info("fsid=%s: quota %s for %s %u\n",
-               sdp->sd_fsname, type,
+       fs_info(sdp, "quota %s for %s %u\n",
+               type,
                (qd->qd_id.type == USRQUOTA) ? "user" : "group",
                from_kqid(&init_user_ns, qd->qd_id));
 
index 02fb38db9d196227f0e73f4a067259799b848d35..84bf853046aecee6b866324f2ae812d55fcb71ab 100644 (file)
@@ -32,7 +32,7 @@ mempool_t *gfs2_page_pool __read_mostly;
 
 void gfs2_assert_i(struct gfs2_sbd *sdp)
 {
-       pr_emerg("fsid=%s: fatal assertion failed\n", sdp->sd_fsname);
+       fs_emerg(sdp, "fatal assertion failed\n");
 }
 
 int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
@@ -106,8 +106,8 @@ int gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
                return -2;
 
        if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW)
-               pr_warn("fsid=%s: warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n",
-                       sdp->sd_fsname, assertion, function, file, line);
+               fs_warn(sdp, "warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n",
+                       assertion, function, file, line);
 
        if (sdp->sd_args.ar_debug)
                BUG();
index d365733744d780f68633aa1065e9b5be5cdb0999..515cce2d7131a9cb9074cd40da716935e0b1b7e3 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "incore.h"
 
+#define fs_emerg(fs, fmt, ...)                                         \
+       pr_emerg("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
 #define fs_warn(fs, fmt, ...)                                          \
        pr_warn("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
 #define fs_err(fs, fmt, ...)                                           \