aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2010-05-06 06:03:29 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2010-05-06 06:03:29 -0400
commit913a71d250803130eac523e7a2b6439e31a0bc83 (patch)
tree5a5c51a5651c49d21cb6f88c63dc063df12acff7 /fs/gfs2
parentad6bb90f3401556469489f237cb08626d88703d2 (diff)
GFS2: Add some useful messages
The following patch adds a message to indicate when barriers have been disabled due to a block device which doesn't support them. You could already tell this via the mount options in /proc/mounts, but all the other filesystems also log a message at the same time. Also, the same mechanisms are used to indicate when the lock demote interface has been used (only ever used for debugging) which is a request from our support team. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/incore.h1
-rw-r--r--fs/gfs2/log.c1
-rw-r--r--fs/gfs2/super.c3
-rw-r--r--fs/gfs2/sys.c2
4 files changed, 6 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index 08dd65745473..b5d7363b22da 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -459,6 +459,7 @@ enum {
459 SDF_SHUTDOWN = 2, 459 SDF_SHUTDOWN = 2,
460 SDF_NOBARRIERS = 3, 460 SDF_NOBARRIERS = 3,
461 SDF_NORECOVERY = 4, 461 SDF_NORECOVERY = 4,
462 SDF_DEMOTE = 5,
462}; 463};
463 464
464#define GFS2_FSNAME_LEN 256 465#define GFS2_FSNAME_LEN 256
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index d5959df6deb2..b593f0e28f25 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -600,6 +600,7 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull)
600 if (buffer_eopnotsupp(bh)) { 600 if (buffer_eopnotsupp(bh)) {
601 clear_buffer_eopnotsupp(bh); 601 clear_buffer_eopnotsupp(bh);
602 set_buffer_uptodate(bh); 602 set_buffer_uptodate(bh);
603 fs_info(sdp, "barrier sync failed - disabling barriers\n");
603 set_bit(SDF_NOBARRIERS, &sdp->sd_flags); 604 set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
604 lock_buffer(bh); 605 lock_buffer(bh);
605skip_barrier: 606skip_barrier:
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 7a93e9ff7d3c..4d1aad38f1b1 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1334,7 +1334,8 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
1334 } 1334 }
1335 if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) 1335 if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
1336 seq_printf(s, ",nobarrier"); 1336 seq_printf(s, ",nobarrier");
1337 1337 if (test_bit(SDF_DEMOTE, &sdp->sd_flags))
1338 seq_printf(s, ",demote_interface_used");
1338 return 0; 1339 return 0;
1339} 1340}
1340 1341
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index 2ac845d9c46c..7afb62ec97cf 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -233,6 +233,8 @@ static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len
233 glops = gfs2_glops_list[gltype]; 233 glops = gfs2_glops_list[gltype];
234 if (glops == NULL) 234 if (glops == NULL)
235 return -EINVAL; 235 return -EINVAL;
236 if (test_and_set_bit(SDF_DEMOTE, &sdp->sd_flags))
237 fs_info(sdp, "demote interface used\n");
236 rv = gfs2_glock_get(sdp, glnum, glops, 0, &gl); 238 rv = gfs2_glock_get(sdp, glnum, glops, 0, &gl);
237 if (rv) 239 if (rv)
238 return rv; 240 return rv;