linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-ext4@vger.kernel.org, jack@suse.cz
Subject: Re: [PATCH] ext4: fix ext4_flush_completed_IO wait semantics
Date: Fri, 5 Oct 2012 08:40:27 -0400	[thread overview]
Message-ID: <20121005124027.GA21358@thunk.org> (raw)
In-Reply-To: <1349289807-18811-1-git-send-email-dmonakhov@openvz.org>

On Wed, Oct 03, 2012 at 10:43:27PM +0400, Dmitry Monakhov wrote:
> -int ext4_flush_completed_IO(struct inode *inode)
> +int ext4_flush_unwritten_io(struct inode *inode)
>  {
> -	return ext4_do_flush_completed_IO(inode, NULL);
> +	int ret;
> +	WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex));
> +	ret = ext4_do_flush_completed_IO(inode, NULL);
> +	ext4_unwritten_wait(inode);
> +	return ret;
>  }
>  

This WARN_ON is triggering on the truncate path...

------------[ cut here ]------------
WARNING: at /usr/projects/linux/ext4/fs/ext4/page-io.c:232 ext4_flush_unwritten_io+0x2d/0x4c()
Hardware name: Bochs
Modules linked in:
Pid: 1907, comm: findfs Not tainted 3.6.0-rc1-00071-gb1edc6d #441
Call Trace:
 [<c0159cb3>] warn_slowpath_common+0x68/0x7d
 [<c0272ebd>] ? ext4_flush_unwritten_io+0x2d/0x4c
 [<c0159cdc>] warn_slowpath_null+0x14/0x18
 [<c0272ebd>] ext4_flush_unwritten_io+0x2d/0x4c
 [<c028fa09>] ext4_ext_truncate+0x21/0x174
 [<c0270cbb>] ? ext4_mark_inode_dirty+0x172/0x1a9
 [<c026ed9e>] ext4_truncate+0x7b/0xb9
 [<c0272414>] ext4_evict_inode+0x1ec/0x2e3
 [<c021a724>] evict+0x94/0x135
 [<c021a939>] iput+0x174/0x17a
 [<c02122bd>] do_unlinkat+0xc8/0x106
 [<c06d8b5e>] ? restore_all+0xf/0xf
 [<c0199909>] ? trace_hardirqs_on_caller+0x103/0x154
 [<c02138f0>] sys_unlink+0x15/0x17
 [<c06d8b25>] syscall_call+0x7/0xb
---[ end trace cdd8306e94494df8 ]---

							- Ted


  parent reply	other threads:[~2012-10-05 12:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-03 18:43 [PATCH] ext4: fix ext4_flush_completed_IO wait semantics Dmitry Monakhov
2012-10-03 18:55 ` Theodore Ts'o
2012-10-03 19:32   ` Dmitry Monakhov
2012-10-03 20:24     ` Theodore Ts'o
2012-10-04 10:11 ` Jan Kara
2012-10-05  4:20   ` Theodore Ts'o
2012-10-05 12:40 ` Theodore Ts'o [this message]
2012-10-05 13:01   ` Dmitry Monakhov
2012-10-05 13:28     ` Theodore Ts'o
2012-10-05 13:53       ` Dmitry Monakhov
2012-10-05 14:20         ` Theodore Ts'o

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=20121005124027.GA21358@thunk.org \
    --to=tytso@mit.edu \
    --cc=dmonakhov@openvz.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@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;
as well as URLs for NNTP newsgroup(s).