Skip to content
Commit 8b010acb authored by Wang Jianchao's avatar Wang Jianchao Committed by Chandan Babu R
Browse files

xfs: use roundup_pow_of_two instead of ffs during xlog_find_tail



In our production environment, we find that mounting a 500M /boot
which is umount cleanly needs ~6s. One cause is that ffs() is
used by xlog_write_log_records() to decide the buffer size. It
can cause a lot of small IO easily when xlog_clear_stale_blocks()
needs to wrap around the end of log area and log head block is
not power of two. Things are similar in xlog_find_verify_cycle().

The code is able to handed bigger buffer very well, we can use
roundup_pow_of_two() to replace ffs() directly to avoid small
and sychronous IOs.

Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarWang Jianchao <wangjc136@midea.com>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent 1155b12e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment