Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjFvV-0001LA-TS for qemu-devel@nongnu.org; Fri, 26 Sep 2008 12:12:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjFvU-0001If-RR for qemu-devel@nongnu.org; Fri, 26 Sep 2008 12:12:16 -0400 Received: from [199.232.76.173] (port=46684 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjFvU-0001IN-0d for qemu-devel@nongnu.org; Fri, 26 Sep 2008 12:12:16 -0400 Received: from savannah.gnu.org ([199.232.41.3]:42473 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KjFvT-0006Ci-TT for qemu-devel@nongnu.org; Fri, 26 Sep 2008 12:12:16 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KjFvS-0003CF-Uy for qemu-devel@nongnu.org; Fri, 26 Sep 2008 16:12:15 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KjFvS-0003C8-Nj for qemu-devel@nongnu.org; Fri, 26 Sep 2008 16:12:14 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 26 Sep 2008 16:12:14 +0000 Subject: [Qemu-devel] [5325] Really fix the BSD build this time Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5325 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5325 Author: aliguori Date: 2008-09-26 16:12:14 +0000 (Fri, 26 Sep 2008) Log Message: ----------- Really fix the BSD build this time struct aioinit isn't defined on BSD it appears so we need to guard everything in an #if defined(__linux__). Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/block-raw-posix.c Modified: trunk/block-raw-posix.c =================================================================== --- trunk/block-raw-posix.c 2008-09-26 16:04:40 UTC (rev 5324) +++ trunk/block-raw-posix.c 2008-09-26 16:12:14 UTC (rev 5325) @@ -569,7 +569,6 @@ { sigset_t mask; PosixAioState *s; - struct aioinit ai; if (posix_aio_state) return 0; @@ -590,18 +589,24 @@ qemu_aio_set_fd_handler(s->fd, posix_aio_read, NULL, posix_aio_flush, s); - memset(&ai, 0, sizeof(ai)); -#if !defined(__linux__) || (defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 4)) - ai.aio_threads = 5; - ai.aio_num = 1; +#if defined(__linux__) + { + struct aioinit ai; + + memset(&ai, 0, sizeof(ai)); +#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 4) + ai.aio_threads = 64; + ai.aio_num = 64; #else - /* XXX: aio thread exit seems to hang on RedHat 9 and this init - seems to fix the problem. */ - ai.aio_threads = 1; - ai.aio_num = 1; - ai.aio_idle_time = 365 * 100000; + /* XXX: aio thread exit seems to hang on RedHat 9 and this init + seems to fix the problem. */ + ai.aio_threads = 1; + ai.aio_num = 1; + ai.aio_idle_time = 365 * 100000; #endif - aio_init(&ai); + aio_init(&ai); + } +#endif posix_aio_state = s; return 0;