From patchwork Mon Apr 4 19:11:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 89699 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8A74AB6F91 for ; Tue, 5 Apr 2011 05:11:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755127Ab1DDTLy (ORCPT ); Mon, 4 Apr 2011 15:11:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47812 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754682Ab1DDTLy (ORCPT ); Mon, 4 Apr 2011 15:11:54 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p34JBrHO004115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 4 Apr 2011 15:11:53 -0400 Received: from Liberator-563.local (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p34JBq3p027453 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 4 Apr 2011 15:11:52 -0400 Message-ID: <4D9A17F8.4000406@redhat.com> Date: Mon, 04 Apr 2011 15:11:52 -0400 From: Eric Sandeen User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: ext4 development CC: Zeev Tarantov Subject: [PATCH] e2fsprogs: don't set stripe/stride to 1 block in mkfs X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Block devices may set minimum or optimal IO hints equal to blocksize; in this case there is really nothing for ext4 to do with this information (i.e. search for a block-aligned allocation?) so don't set fs geometry with single-block values. Zeev also reported that with a block-sized stripe, the ext4 allocator spends time spinning in ext4_mb_scan_aligned(), oddly enough. Reported-by: Zeev Tarantov Signed-off-by: Eric Sandeen --- -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 9798b88..74b838c 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1135,8 +1135,11 @@ static int get_device_geometry(const char *file, if ((opt_io == 0) && (psector_size > blocksize)) opt_io = psector_size; - fs_param->s_raid_stride = min_io / blocksize; - fs_param->s_raid_stripe_width = opt_io / blocksize; + /* setting stripe/stride to blocksize is pointless */ + if (min_io > blocksize) + fs_param->s_raid_stride = min_io / blocksize; + if (opt_io > blocksize) + fs_param->s_raid_stripe_width = opt_io / blocksize; rc = blkid_topology_get_alignment_offset(tp); out: