* [PATCH] Documentation: fix wrong value in md.txt
@ 2016-06-17 1:40 Tiezhu Yang
2016-06-23 14:08 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Tiezhu Yang @ 2016-06-17 1:40 UTC (permalink / raw)
To: corbet, shli; +Cc: linux-doc, linux-raid, linux-kernel
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 <kernelpatch@126.com>
---
Documentation/md.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/md.txt b/Documentation/md.txt
index 1a2ada4..d6e2fcf 100644
--- a/Documentation/md.txt
+++ b/Documentation/md.txt
@@ -602,7 +602,7 @@ These currently include
stripe_cache_size (currently raid5 only)
number of entries in the stripe cache. This is writable, but
- there are upper and lower limits (32768, 16). Default is 128.
+ there are upper and lower limits (32768, 17). Default is 256.
strip_cache_active (currently raid5 only)
number of active entries in the stripe cache
preread_bypass_threshold (currently raid5 only)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Documentation: fix wrong value in md.txt
2016-06-17 1:40 [PATCH] Documentation: fix wrong value in md.txt Tiezhu Yang
@ 2016-06-23 14:08 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2016-06-23 14:08 UTC (permalink / raw)
To: Tiezhu Yang; +Cc: shli, linux-doc, linux-raid, linux-kernel
On Fri, 17 Jun 2016 09:40:02 +0800 (CST)
"Tiezhu Yang" <kernelpatch@126.com> wrote:
> 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.
Applied to the docs tree, thanks.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-23 14:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 1:40 [PATCH] Documentation: fix wrong value in md.txt Tiezhu Yang
2016-06-23 14:08 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).