Skip to contentSkip to conversation

xfs: minor kernel logging updates

PATCH New Eric Sandeen 5 participants 10 messages Feb 23, 2015 – Feb 24, 2015 XFS filesystem

lore
Share & tools
lore
#1 lore raw

PATCH 1/2 xfs: log unmount events on console

There are times, when doing triage and forensics, that we would like to know whether a filesystem was unmounted, or if the plug was pulled without a clean unmount. Log unmounts at the same level (NOTICE) as we log mounts.

---

fs/xfs/xfs_super.c +1 -0
index 8fcc4cc..dd40d25 100644
@@ -1039,6 +1039,7 @@ xfs_fs_put_super(
 {
 	struct xfs_mount	*mp = XFS_M(sb);
 
+	xfs_notice(mp, "Unmounting Filesystem");
 	xfs_filestream_unmount(mp);
 	xfs_unmountfs(mp);
 

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#8 lore raw

PATCH 2/2 xfs: clarify async write failure ratelimit message

In reply to Eric Sandeen

Today, when the "failing async writes" get ratelimited, we see:

XFS:: 62836 callbacks suppressed

Aside from the extra ":" it's not entirely clear which message is being suppressed, especially if other messages or ratelimits are happening at the same time. Clarify this as i.e.:

XFS (dm-11): Failing async write on buffer block 0x140090. Retrying async write.
XFS: Failing async write: 62836 callbacks suppressed

---

I ... don't *think* this is abuse of __ratelimit(), is it?

fs/xfs/xfs_buf_item.c +2 -2
index 4751c5f..08f315d 100644
@@ -537,9 +537,9 @@ xfs_buf_item_push(
 
 	/* has a previous flush failed due to IO errors? */
 	if ((bp->b_flags & XBF_WRITE_FAIL) &&
-	    ___ratelimit(&xfs_buf_write_fail_rl_state, "XFS:")) {
+	    ___ratelimit(&xfs_buf_write_fail_rl_state, "XFS: Failing async write")) {
 		xfs_warn(bp->b_target->bt_mount,
-"Detected failing async write on buffer block 0x%llx. Retrying async write.",
+"Failing async write on buffer block 0x%llx. Retrying async write.",
 			 (long long)bp->b_bn);
 	}
 

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw

Re: [PATCH 1/2] xfs: log unmount events on console

Quoted 7 lines · Eric Sandeen
Quoted 1 line · Christoph Hellwig

Oh well, even more spam during xfstest runs :)

Heh, but no review...?

I could be talked out of it, if people think it's not useful enough.

I can't really get excited enough either way to give a review or nak..

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#5 lore raw

Re: [PATCH 1/2] xfs: log unmount events on console

Quoted 11 lines · Christoph Hellwig
Quoted 7 lines · Eric Sandeen
Quoted 1 line · Christoph Hellwig

Oh well, even more spam during xfstest runs :)

Heh, but no review...?

I could be talked out of it, if people think it's not useful enough.

I can't really get excited enough either way to give a review or nak..

Heh, what verbosity is xfs_notice()? Maybe using debug level would be better?

Brian

Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#6 lore raw

Re: [PATCH 1/2] xfs: log unmount events on console

Quoted 7 lines · Brian Foster
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Eric Sandeen
Quoted 1 line · Christoph Hellwig

Oh well, even more spam during xfstest runs :)

Heh, but no review...?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I could be talked out of it, if people think it's not useful enough.

I can't really get excited enough either way to give a review or nak..

Heh, what verbosity is xfs_notice()? Maybe using debug level would be better?

The context Eric and I wanted to see this was when triaging bugs on production systems. e.g. to know if someone unmounted a shut down filesystem and tried to repair it before rebooting the system...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by
#7 lore raw

Re: [PATCH 1/2] xfs: log unmount events on console

Quoted 14 lines · Dave Chinner
Quoted 13 lines · Brian Foster
Quoted 11 lines · Christoph Hellwig
Quoted 7 lines · Eric Sandeen
Quoted 1 line · Christoph Hellwig

Oh well, even more spam during xfstest runs :)

Heh, but no review...?

I could be talked out of it, if people think it's not useful enough.

I can't really get excited enough either way to give a review or nak..

Quoted 7 lines
Quoted 2 lines

Heh, what verbosity is xfs_notice()? Maybe using debug level would be better?

The context Eric and I wanted to see this was when triaging bugs on production systems. e.g. to know if someone unmounted a shut down filesystem and tried to repair it before rebooting the system...

I guess that makes sense on a clean reboot, less so if the shutdown is a rootfs and leads to a panic or something of that sort (and what does a umount matter once the fs is shutdown?).

Anyways, it's not a common operation and if the extra xfstests logging is the most significant tradeoff then it seems harmless to me:

Quoted 11 lines

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs