Skip to content

Commit a37376f

Browse files
Tiezhu YangJonathan Corbet
authored andcommitted
Documentation: fix wrong value in md.txt
In the current Documentation/md.txt, the lower limit value of stripe_cache_size is 16 and the default value is 128, but when I update kernel to the latest mainline version and RAID5 array is created by mdadm, then execute the following commands, it shows an error and a difference respectively. 1) set stripe_cache_size to 16 [root@localhost ~]# echo 16 > /sys/block/md0/md/stripe_cache_size bash: echo: write error: Invalid argument 2) read the default value of stripe_cache_size [root@localhost ~]# cat /sys/block/md0/md/stripe_cache_size 256 I read drivers/md/raid5.c and find the following related code: 1) in function 'raid5_set_cache_size': if (size <= 16 || size > 32768) return -EINVAL; 2) #define NR_STRIPES 256 So the lower limit value of stripe_cache_size should be 17 and the default value should be 256. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
1 parent c0b8c9a commit a37376f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/md.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ These currently include
602602

603603
stripe_cache_size (currently raid5 only)
604604
number of entries in the stripe cache. This is writable, but
605-
there are upper and lower limits (32768, 16). Default is 128.
605+
there are upper and lower limits (32768, 17). Default is 256.
606606
strip_cache_active (currently raid5 only)
607607
number of active entries in the stripe cache
608608
preread_bypass_threshold (currently raid5 only)

0 commit comments

Comments
 (0)