Message ID | 20181127135030.1671-5-i.maximets@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C15F13BB for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 27 Nov 2018 14:07:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89A6F28735 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 27 Nov 2018 14:07:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DD2E28AD9; Tue, 27 Nov 2018 14:07:26 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 8096828735 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 27 Nov 2018 14:07:25 +0000 (UTC) Received: from localhost ([::1]:42598 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1gRe1M-0008HN-Nb for patchwork-qemu-devel@patchwork.kernel.org; Tue, 27 Nov 2018 09:07:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <i.maximets@samsung.com>) id 1gRdlh-0002bl-5A for qemu-devel@nongnu.org; Tue, 27 Nov 2018 08:51:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <i.maximets@samsung.com>) id 1gRdlc-0000XZ-RQ for qemu-devel@nongnu.org; Tue, 27 Nov 2018 08:51:13 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:51237) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <i.maximets@samsung.com>) id 1gRdlc-0000Wd-Kc for qemu-devel@nongnu.org; Tue, 27 Nov 2018 08:51:08 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20181127135107euoutp02ffe370c8134f9759dc5fc0461961b33a~q-21uOOKj2313823138euoutp02W for <qemu-devel@nongnu.org>; Tue, 27 Nov 2018 13:51:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181127135107euoutp02ffe370c8134f9759dc5fc0461961b33a~q-21uOOKj2313823138euoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543326667; bh=w4Jv8ksWorck56mIfI6cvuADBi/bwNFiq1e9hNPUSn4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Apzxyxmnwpg0fsi0l9lpQPBBcMtEXKMkGk0nRCkbqaHwLOTdXunAA6o1MLzw6o2UW lqDpCv4IjRAzELy252JICjb9G/eFGPcfhkP/MiKSE7CcZs2vi0s2PgporgB45h170g XKULyVWttZiFdDBLKRej8qGQUbdXnvmMjBpcTFuo= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20181127135107eucas1p226b728235aebcd19f1edd6058553f01f~q-21GPsFx0501505015eucas1p2T; Tue, 27 Nov 2018 13:51:07 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 00.53.04806.ACB4DFB5; Tue, 27 Nov 2018 13:51:06 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20181127135106eucas1p119ab7de9758f13ea52adc0f4829ab9cb~q-20ahf7s1194811948eucas1p11; Tue, 27 Nov 2018 13:51:06 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20181127135106eusmtrp1fda39c624463860bc16f2066d2e13afa~q-20X88IC2190321903eusmtrp1i; Tue, 27 Nov 2018 13:51:06 +0000 (GMT) X-AuditID: cbfec7f5-34dff700000012c6-d3-5bfd4bca7160 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FB.20.04128.ACB4DFB5; Tue, 27 Nov 2018 13:51:06 +0000 (GMT) Received: from imaximets.rnd.samsung.ru (unknown [106.109.129.180]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20181127135105eusmtip1d64635d542c4e935514d139723e67db7~q-2z2J6cc1872818728eusmtip1K; Tue, 27 Nov 2018 13:51:05 +0000 (GMT) From: Ilya Maximets <i.maximets@samsung.com> To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com> Date: Tue, 27 Nov 2018 16:50:30 +0300 Message-Id: <20181127135030.1671-5-i.maximets@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181127135030.1671-1-i.maximets@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCKsWRmVeSWpSXmKPExsWy7djP87qnvP9GG3QdNLJouBdqcaX9J7vF 6aMdzBbPbp1ktljQ1s5qsX/bP1aL4707WBzYPZ5c28zk8X7fVTaPvi2rGAOYo7hsUlJzMstS i/TtErgy/r/qYC+4wVXRcsaogfEZexcjB4eEgIlEf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gNkiAm4SLx4cBytiFrjPKHFs01SwqcICphILfn5iAbFZBFQlrnZPANvMK2Al sby3DeoKeYnVGw4wg9icAtYS3/8tgbrISuLTgVdsEPWCEidnPgGawwG0QF1i/TwhkDAzUGvz 1tnMExgFZyGpmoVQNQtJ1QJG5lWMIqmlxbnpucVGesWJucWleel6yfm5mxiBsbLt2M8tOxi7 3gUfYhTgYFTi4d3w/Xe0EGtiWXFl7iFGCQ5mJRFeZ+W/0UK8KYmVValF+fFFpTmpxYcYTYFe m8gsJZqcD4zjvJJ4Q1NDcwtLQ3Njc2MzCyVx3vMGlVFCAumJJanZqakFqUUwfUwcnFINjFqO a6YKH00R3cv33KHQLMPyRPbCc9fasrzqL9c+MLI6Jq576mFe0EO37W9kbrRwLMg4GPJSWDvl ovHjKZoNVj92fXu1y3DdrmmyHq6GrMvfSdXI2RYEeDnd+rzhyvHXHxwyX+56P/ugStajz2fe bTk59cI+8S2PlXRktl31+DZ3Wp1RYYS9ZKISS3FGoqEWc1FxIgCtUztzqwIAAA== X-CMS-MailID: 20181127135106eucas1p119ab7de9758f13ea52adc0f4829ab9cb X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20181127135106eucas1p119ab7de9758f13ea52adc0f4829ab9cb X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20181127135106eucas1p119ab7de9758f13ea52adc0f4829ab9cb References: <20181127135030.1671-1-i.maximets@samsung.com> <CGME20181127135106eucas1p119ab7de9758f13ea52adc0f4829ab9cb@eucas1p1.samsung.com> Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 210.118.77.12 Subject: [Qemu-devel] [PATCH v2 4/4] memfd: improve error messages X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Ilya Maximets <i.maximets@samsung.com>, Paolo Bonzini <pbonzini@redhat.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series | memfd fixes. | expand |
diff --git a/util/memfd.c b/util/memfd.c index 393d23da96..00334e5b21 100644 --- a/util/memfd.c +++ b/util/memfd.c @@ -71,14 +71,18 @@ int qemu_memfd_create(const char *name, size_t size, bool hugetlb, } mfd = memfd_create(name, flags); if (mfd < 0) { + error_setg_errno(errp, errno, + "failed to create memfd with flags 0x%x", flags); goto err; } if (ftruncate(mfd, size) == -1) { + error_setg_errno(errp, errno, "failed to resize memfd to %zu", size); goto err; } if (seals && fcntl(mfd, F_ADD_SEALS, seals) == -1) { + error_setg_errno(errp, errno, "failed to add seals 0x%x", seals); goto err; } @@ -88,8 +92,9 @@ err: if (mfd >= 0) { close(mfd); } +#else + error_setg_errno(errp, ENOSYS, "failed to create memfd"); #endif - error_setg_errno(errp, errno, "failed to create memfd"); return -1; }