From nobody Mon Feb 9 03:58:25 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1527816980609373.8787203262501; Thu, 31 May 2018 18:36:20 -0700 (PDT) Received: from localhost ([::1]:46927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOYzI-0000dm-AM for importer@patchew.org; Thu, 31 May 2018 21:36:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOYr6-00037F-8B for qemu-devel@nongnu.org; Thu, 31 May 2018 21:27:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOYr5-00039i-D3 for qemu-devel@nongnu.org; Thu, 31 May 2018 21:27:48 -0400 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]:44371) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOYr5-00039J-7z for qemu-devel@nongnu.org; Thu, 31 May 2018 21:27:47 -0400 Received: by mail-qt0-x241.google.com with SMTP id d3-v6so30268765qtp.11 for ; Thu, 31 May 2018 18:27:47 -0700 (PDT) Received: from localhost.localdomain (96-86-104-61-static.hfc.comcastbusiness.net. [96.86.104.61]) by smtp.gmail.com with ESMTPSA id o68-v6sm2003842qkc.19.2018.05.31.18.27.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 31 May 2018 18:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=ewYMITy0s7pdZUhT4+HJW5Ikyi4LpGRALIJtRDylmoA=; b=VEyLW/JO17407WG2KcSRkM7gCXO3inPf3mFB/igfYGgaTQijRWtj/uKhE8amThI/JL OUw6dLMhwnQlzGN2E2YCiSplP1uZVMZPM9F3vK4G3wc4rX5VgOBYxjMiGkF5gioG6ktX C4x12CnIP2H+d2u9qYEEaK3Mp1sCaEwUf7a3mlJEOq2Zl/uhoIMdUvnXsqVkcom7hmlO buboNvjBMIJYcyR5r/EfXBXHhNItvSbMTsxcSpZ/WnR2MpQ2fT7d23hKrS3M/40mCQj+ Lv4sPesxOPCHnBaBvU8AfzXtQPicw4LdeZ8pcgmZnztPmOdljjCGnLMXE6ZsnTjQBI8v bTUg== 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:in-reply-to :references:in-reply-to:references; bh=ewYMITy0s7pdZUhT4+HJW5Ikyi4LpGRALIJtRDylmoA=; b=iWN5DHIAF5XLpmN4HCFDIwPwwODt6ZbNXBB1bokXlFcUghc6rf0CXCe1xE78l/CoyE oqeFO49dLyv1McQ6o8NmJMUQ6bgOhVMBmAdhEx2hatTJpwnbCtto6WJGTcmVaw+sxine T4mbv89GKe1SkPQvYYEiEj8wAEeLeLLk7X2qYMmv/TM2wVkdCjAHKyh553OiwE30rS7M Sse6DjCvQH5xGVoFnYDNSxS9uUzu20DQy3cIyXP0bYryKM6A6AwLQj8yUiJVRqxKeJFC bNFWyIIkVy/HYg5dBYulY256+g2XVjq4fowZCnJNzIP23+cDlpdBo2Eo4KxVqNEIwXDx oIZQ== X-Gm-Message-State: APt69E0NkbJtXYmZxkb+i4BCOx6yBkX48MMRjEPsaLkfnzbroSc5ZhT6 jzDTx+QpCoORdmT4UT4gsMtqf4CpTJU= X-Google-Smtp-Source: ADUXVKL3qY2l+LAcnFFg1ozuq0UzZh/OsfFlmgS/EhZySqr32L1J3vbbEgTRXmJWPxYPNpt3/eadeg== X-Received: by 2002:ac8:2b4e:: with SMTP id 14-v6mr3415746qtv.412.1527816466403; Thu, 31 May 2018 18:27:46 -0700 (PDT) From: Keno Fischer To: qemu-devel@nongnu.org Date: Thu, 31 May 2018 21:26:08 -0400 Message-Id: X-Mailer: git-send-email 2.8.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::241 Subject: [Qemu-devel] [PATCH v2 13/20] 9p: darwin: Ignore O_{NOATIME, DIRECT} 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: Keno Fischer , groug@kaod.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Darwin doesn't have either of these flags. Darwin does have F_NOCACHE, which is similar to O_DIRECT, but has different enough semantics that other projects don't generally map them automatically. In any case, we don't support O_DIRECT on Linux at the moment either. Signed-off-by: Keno Fischer --- Changes from v1: Undo accidental formatting change hw/9pfs/9p.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 9751246..70cfab9 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -123,11 +123,18 @@ static int dotl_to_open_flags(int flags) { P9_DOTL_NONBLOCK, O_NONBLOCK } , { P9_DOTL_DSYNC, O_DSYNC }, { P9_DOTL_FASYNC, FASYNC }, +#ifndef CONFIG_DARWIN + { P9_DOTL_NOATIME, O_NOATIME }, + /* On Darwin, we could map to F_NOCACHE, which is + similar, but doesn't quite have the same + semantics. However, we don't support O_DIRECT + even on linux at the moment, so we just ignore + it here. */ { P9_DOTL_DIRECT, O_DIRECT }, +#endif { P9_DOTL_LARGEFILE, O_LARGEFILE }, { P9_DOTL_DIRECTORY, O_DIRECTORY }, { P9_DOTL_NOFOLLOW, O_NOFOLLOW }, - { P9_DOTL_NOATIME, O_NOATIME }, { P9_DOTL_SYNC, O_SYNC }, }; =20 @@ -156,10 +163,12 @@ static int get_dotl_openflags(V9fsState *s, int oflag= s) */ flags =3D dotl_to_open_flags(oflags); flags &=3D ~(O_NOCTTY | O_ASYNC | O_CREAT); +#ifndef CONFIG_DARWIN /* * Ignore direct disk access hint until the server supports it. */ flags &=3D ~O_DIRECT; +#endif return flags; } =20 --=20 2.8.1