]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ext4: use correct criteria name instead stale integer number in comment
authorKemeng Shi <shikemeng@huaweicloud.com>
Wed, 24 Apr 2024 06:19:03 +0000 (14:19 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 May 2024 04:12:32 +0000 (00:12 -0400)
Use correct criteria name instead stale integer number in comment

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240424061904.987525-5-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/mballoc.c
fs/ext4/mballoc.h

index 8d126654019ef96e2d2b1f803773a5095f6d0879..983dad8c07ecd1b4123c2217d0e7b22b7b7519cd 100644 (file)
@@ -213,11 +213,14 @@ enum criteria {
 #define EXT4_MB_USE_RESERVED           0x2000
 /* Do strict check for free blocks while retrying block allocation */
 #define EXT4_MB_STRICT_CHECK           0x4000
-/* Large fragment size list lookup succeeded at least once for cr = 0 */
+/* Large fragment size list lookup succeeded at least once for
+ * CR_POWER2_ALIGNED */
 #define EXT4_MB_CR_POWER2_ALIGNED_OPTIMIZED            0x8000
-/* Avg fragment size rb tree lookup succeeded at least once for cr = 1 */
+/* Avg fragment size rb tree lookup succeeded at least once for
+ * CR_GOAL_LEN_FAST */
 #define EXT4_MB_CR_GOAL_LEN_FAST_OPTIMIZED             0x00010000
-/* Avg fragment size rb tree lookup succeeded at least once for cr = 1.5 */
+/* Avg fragment size rb tree lookup succeeded at least once for
+ * CR_BEST_AVAIL_LEN */
 #define EXT4_MB_CR_BEST_AVAIL_LEN_OPTIMIZED            0x00020000
 
 struct ext4_allocation_request {
index 9a2b0bd0dcbc62b4b3e3c9dc208f61cc7359a8f4..65ce2dd0cefb73debb98e59d7135c1329c20f4a1 100644 (file)
@@ -1135,8 +1135,9 @@ static void ext4_mb_choose_next_group(struct ext4_allocation_context *ac,
                ext4_mb_choose_next_group_best_avail(ac, new_cr, group);
        } else {
                /*
-                * TODO: For CR=2, we can arrange groups in an rb tree sorted by
-                * bb_free. But until that happens, we should never come here.
+                * TODO: For CR_GOAL_LEN_SLOW, we can arrange groups in an
+                * rb tree sorted by bb_free. But until that happens, we should
+                * never come here.
                 */
                WARN_ON(1);
        }
@@ -2683,7 +2684,7 @@ static int ext4_mb_good_group_nolock(struct ext4_allocation_context *ac,
                int ret;
 
                /*
-                * cr=CR_POWER2_ALIGNED/CR_GOAL_LEN_FAST is a very optimistic
+                * CR_POWER2_ALIGNED/CR_GOAL_LEN_FAST is a very optimistic
                 * search to find large good chunks almost for free. If buddy
                 * data is not ready, then this optimization makes no sense. But
                 * we never skip the first block group in a flex_bg, since this
@@ -3448,10 +3449,11 @@ static int ext4_mb_init_backend(struct super_block *sb)
        }
        if (sbi->s_mb_prefetch > ext4_get_groups_count(sb))
                sbi->s_mb_prefetch = ext4_get_groups_count(sb);
-       /* now many real IOs to prefetch within a single allocation at cr=0
-        * given cr=0 is an CPU-related optimization we shouldn't try to
-        * load too many groups, at some point we should start to use what
-        * we've got in memory.
+       /*
+        * now many real IOs to prefetch within a single allocation at
+        * CR_POWER2_ALIGNED. Given CR_POWER2_ALIGNED is an CPU-related
+        * optimization we shouldn't try to load too many groups, at some point
+        * we should start to use what we've got in memory.
         * with an average random access time 5ms, it'd take a second to get
         * 200 groups (* N with flex_bg), so let's make this limit 4
         */
index 7bfc5fb5a1285b3c5e9998fd4413723986784bc7..7ee13d8eecd7910c49b10894c6a52d334098a982 100644 (file)
@@ -187,8 +187,8 @@ struct ext4_allocation_context {
        struct ext4_free_extent ac_f_ex;
 
        /*
-        * goal len can change in CR1.5, so save the original len. This is
-        * used while adjusting the PA window and for accounting.
+        * goal len can change in CR_BEST_AVAIL_LEN, so save the original len.
+        * This is used while adjusting the PA window and for accounting.
         */
        ext4_grpblk_t   ac_orig_goal_len;