From nobody Sat May 4 09:21:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1495090449930179.98897569753547; Wed, 17 May 2017 23:54:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46C118124D; Thu, 18 May 2017 06:54:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 148CA5C552; Thu, 18 May 2017 06:54:08 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BA47A180BAF2; Thu, 18 May 2017 06:54:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4I6rftt003330 for ; Thu, 18 May 2017 02:53:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5F41617172; Thu, 18 May 2017 06:53:41 +0000 (UTC) Received: from moe.brq.redhat.com (dhcp129-131.brq.redhat.com [10.34.129.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB2725C546 for ; Thu, 18 May 2017 06:53:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 46C118124D Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 46C118124D From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 18 May 2017 08:53:35 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] news: Document sparse streams X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 18 May 2017 06:54:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik --- docs/news.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4cf14b0d5..52915ee2e 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,16 @@
+ + + Improved streams to efficiently transfer sparseness + + + New extension to virStream was implemented so that + virStorageVolDownload and virStorageVolUpload can preserve file + sparseness. + +
--=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 09:21:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1495090454626476.2399359528679; Wed, 17 May 2017 23:54:14 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EE56E80C0B; Thu, 18 May 2017 06:54:12 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C098D18115; Thu, 18 May 2017 06:54:12 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 63F104A48D; Thu, 18 May 2017 06:54:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4I6rgJL003338 for ; Thu, 18 May 2017 02:53:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 32D5917172; Thu, 18 May 2017 06:53:42 +0000 (UTC) Received: from moe.brq.redhat.com (dhcp129-131.brq.redhat.com [10.34.129.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABC3A5C546 for ; Thu, 18 May 2017 06:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EE56E80C0B Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EE56E80C0B From: Michal Privoznik To: libvir-list@redhat.com Date: Thu, 18 May 2017 08:53:36 +0200 Message-Id: <8020cbed240f42dcf2e435bb41e9f81607d2f50c.1495090371.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] virStream: Forbid negative seeks X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 18 May 2017 06:54:13 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Currently, we don't assign any meaning to that. Our current view on virStream is that it's merely a pipe. And pipes don't support seeking. Signed-off-by: Michal Privoznik --- src/internal.h | 7 +++++++ src/rpc/virnetclientstream.c | 1 + src/util/virfdstream.c | 1 + 3 files changed, 9 insertions(+) diff --git a/src/internal.h b/src/internal.h index 5a5a430a2..9e7ef553d 100644 --- a/src/internal.h +++ b/src/internal.h @@ -527,6 +527,13 @@ goto label; \ } \ } while (0) +# define virCheckPositiveArgReturn(argname, retval) \ + do { \ + if (argname <=3D 0) { \ + virReportInvalidPositiveArg(argname); \ + return retval; \ + } \ + } while (0) # define virCheckNonZeroArgGoto(argname, label) \ do { \ if (argname =3D=3D 0) { \ diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c index 7b28d63db..a9bf271dc 100644 --- a/src/rpc/virnetclientstream.c +++ b/src/rpc/virnetclientstream.c @@ -367,6 +367,7 @@ virNetClientStreamSetHole(virNetClientStreamPtr st, unsigned int flags) { virCheckFlags(0, -1); + virCheckPositiveArgReturn(length, -1); =20 /* Shouldn't happen, But it's better to safe than sorry. */ if (st->holeLength) { diff --git a/src/util/virfdstream.c b/src/util/virfdstream.c index 6870d8846..7ee58be13 100644 --- a/src/util/virfdstream.c +++ b/src/util/virfdstream.c @@ -950,6 +950,7 @@ virFDStreamSendHole(virStreamPtr st, int ret =3D -1; =20 virCheckFlags(0, -1); + virCheckPositiveArgReturn(length, -1); =20 virObjectLock(fdst); if (fdst->length) { --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list