From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51859 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OcCmn-0003yv-Nq for qemu-devel@nongnu.org; Fri, 23 Jul 2010 03:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OcCmm-0006L6-52 for qemu-devel@nongnu.org; Fri, 23 Jul 2010 03:35:13 -0400 Received: from verein.lst.de ([213.95.11.210]:46258) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OcCml-0006KH-MS for qemu-devel@nongnu.org; Fri, 23 Jul 2010 03:35:12 -0400 Received: from verein.lst.de (localhost [127.0.0.1]) by verein.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id o6N7Z4WY028183 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 23 Jul 2010 09:35:04 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-7.2) id o6N7Z4YW028182 for qemu-devel@nongnu.org; Fri, 23 Jul 2010 09:35:04 +0200 Date: Fri, 23 Jul 2010 09:35:04 +0200 From: Christoph Hellwig Message-ID: <20100723073504.GA28166@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] block: default to 0 minimal / optiomal I/O size List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Currently we set them to 512 bytes unless manually specified. Unforuntaly some brain-dead partitioning tools create unaligned partitions if they get low enough optiomal I/O size values, so don't report any at all unless explicitly set. Signed-off-by: Christoph Hellwig Index: qemu/block_int.h =================================================================== --- qemu.orig/block_int.h 2010-07-23 09:26:07.660494681 +0200 +++ qemu/block_int.h 2010-07-23 09:26:20.323494685 +0200 @@ -243,7 +243,7 @@ static inline unsigned int get_physical_ _conf.logical_block_size, 512), \ DEFINE_PROP_UINT16("physical_block_size", _state, \ _conf.physical_block_size, 512), \ - DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 512), \ - DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 512) + DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0), \ + DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0) #endif /* BLOCK_INT_H */