public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Sundstrom <sunkan@zappa.cx>
To: linux-kernel@vger.kernel.org
Subject: Re: 2.6.28 ext4, xen and lvm volume becomes ro after snapshot
Date: Sat, 27 Dec 2008 10:19:52 +0100	[thread overview]
Message-ID: <4955F338.4020509@zappa.cx> (raw)
In-Reply-To: <20081227030632.GA3539@mit.edu>

Theodore Tso wrote:
> On Fri, Dec 26, 2008 at 11:00:11PM +0100, Andreas Sundstrom wrote:
>> But I enabled debugfs and did
>> "echo 3 > /sys/kernel/debug/jbd2/jbd2-debug" and reproduced the problem
>> by taking a snapshot while the system was live.
>> I hope this had the same effect as your proposed change.
> 
> Thanks, that was helpful.  Can you try applying this patch, and let me
> know whether the printk triggers?

No problem

> 
> What I'm guessing is going on is that on a native kernel, we get the
> ENOTSUPP error immediately when we call submit_bh().  However, with
> the Xen kernel, we aren't getting the error right away; we're either
> getting ENOTSUPP later on, when we call wait_on_buffer().  For ext3,
> this doesn't matter, since we call sync_dirty_buffer() which calls
> submit_bh() and wait_on_buffer() synchronously.  But ext4 doesn't use
> sync_dirty_buffer(), instead calling submit_bh() and wait_on_buffer()
> separately.
> 
> This patch should be able to confirm whether or not this supposition
> is correct.
> 
> 						- Ted
> 
> diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
> index bd1fad0..630196d 100644
> --- a/fs/jbd2/commit.c
> +++ b/fs/jbd2/commit.c
> @@ -174,9 +174,16 @@ static int journal_wait_on_commit_record(struct buffer_head *bh)
>  
>  	clear_buffer_dirty(bh);
>  	wait_on_buffer(bh);
> +	if (buffer_eopnotsupp(bh)) {
> +		printk("jbd2: journal_wait_on_commit_record: eopnotsupp\n");
> +		ret = sync_dirty_buffer(bh);
> +		printk("jbd2: sync_dirty_buffer returned %d\n", ret);
> +	}
>  
> -	if (unlikely(!buffer_uptodate(bh)))
> +	if (unlikely(!buffer_uptodate(bh))) {
> +		printk("jbd2: journal_wait_on_commit_record: not uptodate\n");
>  		ret = -EIO;
> +	}
>  	put_bh(bh);            /* One for getblk() */
>  	jbd2_journal_put_journal_head(bh2jh(bh));
>  

[   44.546636] blkfront: xvda1: write barrier op failed

[   44.546666] blkfront: xvda1: barriers disabled

[   44.546686] end_request: I/O error, dev xvda1, sector 5256

[   44.546710] end_request: I/O error, dev xvda1, sector 5256

[   44.548228] jbd2: journal_wait_on_commit_record: eopnotsupp

[   44.548251] jbd2: sync_dirty_buffer returned 0

[   44.548270] jbd2: journal_wait_on_commit_record: not uptodate

[   44.548293] Aborting journal on device xvda1:8.

More output here http://pastebin.com/m3694a25b

  reply	other threads:[~2008-12-27  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 11:06 2.6.28 ext4, xen and lvm volume becomes ro after snapshot Andreas Sundstrom
2008-12-26 14:07 ` Theodore Tso
2008-12-26 15:42   ` Andreas Sundstrom
2008-12-26 18:21     ` Theodore Tso
2008-12-26 18:48       ` Andreas Sundstrom
2008-12-26 19:33         ` Theodore Tso
2008-12-26 22:00           ` Andreas Sundstrom
2008-12-27  3:06             ` Theodore Tso
2008-12-27  9:19               ` Andreas Sundstrom [this message]
2009-01-02  3:11                 ` Theodore Tso
2009-01-02  8:29                   ` Andreas Sundstrom
2009-01-02 14:10                     ` Theodore Tso
2009-01-03 10:25                       ` Andreas Sundstrom

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=4955F338.4020509@zappa.cx \
    --to=sunkan@zappa.cx \
    --cc=linux-kernel@vger.kernel.org \
    /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