Re: [PATCH] ext4: Check for non-zero journal inum in ext4_calculate_overhead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/16/20 4:30 AM, Ritesh Harjani wrote:
> While calculating overhead for internal journal, also check
> that j_inum shouldn't be 0. Otherwise we get below error with
> xfstests generic/050 with external journal (XXX_LOGDEV config) enabled.
> 
> It could be simply reproduced with loop device with an external journal
> and marking blockdev as RO before mounting.
> 
> [ 3337.146838] EXT4-fs error (device pmem1p2): ext4_get_journal_inode:4634: comm mount: inode #0: comm mount: iget: illegal inode #
> ------------[ cut here ]------------
> generic_make_request: Trying to write to read-only block-device pmem1p2 (partno 2)

I think this 2nd error comes from:

static void save_error_info(struct super_block *sb, const char *func,
                            unsigned int line)
{
        __save_error_info(sb, func, line);
        ext4_commit_super(sb, 1);
}

__save_error_info() returns if bdev_read_only() but then we try to commit the super
anyway.  Shouldn't save_error_info() return early if bdev_read_only()?

(that'd be a separate patch, I'll send it)

-Eric




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux