From patchwork Mon Aug 31 14:01:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nir Soffer X-Patchwork-Id: 11746405 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CF948161F for ; Mon, 31 Aug 2020 14:02:25 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A329D2083E for ; Mon, 31 Aug 2020 14:02:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XU+QaOYK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A329D2083E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:48776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCkO8-0002WI-NE for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Aug 2020 10:02:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCkNN-0001Xx-5u; Mon, 31 Aug 2020 10:01:38 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCkNK-0005RU-Ha; Mon, 31 Aug 2020 10:01:36 -0400 Received: by mail-wr1-x441.google.com with SMTP id w13so6063353wrk.5; Mon, 31 Aug 2020 07:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7WoK5JiGHWMfthNji8W9QYpbqPAt2/gvWfZDQR/2dMk=; b=XU+QaOYKuNCBKV7H6opsn5eYM0qEmiNh+IFghcd5WuUsxQpf+LQ5+d7ZBLpZY06cnE w22SBGlpTIHnBqCWw/JbrhFK/RObtMc/UvnZoeHlgaRMz6qVdE4XN08RXxVP6Iq4M6p+ WSvbBFIJfgNT+Y24LqprGhP68Na0y/jRv6w+lOAwDBdj6dzxxalXPnnZD8WYgE6gZSoy 2Muu+4Z/CN4nbwOIz3g/IH6o7khGlHCuJLSlHYOdl0ZbJ/782M2J2s1rFiluCeHSX9m6 uckmf1z9aak1AdiEm9oGBSC+jnRiFVbn/J2ZrIMyJbwBt97DfPJH7zYEcjD/WiI1pbaZ m4OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7WoK5JiGHWMfthNji8W9QYpbqPAt2/gvWfZDQR/2dMk=; b=k3N5ahiySQ80JgeOkRo12TszA1RxnbyNW/LP45XrS2fIsXHV6o1MZ7LFu0WNG1zPGV uFyKTkv81X0s+mFXR57NeiuDHFHxEkH6fcX1Magh7cbct/G7UMdXKCGbaFEEhcjL/pRN DqeFdwInuoSsQKLMYJkGt/ktrtHEAIekoDfSMdbM/iMvxIYvHW9/xtANW1g3IHcmhSu8 oSSAyzTGbrpEB0hsAUrryi3BXU+Tebrr5GTBzrdJmFxx5h00gwrFdsY/oBxRkoydVGPs DEig06RtbxG8CySl1dvlgd2UBVCubQT+tEb8xTLIq+xU/UYEQNoqdozH61bdIzD/WEdG tOhg== X-Gm-Message-State: AOAM533T7tM5KKbfiWN8ayO3LbXdtvINQZ7g/PjQLPlqn35D/28xOPNQ qe/KtGVz3gqlTcQov7OI279Panqkl4qqTbEH X-Google-Smtp-Source: ABdhPJx29/s6XEwgC2LXQLQo8p773iRGCzZPm5BYw3la5k/g8CbuR4IOVvwYOLZ8ERK5iyLu9agU9g== X-Received: by 2002:adf:c58c:: with SMTP id m12mr1754034wrg.88.1598882491578; Mon, 31 Aug 2020 07:01:31 -0700 (PDT) Received: from localhost.localdomain (109-186-204-55.bb.netvision.net.il. [109.186.204.55]) by smtp.gmail.com with ESMTPSA id q192sm12413320wme.13.2020.08.31.07.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 07:01:30 -0700 (PDT) From: Nir Soffer X-Google-Original-From: Nir Soffer To: qemu-devel@nongnu.org Subject: [PATCH 0/2] Replace posix_fallocate() with falloate() Date: Mon, 31 Aug 2020 17:01:25 +0300 Message-Id: <20200831140127.657134-1-nsoffer@redhat.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=nirsof@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Markus Armbruster , Max Reitz , Nir Soffer Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Change preallocation=falloc to use fallocate() instead of posix_fallocte(), improving performance when legacy filesystem that do not support fallocate, and avoiding issues seen with OFD locks. More work is needed to respect cache mode when using full preallocation and maybe optimize buffer size. Continuing the discussion at: https://lists.nongnu.org/archive/html/qemu-block/2020-08/msg00947.html Nir Soffer (2): block: file-posix: Extract preallocate helpers block: file-posix: Replace posix_fallocate with fallocate block/file-posix.c | 202 ++++++++++++++----------- docs/system/qemu-block-drivers.rst.inc | 11 +- docs/tools/qemu-img.rst | 11 +- qapi/block-core.json | 4 +- 4 files changed, 127 insertions(+), 101 deletions(-)