Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550525

Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy

From "zhangyi (F)" <yi.zhang@huawei.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy
Date 2017-01-04 10:00 +0100
Message-ID <sVPAl-2hI-3@gated-at.bofh.it> (permalink)
References <sSCJk-4Nn-25@gated-at.bofh.it> <sUAN4-vE-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2017/1/1 6:59, Valdis.Kletnieks@vt.edu said:
> On Mon, 26 Dec 2016 20:34:17 +0800, yi zhang said:
>> Because of the disk and hardware issue, the ext4 filesystem have
>> many errors, the inode->i_nlink of ext4 becomes zero abnormally
>> but the dentry is still positive, it will cause memory corruption
>> after the following process:
>>
>>  1) Due to the inode->i_nlink is 0, this inode will be added into
>> the orhpan list,
> 
>> +	if (WARN(inode->i_nlink == 0, "inode %lu nlink"
>> +		" is already 0", inode->i_ino))
> 
> Can we get the filesystem? Or at least the device major/minor? If a system
> has multiple large ext4 filesystems, it would be helpful to know which
> one is having the problem.
> 

        if (WARN(inode->i_nlink == 0,
-               "inode %lu nlink is already 0", inode->i_ino))
+               "inode %lu nlink is already 0, dev=%u:%u",
+               inode->i_ino, MAJOR(inode->i_sb->s_dev), MINOR(inode->i_sb->s_dev)))
                return;

We can modify as above, it's enough to know which filesystem is having the
problem, what do you think?

yi zhang

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "zhangyi (F)" <yi.zhang@huawei.com> - 2017-01-04 10:00 +0100
  Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy Andreas Dilger <adilger@dilger.ca> - 2017-01-04 23:10 +0100
  Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-01-05 00:00 +0100
    Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy Theodore Ts'o <tytso@mit.edu> - 2017-01-05 00:40 +0100
      Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "zhangyi (F)" <yi.zhang@huawei.com> - 2017-01-05 08:30 +0100
        Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "Darrick J. Wong" <darrick.wong@oracle.com> - 2017-01-05 19:50 +0100
      Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "zhangyi (F)" <yi.zhang@huawei.com> - 2017-01-11 10:10 +0100
        Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy Theodore Ts'o <tytso@mit.edu> - 2017-01-11 16:40 +0100
          Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "zhangyi (F)" <yi.zhang@huawei.com> - 2017-01-12 09:10 +0100
            Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy Theodore Ts'o <tytso@mit.edu> - 2017-01-12 18:10 +0100
              Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy Al Viro <viro@ZenIV.linux.org.uk> - 2017-01-13 04:50 +0100
                Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy Theodore Ts'o <tytso@mit.edu> - 2017-01-13 15:30 +0100
          Re: [RFC PATCH] ext4: increase the protection of drop nlink and ext4  inode destroy "zhangyi (F)" <yi.zhang@huawei.com> - 2017-01-16 04:30 +0100

csiph-web