All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: cmm@us.ibm.com, tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH -V2 3/5] ext4: Fix the race between read_block_bitmap and mark_diskspace_used
Date: Fri, 21 Nov 2008 11:40:48 -0600	[thread overview]
Message-ID: <4926F2A0.2050406@redhat.com> (raw)
In-Reply-To: <20081121173920.GG11212@skywalker>

Aneesh Kumar K.V wrote:
> On Fri, Nov 21, 2008 at 11:01:35PM +0530, Aneesh Kumar K.V wrote:
>> On Fri, Nov 21, 2008 at 11:22:04AM -0600, Eric Sandeen wrote:
>>> Aneesh Kumar K.V wrote:
>>>> We need to make sure we update the block bitmap and clear
>>>> EXT4_BG_BLOCK_UNINIT flag with sb_bgl_lock held. We look
>>>> at EXT4_BG_BLOCK_UNINIT and reinit the block bitmap each
>>>> time in ext4_read_block_bitmap (introduced by
>>>> c806e68f5647109350ec546fee5b526962970fd2 )
>>> Can you add details about the failure mode(s) of this race, so people
>>> (i.e. me) have an idea which bugs they've seen that it might address?
>>>
> 
> The errors I have seen are

Ah, there we go.  IMHO, putting a few of these errors into the commit
would be helpful.

Thanks,
-Eric

> a)
> 3795  if (free != pa->pa_free) {
> 3796      printk(KERN_CRIT "pa %p: logic %lu, phys. %lu, len %lu\n",
> 3797                pa, (unsigned long) pa->pa_lstart,
> 3798                (unsigned long) pa->pa_pstart,
> 3799                 (unsigned long) pa->pa_len);
> 
> b)
> 
> 1091     if (!mb_test_bit(block, EXT4_MB_BITMAP(e4b))) {
> 1092             ext4_fsblk_t blocknr;
> 1093             blocknr = e4b->bd_group * EXT4_BLOCKS_PER_GROUP(sb);
> 1094             blocknr += block;
> 1095             blocknr +=
> 1096 			le32_to_cpu(EXT4_SB(sb)->s_es->s_first_data_block);
> 1097           ext4_unlock_group(sb, e4b->bd_group);
> 1098           ext4_error(sb, __func__, "double-free of
> inode"
> 
> For inode bitmap i have seen
> 
> [root@llm19 tmp]# ls -al /mnt/tmp/f/p369/d3/d6/d39/db2/dee/d10f/d3f/l71
> ls: /mnt/tmp/f/p369/d3/d6/d39/db2/dee/d10f/d3f/l71: Stale NFS file handle
> [root@llm19 tmp]# ls -al /mnt/tmp/f/p369/d3/d6/d39/db2/dee/d10f/d3f/
> total 411
> drwxrwxrwx 3 689933 root    1024 Nov 18 05:59 .
> drwxrwxrwx 3   8391 root    1024 Nov 18 05:59 ..
> drwxrwxrwx 2 root   root    1024 Nov 18 05:33 d83
> -rw-rw-rw- 1 root   root       0 Nov 18 05:06 fb4
> -rw-rw-rw- 1 root   root 3350138 Nov 18 05:33 fb9
> ?--------- ? ?      ?          ?            ? l71
> lrwxrwxrwx 1 root   root     509 Nov 18 05:23 ld9 -> xxxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxxx/xxxxxxxx
> [root@llm19 tmp]# 
> 
> dmesg gives:
> 
> EXT4-fs error (device sdb1): ext4_free_inode: bit already cleared for inode 168449
> 
> 
> Some other message i got before. But i didn't capture the info fully 
> 
> a) "Deleting nonexistent file ..." warning in ext4_unlink
> 
> b) "Empty directory has too many links..." in ext4_rmdir
> 


  reply	other threads:[~2008-11-21 17:41 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 16:44 [PATCH -V2 1/5] ext4: Remove unneeded code Aneesh Kumar K.V
2008-11-21 16:44 ` [PATCH -V2 2/5] ext4: unlock group before ext4_error Aneesh Kumar K.V
2008-11-21 16:44   ` [PATCH -V2 3/5] ext4: Fix the race between read_block_bitmap and mark_diskspace_used Aneesh Kumar K.V
2008-11-21 16:44     ` [PATCH -V2 4/5] ext4: Use both hi and lo bits of the group desc values Aneesh Kumar K.V
2008-11-21 16:44       ` [PATCH -V2 5/5] ext4: Fix the race between read_inode_bitmap and ext4_new_inode Aneesh Kumar K.V
2008-11-21 17:30         ` Eric Sandeen
2008-11-23 19:26         ` Theodore Tso
2008-11-24  4:05         ` Theodore Tso
2008-11-24 11:15           ` Aneesh Kumar K.V
2008-11-21 17:29       ` [PATCH -V2 4/5] ext4: Use both hi and lo bits of the group desc values Eric Sandeen
2008-11-21 17:41         ` Aneesh Kumar K.V
2008-11-21 17:53           ` Eric Sandeen
2008-11-23  4:09             ` Andreas Dilger
2008-11-24  1:21               ` Theodore Tso
2008-11-24  2:13           ` Theodore Tso
2008-11-24 10:38             ` Aneesh Kumar K.V
2008-11-21 17:22     ` [PATCH -V2 3/5] ext4: Fix the race between read_block_bitmap and mark_diskspace_used Eric Sandeen
2008-11-21 17:31       ` Aneesh Kumar K.V
2008-11-21 17:39         ` Aneesh Kumar K.V
2008-11-21 17:40           ` Eric Sandeen [this message]
2008-11-21 17:39         ` Eric Sandeen
2008-11-23 19:02         ` Theodore Tso
2008-11-24  6:40           ` Aneesh Kumar K.V
2008-11-23 14:00     ` Theodore Tso
2008-11-24  7:14       ` Alex Zhuravlev
2008-11-24 11:33         ` Aneesh Kumar K.V
2008-11-24 16:36           ` Alex Zhuravlev
2008-11-24 16:43             ` Aneesh Kumar K.V
2008-11-24 18:03               ` Alex Zhuravlev
2008-11-24 18:12                 ` Aneesh Kumar K.V
2008-11-24 18:17                   ` Alex Zhuravlev
2008-11-24 18:21                     ` Aneesh Kumar K.V
2008-11-24 18:28                       ` Alex Zhuravlev
2008-11-24 18:41                       ` Alex Zhuravlev
2008-11-25 14:29           ` Frédéric Bohé
2008-11-25 16:38             ` Alex Zhuravlev
2008-11-23 13:37   ` [PATCH -V2 2/5] ext4: unlock group before ext4_error Theodore Tso
2008-11-23 13:43     ` Theodore Tso
2008-11-23 13:59       ` Aneesh Kumar K.V
2008-11-21 17:20 ` [PATCH -V2 1/5] ext4: Remove unneeded code Eric Sandeen

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=4926F2A0.2050406@redhat.com \
    --to=sandeen@redhat.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.