From patchwork Mon Jul 29 12:16:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 18630 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5CF73248D1 for ; Mon, 29 Jul 2013 12:16:47 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id bv4sf3592790qab.4 for ; Mon, 29 Jul 2013 05:16:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=6e0/jFEYsxqEn/rlU1YDW5Ga1gnFfE+0J4OHpLI+LhY=; b=lMnDoP+7lAD9kHfGFB0ZtlO2B8jQYaNQhIZ7RxtUyLN9DoymMswr2BvuZ6dp0mnqYC oCvcQdSv7Re2OgqyGXzx9ZEZwpW2dPGsBzIOGOvZOTkgRC2cRjNjX35v5Or+mPxE/EFG vYB+5hzVgGBTPPWUQWO87D4VLNahiS0nWhyjOde4ECfhQMqjWMzAnmC52okBOTKltzZr LHGZk/3tCH4Xisu6MszJhzaAi4ZFzSQtF8hQpgrm8+UTKZsFHf/9ilVMIzGR+Xp5TQAC D6aXyhgKY2bEhJ5JWI3UYzsWZr+Hoz45kkXeKGJsW59YdV6/poRx34Yb1exIwPPRr6+s Dn/g== X-Received: by 10.236.169.196 with SMTP id n44mr31252847yhl.9.1375100206962; Mon, 29 Jul 2013 05:16:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.138 with SMTP id u10ls1972833qef.75.gmail; Mon, 29 Jul 2013 05:16:46 -0700 (PDT) X-Received: by 10.220.182.193 with SMTP id cd1mr8528909vcb.32.1375100206861; Mon, 29 Jul 2013 05:16:46 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id c8si5522468vcf.17.2013.07.29.05.16.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:16:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id w15so2725070vbf.7 for ; Mon, 29 Jul 2013 05:16:46 -0700 (PDT) X-Received: by 10.52.164.16 with SMTP id ym16mr21128143vdb.32.1375100206768; Mon, 29 Jul 2013 05:16:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp113244vcb; Mon, 29 Jul 2013 05:16:46 -0700 (PDT) X-Received: by 10.14.211.134 with SMTP id w6mr8742404eeo.26.1375100205050; Mon, 29 Jul 2013 05:16:45 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id w4si7439984eex.117.2013.07.29.05.16.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:16:45 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1V3mNT-0003dH-6E; Mon, 29 Jul 2013 13:16:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Anthony Liguori , Alexander Graf , Kevin Wolf , Stefan Hajnoczi , Richard Henderson , Paolo Bonzini , qemu-ppc@nongnu.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH 1/4] block/sheepdog: Rename 'dprintf' to 'DPRINTF' Date: Mon, 29 Jul 2013 13:16:36 +0100 Message-Id: <1375100199-13934-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1375100199-13934-1-git-send-email-peter.maydell@linaro.org> References: <1375100199-13934-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQl7i8m+JSO2NknTOw2Anc5r8iy0jLimP5G4dP7KpHYrxffXeg6/GHANakQUo32U8VmB5M07 X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 'dprintf' is the name of a POSIX standard function so we should not be stealing it for our debug macro. Rename to 'DPRINTF' (in line with a number of other source files.) Signed-off-by: Peter Maydell Acked-by: Kevin Wolf Reviewed-by: MORITA Kazutaka --- block/sheepdog.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 6a41ad9..a506137 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -242,14 +242,14 @@ static inline bool is_snapshot(struct SheepdogInode *inode) return !!inode->snap_ctime; } -#undef dprintf +#undef DPRINTF #ifdef DEBUG_SDOG -#define dprintf(fmt, args...) \ +#define DPRINTF(fmt, args...) \ do { \ fprintf(stdout, "%s %d: " fmt, __func__, __LINE__, ##args); \ } while (0) #else -#define dprintf(fmt, args...) +#define DPRINTF(fmt, args...) #endif typedef struct SheepdogAIOCB SheepdogAIOCB; @@ -729,7 +729,7 @@ static void coroutine_fn aio_read_response(void *opaque) break; case AIOCB_FLUSH_CACHE: if (rsp.result == SD_RES_INVALID_PARMS) { - dprintf("disable cache since the server doesn't support it\n"); + DPRINTF("disable cache since the server doesn't support it\n"); s->cache_flags = SD_FLAG_CMD_DIRECT; rsp.result = SD_RES_SUCCESS; } @@ -1229,7 +1229,7 @@ static int coroutine_fn resend_aioreq(BDRVSheepdogState *s, AIOReq *aio_req) * the same object */ QLIST_FOREACH(areq, &s->inflight_aio_head, aio_siblings) { if (areq != aio_req && areq->oid == aio_req->oid) { - dprintf("simultaneous CoW to %" PRIx64 "\n", aio_req->oid); + DPRINTF("simultaneous CoW to %" PRIx64 "\n", aio_req->oid); QLIST_REMOVE(aio_req, aio_siblings); QLIST_INSERT_HEAD(&s->pending_aio_head, aio_req, aio_siblings); return SD_RES_SUCCESS; @@ -1319,7 +1319,7 @@ static int sd_open(BlockDriverState *bs, QDict *options, int flags) s->discard_supported = true; if (snapid || tag[0] != '\0') { - dprintf("%" PRIx32 " snapshot inode was open.\n", vid); + DPRINTF("%" PRIx32 " snapshot inode was open.\n", vid); s->is_snapshot = true; } @@ -1554,7 +1554,7 @@ static void sd_close(BlockDriverState *bs) unsigned int wlen, rlen = 0; int fd, ret; - dprintf("%s\n", s->name); + DPRINTF("%s\n", s->name); fd = connect_to_sdog(s); if (fd < 0) { @@ -1714,7 +1714,7 @@ static int sd_create_branch(BDRVSheepdogState *s) char *buf; bool deleted; - dprintf("%" PRIx32 " is snapshot.\n", s->inode.vdi_id); + DPRINTF("%" PRIx32 " is snapshot.\n", s->inode.vdi_id); buf = g_malloc(SD_INODE_SIZE); @@ -1730,7 +1730,7 @@ static int sd_create_branch(BDRVSheepdogState *s) goto out; } - dprintf("%" PRIx32 " is created.\n", vid); + DPRINTF("%" PRIx32 " is created.\n", vid); fd = connect_to_sdog(s); if (fd < 0) { @@ -1751,7 +1751,7 @@ static int sd_create_branch(BDRVSheepdogState *s) s->is_snapshot = false; ret = 0; - dprintf("%" PRIx32 " was newly created.\n", s->inode.vdi_id); + DPRINTF("%" PRIx32 " was newly created.\n", s->inode.vdi_id); out: g_free(buf); @@ -1841,11 +1841,11 @@ static int coroutine_fn sd_co_rw_vector(void *p) } if (create) { - dprintf("update ino (%" PRIu32 ") %" PRIu64 " %" PRIu64 " %ld\n", + DPRINTF("update ino (%" PRIu32 ") %" PRIu64 " %" PRIu64 " %ld\n", inode->vdi_id, oid, vid_to_data_oid(inode->data_vdi_id[idx], idx), idx); oid = vid_to_data_oid(inode->vdi_id, idx); - dprintf("new oid %" PRIx64 "\n", oid); + DPRINTF("new oid %" PRIx64 "\n", oid); } aio_req = alloc_aio_req(s, acb, oid, len, offset, flags, old_oid, done); @@ -1978,7 +1978,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) SheepdogInode *inode; unsigned int datalen; - dprintf("sn_info: name %s id_str %s s: name %s vm_state_size %" PRId64 " " + DPRINTF("sn_info: name %s id_str %s s: name %s vm_state_size %" PRId64 " " "is_snapshot %d\n", sn_info->name, sn_info->id_str, s->name, sn_info->vm_state_size, s->is_snapshot); @@ -1989,7 +1989,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) return -EINVAL; } - dprintf("%s %s\n", sn_info->name, sn_info->id_str); + DPRINTF("%s %s\n", sn_info->name, sn_info->id_str); s->inode.vm_state_size = sn_info->vm_state_size; s->inode.vm_clock_nsec = sn_info->vm_clock_nsec; @@ -2033,7 +2033,7 @@ static int sd_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info) } memcpy(&s->inode, inode, datalen); - dprintf("s->inode: name %s snap_id %x oid %x\n", + DPRINTF("s->inode: name %s snap_id %x oid %x\n", s->inode.name, s->inode.snap_id, s->inode.vdi_id); cleanup: