[Ocfs2-devel] [PATCH v2 5/5] ocfs2: rewrite error handling of ocfs2_fill_super
Joseph Qi
joseph.qi at linux.alibaba.com
Thu Apr 14 01:47:42 UTC 2022
On 4/13/22 9:11 PM, Heming Zhao wrote:
> On Wed, Apr 13, 2022 at 07:37:59PM +0800, Joseph Qi wrote:
>> It mostly looks good to me.
>> Have you done error injection test after this patchset applied?
>> I'm afraid ocfs2-test can't cover this as of now.
>>
>
> I plan to write a debugfs api for error injection test.
> The code only for these patches test
>
> My idea:
> echo N > /sys/kernel/debug/ocfs2/xxx/error
> N: 1,2,3,4,...
>
> "echo N" will make ocfs2 trigger Nth error point become true:
>
> ```
> status = ocfs2_initialize_super(sb, bh, sector_size, &stats);
> brelse(bh);
> bh = NULL;
> - if (status < 0)
> + if (error_inject(n)) //eg. "echo 1 > xx" will trigger there "if()" becomes true.
> goto out;
> ```
>
> What's your opinion about my idea?
> Or do you have other method to test?
Good idea, actually we did it in this way before since existing
fault-injection can only inject common failures such as slab allocation.
Thanks,
Joseph
More information about the Ocfs2-devel
mailing list