From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:adf:e804:0:0:0:0:0 with SMTP id o4csp1168425wrm; Wed, 9 Oct 2019 09:51:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi2G23KFq3759fEUiudQJMF8E02g8uVw1XifKjIAM8sU6FSCz1oFKobGSEDzB2uOPFKRDO X-Received: by 2002:ac8:3969:: with SMTP id t38mr4677372qtb.253.1570639876059; Wed, 09 Oct 2019 09:51:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570639876; cv=none; d=google.com; s=arc-20160816; b=FMDeANBEV6udTVZqgSbVVFfmuRmjUiDwkjlU/TO1TIxK3lSYSVECwYxC7or81M6xwj V1phsTFQmBRuLka9xxP3/uaJfv62wfCO5jPWYB3j+0OdQXwOOtewi/b4fFv8Hr5mzweJ Js7fX+cr5ZFmjkTYX5X0jOYIeqN7aPwe8ja1YLemGytmmeMm1Oo1h5xfRy6Mzwq+oCoY 0PJWqQUEEjcuzdoNUv9JmcgcEjPpbcH4gf0XwMl5Hc2l/rJSo1weJ39rXN/dTTX487b2 1lIk+55cCzzZk4oE1NLA7zZHpHq2yROeVg0aUps38qRJFphYMp3CtSQtPz9VMxhwb9OV 7ndA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:in-reply-to:date:references:subject:to:from; bh=v75+jnEfOse9zmwlvibFyc/1RxtshGuF+Sww9XesKBs=; b=ktBkfOtPh0fKYzhii2TdyQ3xEtqAuRtpHQ0vkSQz6LHnVmhXKsJ+JBX3bLIYcUt8RU 24EnDvS/+1lmuANfVHsB3ZjbXZj1MNE67Kv0ODFRPKWAwcxM+P3CpVMNpA8T8YDq6y2g OwNfC37LHAV7jAdS+yCZcJit0AU8DxV5wTVyY6h5PQXyPmgTSdMDUPNG4DcY5Sz7mbaM geoDRXANGMyNUtGUCVqeqHOIZYE2nIDtH8X4BYlHBI3AJsYVIkF0Ff5Q8NEQJPq0zQV6 vJ2q4zyf7RxKfz77+fDie7wVi7ODhRASz9QJltcV0bj6qMebmHZ+z9wAVGDO1S6g5pQx NZNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y50si2542831qtb.20.2019.10.09.09.51.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Oct 2019 09:51:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:52548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIFBD-0006vI-60 for alex.bennee@linaro.org; Wed, 09 Oct 2019 12:51:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43266) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iI6xm-0004P6-1j for qemu-arm@nongnu.org; Wed, 09 Oct 2019 04:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iI6xk-0005Ks-0P for qemu-arm@nongnu.org; Wed, 09 Oct 2019 04:04:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53818) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iI6xi-0005KS-Ay; Wed, 09 Oct 2019 04:04:47 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E0EE6308FB82; Wed, 9 Oct 2019 08:04:44 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.36.118.123]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5D25A60605; Wed, 9 Oct 2019 08:04:26 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id BC6CA1138619; Wed, 9 Oct 2019 10:04:24 +0200 (CEST) From: Markus Armbruster To: Vladimir Sementsov-Ogievskiy Subject: Re: [PATCH v4 04/31] error: auto propagated local_err References: <20191001155319.8066-1-vsementsov@virtuozzo.com> <20191001155319.8066-5-vsementsov@virtuozzo.com> Date: Wed, 09 Oct 2019 10:04:24 +0200 In-Reply-To: <20191001155319.8066-5-vsementsov@virtuozzo.com> (Vladimir Sementsov-Ogievskiy's message of "Tue, 1 Oct 2019 18:52:52 +0300") Message-ID: <87r23m8hvb.fsf@dusky.pond.sub.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 09 Oct 2019 08:04:45 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fam@euphon.net, pburton@wavecomp.com, peter.maydell@linaro.org, codyprime@gmail.com, jasowang@redhat.com, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, kraxel@redhat.com, mreitz@redhat.com, qemu-block@nongnu.org, quintela@redhat.com, arikalo@wavecomp.com, mst@redhat.com, mdroth@linux.vnet.ibm.com, pasic@linux.ibm.com, borntraeger@de.ibm.com, joel@jms.id.au, marcandre.lureau@redhat.com, david@gibson.dropbear.id.au, farman@linux.ibm.com, ehabkost@redhat.com, sw@weilnetz.de, groug@kaod.org, yuval.shaia@oracle.com, dgilbert@redhat.com, alex.williamson@redhat.com, qemu-arm@nongnu.org, clg@kaod.org, stefanha@redhat.com, david@redhat.com, jsnow@redhat.com, rth@twiddle.net, kwolf@redhat.com, integration@gluster.org, berrange@redhat.com, andrew@aj.id.au, cohuck@redhat.com, qemu-s390x@nongnu.org, sundeep.lkml@gmail.com, qemu-ppc@nongnu.org, pbonzini@redhat.com Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: Rq+9uJ+anh5I Vladimir Sementsov-Ogievskiy writes: > Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of > functions with errp OUT parameter. > > It has three goals: > > 1. Fix issue with error_fatal & error_prepend/error_append_hint: user > can't see this additional information, because exit() happens in > error_setg earlier than information is added. [Reported by Greg Kurz] Done in PATCH 07-31. > 2. Fix issue with error_abort & error_propagate: when we wrap > error_abort by local_err+error_propagate, resulting coredump will > refer to error_propagate and not to the place where error happened. > (the macro itself doesn't fix the issue, but it allows to [3.] drop all > local_err+error_propagate pattern, which will definitely fix the issue) > [Reported by Kevin Wolf] > > 3. Drop local_err+error_propagate pattern, which is used to workaround > void functions with errp parameter, when caller wants to know resulting > status. (Note: actually these functions could be merely updated to > return int error code). Not done. Can you prototype this part? A few manually done examples would give us an idea how the complete solution would look like. A (semi-)automated complete conversion of a subsystem would additionally give us an idea how to actually do the conversion. We can discuss applying ERRP_AUTO_PROPAGATE() as a bug fix for 1., and leave 2. and 3. for later. Feels like a half-done job to me. We've got too many of those in the tree already. Dunno.