From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933500AbcFQCKu (ORCPT ); Thu, 16 Jun 2016 22:10:50 -0400 Received: from m15-62.126.com ([220.181.15.62]:45294 "EHLO m15-62.126.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933443AbcFQCKr (ORCPT ); Thu, 16 Jun 2016 22:10:47 -0400 X-Greylist: delayed 1832 seconds by postgrey-1.27 at vger.kernel.org; Thu, 16 Jun 2016 22:10:46 EDT X-Originating-IP: [101.254.155.114] Date: Fri, 17 Jun 2016 09:40:02 +0800 (CST) From: "Tiezhu Yang" To: corbet@lwn.net, shli@kernel.org Cc: linux-doc@vger.kernel.org, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Documentation: fix wrong value in md.txt X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20160420(83524.8626) Copyright (c) 2002-2016 www.mailtech.cn 126com Content-Type: text/plain; charset=GBK MIME-Version: 1.0 Message-ID: <2b0cf4c2.21fa.1555c03d3e9.Coremail.kernelpatch@126.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: PsqowADXqnrzVGNX+_EVAA--.55306W X-CM-SenderInfo: xnhu0vxosd3ubk6rjloofrz/1tbiXBGJ9VR0cZvR3wABs0 X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u5H2AtdW005840 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 --- 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