public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: Alexander Beregalov <a.beregalov@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-ext4@vger.kernel.org, Jens Axboe <jens.axboe@oracle.com>,
	dmitry.torokhov@gmail.com, Jan Kara <jack@suse.cz>,
	aanisimov@inbox.ru, pl4nkton@googlemail.com
Subject: Re: 2.6.33-rc1: kernel BUG at fs/ext4/inode.c:1063 (sparc)
Date: Wed, 30 Dec 2009 12:48:49 -0500	[thread overview]
Message-ID: <20091230174849.GN4429@thunk.org> (raw)
In-Reply-To: <87k4w4vbvy.fsf@openvz.org>

On Wed, Dec 30, 2009 at 04:18:09PM +0300, Dmitry Monakhov wrote:
> 
> IMHO we may drop i_allocated_meta_block in ext4_release_file()
> But while looking in to this function i've found another question
> about locking
> static int ext4_release_file(struct inode *inode, struct file *filp)
> {
> 	if (EXT4_I(inode)->i_state & EXT4_STATE_DA_ALLOC_CLOSE) {
> 		ext4_alloc_da_blocks(inode);
> 		EXT4_I(inode)->i_state &= ~EXT4_STATE_DA_ALLOC_CLOSE;
> <<< Seems what i_state modification must being protected by i_mutex,
>  but currently caller don't have to hold it.

(I'm answering this in a separate message since it really is a
separate question).

Yeah, that looks like a problem --- and it exists in more than just
this one place.  Unfortunately using i_mutex to protect updates to
i_state is a bit heavyweight.  What I'm thinking about doing is
converting all of the references the i_state flags to use set_bit,
clear_bit, and test_bit, since this will allow us to safely and
cleanly set/clear/test individual bits.

A quick audit of ext3 seems to show this is potentially a problem with
ext3 as well (specifically, in fs/ext3/xattr.c's use of
EXT3_STATE_XATTR).

						- Ted

  parent reply	other threads:[~2009-12-30 17:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 22:28 2.6.33-rc1: kernel BUG at fs/ext4/inode.c:1063 (sparc) Alexander Beregalov
2009-12-24 22:49 ` Alexander Beregalov
2009-12-25 12:31   ` Dmitry Monakhov
2009-12-25 19:33     ` Alexander Beregalov
2009-12-25 23:47       ` Dmitry Monakhov
2009-12-27 20:32         ` Alexander Beregalov
2009-12-27 21:38           ` Dmitry Torokhov
2009-12-27 22:52           ` tytso
2009-12-27 23:02             ` Alexander Beregalov
2009-12-28  3:51               ` tytso
2009-12-30  5:37                 ` tytso
2009-12-30 13:18                   ` Dmitry Monakhov
2009-12-30 17:45                     ` tytso
2009-12-30 17:48                     ` tytso [this message]
2009-12-24 23:05 ` tytso
2009-12-24 23:15   ` tytso

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=20091230174849.GN4429@thunk.org \
    --to=tytso@mit.edu \
    --cc=a.beregalov@gmail.com \
    --cc=aanisimov@inbox.ru \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dmonakhov@openvz.org \
    --cc=jack@suse.cz \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pl4nkton@googlemail.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