public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] xfs: minor kernel logging updates
@ 2015-02-23 19:13 Eric Sandeen
  2015-02-23 19:15 ` [PATCH 1/2] xfs: log unmount events on console Eric Sandeen
  2015-02-23 19:19 ` [PATCH 2/2] xfs: clarify async write failure ratelimit message Eric Sandeen
  0 siblings, 2 replies; 10+ messages in thread
From: Eric Sandeen @ 2015-02-23 19:13 UTC (permalink / raw)
  To: xfs-oss

Two very minor changes to error logging that I wished for when
doing some debugging ... (not xfs logging ... dmesg "logging" ...)

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] xfs: log unmount events on console
  2015-02-23 19:13 [PATCH 0/2] xfs: minor kernel logging updates Eric Sandeen
@ 2015-02-23 19:15 ` Eric Sandeen
  2015-02-23 20:49   ` Christoph Hellwig
  2015-02-23 19:19 ` [PATCH 2/2] xfs: clarify async write failure ratelimit message Eric Sandeen
  1 sibling, 1 reply; 10+ messages in thread
From: Eric Sandeen @ 2015-02-23 19:15 UTC (permalink / raw)
  To: Eric Sandeen, xfs-oss

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.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 8fcc4cc..dd40d25 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] xfs: clarify async write failure ratelimit message
  2015-02-23 19:13 [PATCH 0/2] xfs: minor kernel logging updates Eric Sandeen
  2015-02-23 19:15 ` [PATCH 1/2] xfs: log unmount events on console Eric Sandeen
@ 2015-02-23 19:19 ` Eric Sandeen
  2015-02-23 20:49   ` Christoph Hellwig
  1 sibling, 1 reply; 10+ messages in thread
From: Eric Sandeen @ 2015-02-23 19:19 UTC (permalink / raw)
  To: Eric Sandeen, xfs-oss

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

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

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

diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 4751c5f..08f315d 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfs: log unmount events on console
  2015-02-23 19:15 ` [PATCH 1/2] xfs: log unmount events on console Eric Sandeen
@ 2015-02-23 20:49   ` Christoph Hellwig
  2015-02-23 20:53     ` Eric Sandeen
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2015-02-23 20:49 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss

Oh well, even more spam during xfstest runs :)

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] xfs: clarify async write failure ratelimit message
  2015-02-23 19:19 ` [PATCH 2/2] xfs: clarify async write failure ratelimit message Eric Sandeen
@ 2015-02-23 20:49   ` Christoph Hellwig
  0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2015-02-23 20:49 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfs: log unmount events on console
  2015-02-23 20:49   ` Christoph Hellwig
@ 2015-02-23 20:53     ` Eric Sandeen
  2015-02-23 21:06       ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Sandeen @ 2015-02-23 20:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Eric Sandeen, xfs-oss

On 2/23/15 2:49 PM, Christoph Hellwig wrote:
> 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.

-Eric


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfs: log unmount events on console
  2015-02-23 20:53     ` Eric Sandeen
@ 2015-02-23 21:06       ` Christoph Hellwig
  2015-02-24 11:53         ` Brian Foster
  0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2015-02-23 21:06 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Eric Sandeen, xfs-oss

On Mon, Feb 23, 2015 at 02:53:04PM -0600, Eric Sandeen wrote:
> On 2/23/15 2:49 PM, Christoph Hellwig wrote:
> > 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
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfs: log unmount events on console
  2015-02-23 21:06       ` Christoph Hellwig
@ 2015-02-24 11:53         ` Brian Foster
  2015-02-24 12:51           ` Dave Chinner
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Foster @ 2015-02-24 11:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Eric Sandeen, Eric Sandeen, xfs-oss

On Mon, Feb 23, 2015 at 01:06:29PM -0800, Christoph Hellwig wrote:
> On Mon, Feb 23, 2015 at 02:53:04PM -0600, Eric Sandeen wrote:
> > On 2/23/15 2:49 PM, Christoph Hellwig wrote:
> > > 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

> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfs: log unmount events on console
  2015-02-24 11:53         ` Brian Foster
@ 2015-02-24 12:51           ` Dave Chinner
  2015-02-24 13:03             ` Brian Foster
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Chinner @ 2015-02-24 12:51 UTC (permalink / raw)
  To: Brian Foster; +Cc: Christoph Hellwig, Eric Sandeen, Eric Sandeen, xfs-oss

On Tue, Feb 24, 2015 at 06:53:25AM -0500, Brian Foster wrote:
> On Mon, Feb 23, 2015 at 01:06:29PM -0800, Christoph Hellwig wrote:
> > On Mon, Feb 23, 2015 at 02:53:04PM -0600, Eric Sandeen wrote:
> > > On 2/23/15 2:49 PM, Christoph Hellwig wrote:
> > > > 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?

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.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] xfs: log unmount events on console
  2015-02-24 12:51           ` Dave Chinner
@ 2015-02-24 13:03             ` Brian Foster
  0 siblings, 0 replies; 10+ messages in thread
From: Brian Foster @ 2015-02-24 13:03 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, Eric Sandeen, Eric Sandeen, xfs-oss

On Tue, Feb 24, 2015 at 11:51:20PM +1100, Dave Chinner wrote:
> On Tue, Feb 24, 2015 at 06:53:25AM -0500, Brian Foster wrote:
> > On Mon, Feb 23, 2015 at 01:06:29PM -0800, Christoph Hellwig wrote:
> > > On Mon, Feb 23, 2015 at 02:53:04PM -0600, Eric Sandeen wrote:
> > > > On 2/23/15 2:49 PM, Christoph Hellwig wrote:
> > > > > 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?
> 
> 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:

Reviewed-by: Brian Foster <bfoster@redhat.com>

> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-02-24 13:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 19:13 [PATCH 0/2] xfs: minor kernel logging updates Eric Sandeen
2015-02-23 19:15 ` [PATCH 1/2] xfs: log unmount events on console Eric Sandeen
2015-02-23 20:49   ` Christoph Hellwig
2015-02-23 20:53     ` Eric Sandeen
2015-02-23 21:06       ` Christoph Hellwig
2015-02-24 11:53         ` Brian Foster
2015-02-24 12:51           ` Dave Chinner
2015-02-24 13:03             ` Brian Foster
2015-02-23 19:19 ` [PATCH 2/2] xfs: clarify async write failure ratelimit message Eric Sandeen
2015-02-23 20:49   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox