[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200319043639.C505752050@d06av21.portsmouth.uk.ibm.com>
Date: Thu, 19 Mar 2020 10:06:38 +0530
From: Ritesh Harjani <riteshh@...ux.ibm.com>
To: Eric Sandeen <sandeen@...deen.net>, linux-ext4@...r.kernel.org
Cc: tytso@....edu, jack@...e.cz, adilger.kernel@...ger.ca,
linux-fsdevel@...r.kernel.org, Harish Sriram <harish@...ux.ibm.com>
Subject: Re: [PATCH] ext4: Check for non-zero journal inum in
ext4_calculate_overhead
On 3/18/20 11:57 PM, Eric Sandeen wrote:
> 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)
Thanks. Sounds good to me.
>
> -Eric
>
Powered by blists - more mailing lists