public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Amit Sahrawat <amit.sahrawat83@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: XFS: Observed Crash followed by deadlock of khubd/sync/XFS
Date: Sat, 10 Sep 2011 14:30:28 -0400	[thread overview]
Message-ID: <20110910183028.GA23537@infradead.org> (raw)
In-Reply-To: <CADDb1s2QDk7y+JgMikoje35LviYQwzpgFihndUPuZx2VXYV4Ew@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

On Thu, Sep 08, 2011 at 04:35:28PM +0530, Amit Sahrawat wrote:
> Kernel Version: 2.6.39.4
> Target: ARM
> 
> Observed while doing:
> Copy some file (any size, I tried with 10MB, 100MB) to XFS partition
> After Copy do???sync???
> Now immediately, unplug the device.

Does this still happen with the patch below applied?


[-- Attachment #2: xfs-fix-synchronous-writes.diff --]
[-- Type: text/plain, Size: 1356 bytes --]

commit 9e978d8f7db1c5de7cdc6450a8ca208db3b95f84
Author: Ajeet Yadav <ajeet.yadav.77@gmail.com>
Date:   Fri Jul 29 07:42:59 2011 +0000

    "xfs: fix error handling for synchronous writes" revisited
    
    xfs: fix for hang during synchronous buffer write error
    
    If removed storage while synchronous buffer write underway,
    "xfslogd" hangs.
    
    Detailed log http://oss.sgi.com/archives/xfs/2011-07/msg00740.html
    
    Related work bfc60177f8ab509bc225becbb58f7e53a0e33e81
    "xfs: fix error handling for synchronous writes"
    
    Given that xfs_bwrite actually does the shutdown already after
    waiting for the b_iodone completion and given that we actually
    found that calling xfs_force_shutdown from inside
    xfs_buf_iodone_callbacks was a major contributor the problem
    it better to drop this call.
    
    Signed-off-by: Ajeet Yadav <ajeet.yadav.77@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Alex Elder <aelder@sgi.com>

diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 0402173..cac2ecf 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -1010,7 +1010,6 @@ xfs_buf_iodone_callbacks(
 	XFS_BUF_UNDELAYWRITE(bp);
 
 	trace_xfs_buf_error_relse(bp, _RET_IP_);
-	xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR);
 
 do_callbacks:
 	xfs_buf_do_callbacks(bp);

[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

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

  parent reply	other threads:[~2011-09-10 18:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-08 11:05 XFS: Observed Crash followed by deadlock of khubd/sync/XFS Amit Sahrawat
2011-09-08 17:28 ` Amit Sahrawat
2011-09-13 15:26   ` Christoph Hellwig
2011-09-13 15:43     ` Amit Sahrawat
2011-09-10 18:30 ` Christoph Hellwig [this message]
2011-09-11 16:46   ` Amit Sahrawat
2011-09-12 11:02     ` Amit Sahrawat
2011-09-12 11:06     ` Amit Sahrawat
2011-09-12 11:15       ` Amit Sahrawat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110910183028.GA23537@infradead.org \
    --to=hch@infradead.org \
    --cc=amit.sahrawat83@gmail.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox