Hi, After re-examining the update_sit_entry() logic and its callers, I realized that my assumption in the v2 patch was incorrect.
The value of del is strictly bounded in all valid call paths (either ±1 or -blocks_per_seg), and valid_blocks is already limited by f2fs_usable_blks_in_seg(). Therefore the arithmetic cannot overflow before the existing f2fs_bug_on() range check is executed. As a result, the overflow/underflow checks introduced in my patch are unnecessary. Please ignore this patch. Sorry for the noise, and thank you for your time. Best regards, Yao Xiao _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
