From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: [PATCH] qemu-dm: Fix Raw Block IO Debug Print Date: Fri, 14 Sep 2007 10:32:46 +0900 Message-ID: <46E9E4BE.1030408@ab.jp.nec.com> References: <46E90FBF.6060802@ab.jp.nec.com> <20070913110235.GG2700%yamahata@valinux.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060906020402070200050402" Return-path: In-Reply-To: <20070913110235.GG2700%yamahata@valinux.co.jp> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Isaku Yamahata , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------060906020402070200050402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Isaku Yamahata wrote: > On Thu, Sep 13, 2007 at 07:23:59PM +0900, Yosuke Iwamatsu wrote: >> Hi, >> >> This is a trivial fix for debug print formats of raw block io. >> Without this patch, qemu-dm occasionally gets stuck >> when a raw io device is inaccessible (eg. CR-ROM doesn't exist). > > Hi. > PRId64 should be used for int64_t instead of lld. > Thank you for the comment. Attached is a revised patch. Regards, ------------------- Yosuke Iwamatsu NEC Corporation --------------060906020402070200050402 Content-Type: text/plain; name="fix_block_raw_print_r1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix_block_raw_print_r1.patch" # HG changeset patch # User Yosuke Iwamatsu # Date 1189733245 -32400 # Node ID 0b5035b9e80ac8371269dc6b8a59cd4122d46f1f # Parent a00cc97b392a8e845f26f05817ffe1edcf8878d6 qemu-dm: fix block-raw io debug print Signed-off-by: Yosuke Iwamatsu diff -r a00cc97b392a -r 0b5035b9e80a tools/ioemu/block-raw.c --- a/tools/ioemu/block-raw.c Wed Sep 12 09:43:33 2007 +0100 +++ b/tools/ioemu/block-raw.c Fri Sep 14 10:27:25 2007 +0900 @@ -150,7 +150,7 @@ static int raw_pread(BlockDriverState *b if (lseek(s->fd, offset, SEEK_SET) == (off_t)-1) { ++(s->lseek_err_cnt); if(s->lseek_err_cnt <= 10) { - DEBUG_BLOCK_PRINT("raw_pread(%d:%s, %ld, %p, %d) [%ld] lseek failed : %d = %s\n", + DEBUG_BLOCK_PRINT("raw_pread(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] lseek failed : %d = %s\n", s->fd, bs->filename, offset, @@ -166,7 +166,7 @@ static int raw_pread(BlockDriverState *b if (ret == count) goto label__raw_read__success; - DEBUG_BLOCK_PRINT("raw_read(%d:%s, %ld, %p, %d) [%ld] read failed %d : %d = %s\n", + DEBUG_BLOCK_PRINT("raw_read(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] read failed %d : %d = %s\n", s->fd, bs->filename, offset, @@ -185,7 +185,7 @@ static int raw_pread(BlockDriverState *b if (ret == count) goto label__raw_read__success; - DEBUG_BLOCK_PRINT("raw_read(%d:%s, %ld, %p, %d) [%ld] retry read failed %d : %d = %s\n", + DEBUG_BLOCK_PRINT("raw_read(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] retry read failed %d : %d = %s\n", s->fd, bs->filename, offset, @@ -215,7 +215,7 @@ static int raw_pwrite(BlockDriverState * if (lseek(s->fd, offset, SEEK_SET) == (off_t)-1) { ++(s->lseek_err_cnt); if(s->lseek_err_cnt) { - DEBUG_BLOCK_PRINT("raw_write(%d:%s, %ld, %p, %d) [%ld] lseek failed : %d = %s\n", + DEBUG_BLOCK_PRINT("raw_write(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] lseek failed : %d = %s\n", s->fd, bs->filename, offset, @@ -231,7 +231,7 @@ static int raw_pwrite(BlockDriverState * if (ret == count) goto label__raw_write__success; - DEBUG_BLOCK_PRINT("raw_write(%d:%s, %ld, %p, %d) [%ld] write failed %d : %d = %s\n", + DEBUG_BLOCK_PRINT("raw_write(%d:%s, %" PRId64 ", %p, %d) [%" PRId64 "] write failed %d : %d = %s\n", s->fd, bs->filename, offset, --------------060906020402070200050402 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------060906020402070200050402--