From patchwork Tue Jul 4 08:40:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manos Pitsidianakis X-Patchwork-Id: 9824335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F52560237 for ; Tue, 4 Jul 2017 08:44:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3EDBA26E55 for ; Tue, 4 Jul 2017 08:44:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3376D27F3E; Tue, 4 Jul 2017 08:44:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE7B926E55 for ; Tue, 4 Jul 2017 08:44:31 +0000 (UTC) Received: from localhost ([::1]:39492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSJRe-0004jV-RD for patchwork-qemu-devel@patchwork.kernel.org; Tue, 04 Jul 2017 04:44:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSJOr-0002uo-Qg for qemu-devel@nongnu.org; Tue, 04 Jul 2017 04:41:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSJOr-0004qM-1p for qemu-devel@nongnu.org; Tue, 04 Jul 2017 04:41:37 -0400 Received: from smtp1.ntua.gr ([2001:648:2000:de::183]:33552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSJOo-0004ok-Pr; Tue, 04 Jul 2017 04:41:35 -0400 Received: from mail.ntua.gr (ppp005055127131.access.hol.gr [5.55.127.131]) (authenticated bits=0) by smtp1.ntua.gr (8.15.2/8.15.2) with ESMTPSA id v648fVlF051844 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 4 Jul 2017 11:41:31 +0300 (EEST) (envelope-from el13635@mail.ntua.gr) X-Authentication-Warning: smtp1.ntua.gr: Host ppp005055127131.access.hol.gr [5.55.127.131] claimed to be mail.ntua.gr From: Manos Pitsidianakis To: qemu-devel Date: Tue, 4 Jul 2017 11:40:58 +0300 Message-Id: <20170704084059.6278-4-el13635@mail.ntua.gr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170704084059.6278-1-el13635@mail.ntua.gr> References: <20170704084059.6278-1-el13635@mail.ntua.gr> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:648:2000:de::183 Subject: [Qemu-devel] [PATCH v3 3/4] block: Remove bdrv_truncate callback in blkdebug X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alberto Garcia , qemu-block , Max Reitz , Stefan Hajnoczi Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Now that bdrv_truncate is passed to bs->file by default, remove the callback from block/blkdebug.c Signed-off-by: Manos Pitsidianakis --- block/blkdebug.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index b25856c4..5e118e10 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -821,11 +821,6 @@ static int64_t blkdebug_getlength(BlockDriverState *bs) return bdrv_getlength(bs->file->bs); } -static int blkdebug_truncate(BlockDriverState *bs, int64_t offset, Error **errp) -{ - return bdrv_truncate(bs->file, offset, errp); -} - static void blkdebug_refresh_filename(BlockDriverState *bs, QDict *options) { BDRVBlkdebugState *s = bs->opaque; @@ -916,7 +911,6 @@ static BlockDriver bdrv_blkdebug = { .bdrv_child_perm = bdrv_filter_default_perms, .bdrv_getlength = blkdebug_getlength, - .bdrv_truncate = blkdebug_truncate, .bdrv_refresh_filename = blkdebug_refresh_filename, .bdrv_refresh_limits = blkdebug_refresh_limits,