From nobody Fri Nov 7 00:47:20 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1544629349824703.225319892841; Wed, 12 Dec 2018 07:42:29 -0800 (PST) Received: from localhost ([::1]:45654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX6eS-0007WN-R3 for importer@patchew.org; Wed, 12 Dec 2018 10:42:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX6Ma-0000ri-Rs for qemu-devel@nongnu.org; Wed, 12 Dec 2018 10:23:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX6MZ-0000HI-1v for qemu-devel@nongnu.org; Wed, 12 Dec 2018 10:23:52 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:54624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gX6MY-0008TD-C1 for qemu-devel@nongnu.org; Wed, 12 Dec 2018 10:23:50 -0500 Received: by mail-wm1-x329.google.com with SMTP id a62so6178136wmh.4 for ; Wed, 12 Dec 2018 07:23:33 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id u10sm15878859wrr.33.2018.12.12.07.23.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Dec 2018 07:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=9bD4vF/SlqiZQomVw94Gxcz7amk2GbQ9PdomFkHSTsc=; b=izM05tTo3TPRAbVC/bM3IC4Fv5aOoCF3lpMJROZWxfzYKvcayfad+7mUrcWx97lb9K /jRVwccJPgzdE7uZ/mNdcqxWxYlvbyp3L4mT3JOnjh8GTjwky6zNCVDVpVNyaTUt0L00 NQuWep9MQGIHMmeFMgJNv0J/Gm1HOvibiY2d83w+y+gFspdDCaMEtRRtcUygo2bk9cfH iVwBpSJwkXLNhw+BP9KoB1B35T4OohSiYdVoVTEPeMFxuJpUnkbg17ToTGSDIoS04qmp awTkgIwZmUkZuMoTA0NTWGA7SXbhuktY5dvy1t3uQFVl1s/LWMaqJaAPNnkYLYr63SHQ 1vvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=9bD4vF/SlqiZQomVw94Gxcz7amk2GbQ9PdomFkHSTsc=; b=IP5XqP9aWmwc57jQ/pba6SgOJSnpSb/UFaxl2VJWJ2YJ7o895kqwCLYo2YRtX2BA4a t66Ne5gRaCkwFHYNOY453zyel5ROluT4wCGFnAOEFdoNoxjiNTcLs8tkO+0o7GX2aUZ/ Er8yHyiI7SfI7LFTYbxlbNQZvLOO9huIXuY2HAXe34T6+4aLi5Xeed4VWuTGiOB88hD9 XgwbBrSkPy9BWGZQYvij6ibF3zcoayzNbyPZgaXBDqZCFeNAuz6u84WKTl2wzNSO+X3d ZWtKUzY7vYafVtGbY5O57ETpbjeOmPneQl7qU76GhjX0CpwXQx7AdtpImovO5lGkamzm VmZA== X-Gm-Message-State: AA+aEWZwm9UJSpNgBzGgJ+aI0pRqbDMGlqOu5H2RpUpdNliYgE3R5vRm 5dC/l6xJxwl+FgA27HVai/KQfVFa X-Google-Smtp-Source: AFSGD/WTH4zRvEEmI2635Gc4++Izqi/7Qz3VwX5prvyYCP9yfu5lPd+/rwCgp12SDhhUub3bTbfYfQ== X-Received: by 2002:a1c:d988:: with SMTP id q130mr7073051wmg.41.1544628212229; Wed, 12 Dec 2018 07:23:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 16:22:33 +0100 Message-Id: <1544628195-37728-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1544628195-37728-1-git-send-email-pbonzini@redhat.com> References: <1544628195-37728-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 Subject: [Qemu-devel] [PULL 12/54] block/iscsi: drop unused IscsiAIOCB->buf field 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: Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Stefan Hajnoczi The IscsiAIOCB->buf field has not been used since commit e49ab19fcaa617ad6cdfe1ac401327326b6a2552 ("block/iscsi: bump libiscsi requirement to 1.9.0"). It used to be a linear buffer for old libiscsi versions that didn't support scatter-gather. The minimum libiscsi version supports scatter-gather so we don't linearize buffers anymore. Signed-off-by: Stefan Hajnoczi Message-Id: <20180203061621.7033-2-stefanha@redhat.com> Reviewed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini --- block/iscsi.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 727dee5..a4e3730 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -117,7 +117,6 @@ typedef struct IscsiAIOCB { QEMUBH *bh; IscsiLun *iscsilun; struct scsi_task *task; - uint8_t *buf; int status; int64_t sector_num; int nb_sectors; @@ -150,9 +149,6 @@ iscsi_bh_cb(void *p) =20 qemu_bh_delete(acb->bh); =20 - g_free(acb->buf); - acb->buf =3D NULL; - acb->common.cb(acb->common.opaque, acb->status); =20 if (acb->task !=3D NULL) { @@ -933,9 +929,6 @@ iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int sta= tus, { IscsiAIOCB *acb =3D opaque; =20 - g_free(acb->buf); - acb->buf =3D NULL; - acb->status =3D 0; if (status < 0) { error_report("Failed to ioctl(SG_IO) to iSCSI lun. %s", @@ -1010,7 +1003,6 @@ static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *= bs, acb->iscsilun =3D iscsilun; acb->bh =3D NULL; acb->status =3D -EINPROGRESS; - acb->buf =3D NULL; acb->ioh =3D buf; =20 if (req !=3D SG_IO) { --=20 1.8.3.1