[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120528173133.GA31109@thunk.org>
Date: Mon, 28 May 2012 13:31:33 -0400
From: Ted Ts'o <tytso@....edu>
To: Jan Kara <jack@...e.cz>
Cc: Sami Liedes <sami.liedes@....fi>, linux-ext4@...r.kernel.org,
linux-fsdev@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>
Subject: Re: ext2 hang on (intentionally) corrupted filesystem
On Wed, May 09, 2012 at 11:12:36PM +0200, Jan Kara wrote:
> > 1. wget http://sli.dy.fi/~sliedes/berserker/testcases/ext2.110.min.bz2
> > 2. mount ... /mnt -t ext2 -o errors=continue
> > 3. Do some operations; what I do (it's the rm that crashes):
> > timeout 30 rm -rf /mnt/* >&/dev/null
> > 4. The rm task hangs
> >
> OK, you've changed '.' directory entry to a normal directory entry with a
> name 0x6e. I guess that has some potential in confusing something. Actually
> rm -rf does not reproduce the problem for me (it just complains about
> cyclic directory hierarchy) but trying to rmdir bad entry hangs the system
> - we try to grab i_mutex for the directory twice because the directory is
> it's own parent... That would be kind of hard to fix in VFS since once our
> directory structure contains a cycle, our locking protocol is no longer
> deadlock free. I'll see what we could do...
Just wanted to chime in that this crashes when the file system is
mounted using ext4; not surprising, since it's clearly a VFS issue.
The following proof-of-concept patch (see reply chained to this mail
message) fixes the problem for your test file system. Al, what do you
think? Is it worth it to define a new mechanism where we can pass
VFS-detected corruption down to the low-level file system?
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists