lkml.org 
[lkml]   [2017]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] ext4: increase the protection of drop nlink and ext4 inode destroy
From
Date
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

\
 
 \ /
  Last update: 2017-01-04 09:53    [W:0.103 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site