]> www.infradead.org Git - linux.git/commit
ext4: add new attr pointer attr_mb_order
authorBaokun Li <libaokun1@huawei.com>
Tue, 19 Mar 2024 11:33:21 +0000 (19:33 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 May 2024 03:48:30 +0000 (23:48 -0400)
commitb7b2a5799b8fafe95fcd5455c32ba2c643c86f99
treeace7ef46cfc467b8f08b699aaf0649236a09d559
parent13df4d44a3aaabe61cd01d277b6ee23ead2a5206
ext4: add new attr pointer attr_mb_order

The s_mb_best_avail_max_trim_order is of type unsigned int, and has a
range of values well beyond the normal use of the mb_order. Although the
mballoc code is careful enough that large numbers don't matter there, but
this can mislead the sysadmin into thinking that it's normal to set such
values. Hence add a new attr_id attr_mb_order with values in the range
[0, 64] to avoid storing garbage values and make us more resilient to
surprises in the future.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240319113325.3110393-6-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/sysfs.c