From nobody Mon Feb 9 03:52:27 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 1529197216701455.00679366964243; Sat, 16 Jun 2018 18:00:16 -0700 (PDT) Received: from localhost ([::1]:53361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUM3B-0007Qc-Vt for importer@patchew.org; Sat, 16 Jun 2018 21:00:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUM0T-0005hp-0c for qemu-devel@nongnu.org; Sat, 16 Jun 2018 20:57:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUM0S-0003GC-6z for qemu-devel@nongnu.org; Sat, 16 Jun 2018 20:57:25 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:38513) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fUM0S-0003Fm-1h for qemu-devel@nongnu.org; Sat, 16 Jun 2018 20:57:24 -0400 Received: by mail-qk0-x244.google.com with SMTP id y4-v6so7674844qka.5 for ; Sat, 16 Jun 2018 17:57:23 -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 x21-v6sm7302186qto.2.2018.06.16.17.57.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 16 Jun 2018 17:57:22 -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=fPovA32VQtt2A9u9VWCYZSyi3kThCbyYmHRhyf1HCC0=; b=qNL37sZTBScBwciTCZsHvYl1vf5zNl+VGW2giqLiBAPYcRc9Eac4S81zK2CCXxMDXh /kSTvf2IPFWv+17F78WIq9B7bEY8eNX+RQw576C0zvrada56b5Qv4qpKpPUT+n79RX4T Mqx0Fa0dHcLuSbvf9Rg3nvsRUfpEb/ZZp95iBgFDkFA+ckXSxDNf5zGEDI36XQOnzWGQ AwllCsFR+wDiQeyqjvfRcb1afKtHxtFcjOP7SzZrTnjKMBiRCauAz1ltDBslo3Z0BBS8 cB7/nIbZPhgwANdu7KpgLz90Rfw4hMZtHsWUxRrFtkyE/wAb86HMBxhagfR9F1z+9rdR CROg== 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=fPovA32VQtt2A9u9VWCYZSyi3kThCbyYmHRhyf1HCC0=; b=DDB9A8KbSciXZ6PHJrIQrxjbVO1IFquKR+RHSr8UgWpbv8d36R/cauVxclBYL7B74I AqHJTb0jzA+zBmiEEr63No3PuOkD+sToUQ6wGRIf24fS01rExOPpBLJcK1eXKfuhJ2+9 SJBMjRLcTgK9+GwmxuZQjzBZ8K2ghhiytaqzbMTrAagJ0re0u4t8ZL9V/61xEbnn1sAQ GuMgmhHzuHlmae7yw/Hpq3qJbt9usOiytltxxP64GAyAtgebN4Qh4qxxHqrLHV5yCgm1 Qt7ykxhxZvPjDEycXu2SNKxyJmXirJR2ZHVtW3O/gFa+LH129WH72bd21mdTN0GxSRBv Bvqg== X-Gm-Message-State: APt69E3Un4SKkcL0MW/iJdJFH3NCfovXNMKFN1vgJv+x8AjpWzl4cQ0V OtQ0ywg4cKcGK7jMZvKKJqf1rb1txIc= X-Google-Smtp-Source: ADUXVKKMNveVcfLOvQXfUL2PlfatXMrN7/xd3ftUIdthx2vgmd9DGLT9msFpvyXNNkzAwJUwyVgMmw== X-Received: by 2002:ae9:d805:: with SMTP id u5-v6mr6050787qkf.13.1529197043199; Sat, 16 Jun 2018 17:57:23 -0700 (PDT) From: Keno Fischer To: qemu-devel@nongnu.org Date: Sat, 16 Jun 2018 20:56:50 -0400 Message-Id: <823a49a8771e3214dc953ed9d7facd02df3060e4.1529196703.git.keno@juliacomputing.com> 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:c09::244 Subject: [Qemu-devel] [PATCH v3 06/13] 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 Reviewed-by: Greg Kurz --- 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 06139c9..e650459 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