We can't remove stack from depot, as we store them contiguously one after
another in a contiguous memory allocation.
Or we can limit the recorded stack number.
$ grep -nr "SBI_NEED_FSCK" fs/f2fs/ --include=*.c --include=*.h | wc -l
53
$ grep -nr "f2fs_bug_on" fs/f2fs/ --include=*.c --include=*.h | wc -l
135
I didn't look into details of stack_depot_save(), two stack handles from below
call paths will be the same?
- move_data_block
- f2fs_wait_on_page_writeback
- f2fs_bug_on
- ra_data_block
- f2fs_wait_on_page_writeback
- f2fs_bug_on
If they have different stack handles, combination number of
set_sbi_flag(NEED_FSCK)/f2fs_bug_on and their callers will be far more than two
hundred.
Yes, these will be two different stacks. In the most extreme case, there will be 1000 (I guess) different places to set fsck?
Or we limit the number of recorded stacks to 10?
what do you think. The stack depot design does not consider removing the stack from the depot.
MBR,
Yangtao