Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7422550ybn; Mon, 30 Sep 2019 13:41:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEdoAO08R7UHqPa58eZwkmqKnZ60+W/ep6EHuny+FW8Vq87+kxKcSPfRcInsMiLkerBoLS X-Received: by 2002:aa7:c6c6:: with SMTP id b6mr21701724eds.19.1569876104223; Mon, 30 Sep 2019 13:41:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1569876104; cv=pass; d=google.com; s=arc-20160816; b=tf5J9DLeZKuxK1/Q7s1bFxmWILRBzsvX1/6h48icV3+IiyO3tHk0pwMbUOQmlrR7my Syrxb8PcI4TL62onIDxLpgXJ5cmk70hblk4zSplqD9Lz0X8RugXq8HAvFihvWYsu+k6n JEVbkBeEj/eFLs7MqBAxnn/esGGis373nlt7G75D1O1I7j+c67CANOA6++l9CHhaGx80 ucE8W6nGiuojrpvJu16D7xDn7ABkVd6sifPQPZ9UgP1mvVeQxjhedaU1yN12IpFfAPdT k7GODoJkVQLqvApT1hF6No40sZcpoGmiTms4iy/qP67EgoE5ZeePrZ1b14765LS8cjcm N0mQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=8sXJu5WT75ph2ATR9nAKtvThcBFxjsZzJELz7+qc6b0=; b=X/jN7yH+TouUIBZuUgEGO5R+ZPrQgQmjMzsDgrM23D9i4AITsqwhuYSql+/W5vULLp tXZq/aj7U2iRNaCXEzxGXyjL5nvpLrDtgyg6mbNUmmLi9DSdORRzXmLREAQvbIQGwiCG lYmY0b07JxliM4S6OHfeV4OMdLGw1JFySAhcoxVh2p6zhfJ2dMWP/DAFHm/0ymQcPVb3 HCogDR3fBqshgpbyD4k7o/VbwTCKKZnTYbzMwahHo1yXbOgWXOoDbo29xrmKOhNlvKzd To9DAxSjdM/XmqpjXzKDgvT4PPC5tbmyrvecKteu8csOTRR8OqRKjjQ2KoFho7hxUrVK a2OQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hammerspace.com header.s=selector2 header.b=ek5K6wJ6; arc=pass (i=1 spf=pass spfdomain=hammerspace.com dkim=pass dkdomain=hammerspace.com dmarc=pass fromdomain=hammerspace.com); spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hammerspace.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n3si9135956edc.151.2019.09.30.13.41.08; Mon, 30 Sep 2019 13:41:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@hammerspace.com header.s=selector2 header.b=ek5K6wJ6; arc=pass (i=1 spf=pass spfdomain=hammerspace.com dkim=pass dkdomain=hammerspace.com dmarc=pass fromdomain=hammerspace.com); spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hammerspace.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727885AbfI3UhI (ORCPT + 99 others); Mon, 30 Sep 2019 16:37:08 -0400 Received: from mail-eopbgr800107.outbound.protection.outlook.com ([40.107.80.107]:23364 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726576AbfI3UhH (ORCPT ); Mon, 30 Sep 2019 16:37:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WWFIH4y7Cqkyl+X8cV1NJHzxozN/ltfpU+POhA2xTtS0Qp/7qWP4ZmEdkKMLB/V6ysgx1SzgCln6waGmeKvtR05J33LQ1+/yGXAAuzD1sJdsGsf1yeYiU6RNHdVLVzSusl+Yx51i/6ilbZ7srAcY85iuVIaHnUJSO5YIrbKMLbgHaogDFNzuCnQWm6HyDAyvirwhq3PWfnupqGfqPvlNImMTqZzo7WFqEb0KDEZe6DC8faF2dtiqzDfLGzu9Cro4ZXdBG7eaxY6RlkxhMApWrFaS/udOHDxZadTYDVYxaadhTKG4bEvXeanVJzpit/2oBvfjGoVWGPOBVqnlcdsEhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8sXJu5WT75ph2ATR9nAKtvThcBFxjsZzJELz7+qc6b0=; b=gRyxpmDgX6hlrz4YP1JWIlBdkxwh+lTopXlQ2SRy+3SLq0Lpew/tevxQOL5BNt6PUujw7iY76cknVM/3wxa7s7BDIBhYQByAfV0AvnUwsAKtgdjjGZmYCVPDXPXcnWHgBfezg6wcePtLC38PvrDq/QNL+zI6ZUX/uBzNAraBwOwWOjDFTUsE8PBEuDX3lezw1CpTAJiYbsCUj1HRj7/zq2BaLgy+T5rPncp307v2Dxps8nen1lFH0Z8SLccoTPgZh6kzQz1D+qhgJEHPreagS7szkqC3YEhOsJCAz9zzN2lBMlg/4GRRkZaSh+nwTxVvOpNcgDyHDk7mQk5jI4SyTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hammerspace.com; dmarc=pass action=none header.from=hammerspace.com; dkim=pass header.d=hammerspace.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hammerspace.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8sXJu5WT75ph2ATR9nAKtvThcBFxjsZzJELz7+qc6b0=; b=ek5K6wJ6uGyBIt8wpRNpNzF9GsTfvQGFdotMtmRUGZ75onaF41TS6H+IImPTyYh2F44LVg2gr/6fcmsNkm1WzxmOOk7G/87KpX3zWWAN8H2py5luCcIYzeFnEEVUwN0V9yQzWirpcZFzUB26xjEK+me5hbu6b6bDuL+38/qyNxQ= Received: from DM5PR13MB1851.namprd13.prod.outlook.com (10.171.159.143) by DM5PR13MB1035.namprd13.prod.outlook.com (10.168.239.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.7; Mon, 30 Sep 2019 18:06:00 +0000 Received: from DM5PR13MB1851.namprd13.prod.outlook.com ([fe80::d1be:764d:9347:764e]) by DM5PR13MB1851.namprd13.prod.outlook.com ([fe80::d1be:764d:9347:764e%10]) with mapi id 15.20.2305.017; Mon, 30 Sep 2019 18:06:00 +0000 From: Trond Myklebust To: "suyj.fnst@cn.fujitsu.com" CC: "linux-nfs@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] NFS: Fix O_DIRECT read problem when another write is going on Thread-Topic: [PATCH] NFS: Fix O_DIRECT read problem when another write is going on Thread-Index: AQHVd29ku8nD71E+VU+c3kukzbSbNqdEhIwA Date: Mon, 30 Sep 2019 18:06:00 +0000 Message-ID: References: <1569834678-16117-1-git-send-email-suyj.fnst@cn.fujitsu.com> In-Reply-To: <1569834678-16117-1-git-send-email-suyj.fnst@cn.fujitsu.com> Accept-Language: en-US, en-GB Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=trondmy@hammerspace.com; x-originating-ip: [68.40.189.247] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fc868fbd-3967-4606-93f7-08d745d0d99e X-MS-TrafficTypeDiagnostic: DM5PR13MB1035:|DM5PR13MB1035:|DM5PR13MB1035:|DM5PR13MB1035:|DM5PR13MB1035:|DM5PR13MB1035:|DM5PR13MB1035: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2331; x-forefront-prvs: 01762B0D64 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(39830400003)(366004)(346002)(376002)(189003)(199004)(64756008)(66476007)(316002)(66946007)(71190400001)(91956017)(486006)(8676002)(305945005)(14444005)(256004)(8936002)(76116006)(54906003)(81166006)(81156014)(102836004)(6246003)(5640700003)(6512007)(476003)(66556008)(66446008)(86362001)(7736002)(36756003)(71200400001)(6436002)(6916009)(4326008)(76176011)(118296001)(5660300002)(11346002)(2906002)(2501003)(6116002)(446003)(66066001)(2616005)(229853002)(6506007)(186003)(25786009)(99286004)(3846002)(26005)(6486002)(14454004)(478600001)(2351001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR13MB1035;H:DM5PR13MB1851.namprd13.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: hammerspace.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: K8HCzP/vug4UeVX5oyojimwMM6aLIqIPzwRgYVD3vMRzpGhizyUYBbVROIJB+wCJa0hYZRPAx2t2JYQPohPkFyv8vKl3zkcDlx1E1b87OcRLUXox2s2pNL9PKJZD4+rNuGV+d/gHjeApAZHyrOhiG34IDVfQi2jzvOs2qA7Vif0OfsQguuZlDXqCbhbFpCiNGIatYB7OpSuWbTYSbQLSF8bidOQVy4NLERTvzNwEaLYPlMXOWAOexJJpgHilDnZom8wG+6H9+AaeJk4maTbqPWTx/jbxD0jsAWhCmUQ/TCPrW1keDPO9mLk2dd7qaMCCirpfeKkhj/YDwPd/Ja0mwAjZnQAni+YwTeJgk/agWtljFaFWldIRy8ctMIWO2TJdhGPmflvo/lHBcIvylzdXEeC6DgYotgWhDvi0pRMMfhc= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: <234A4827A21D054D98DD20387A8E1B15@namprd13.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: fc868fbd-3967-4606-93f7-08d745d0d99e X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Sep 2019 18:06:00.1997 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d4fed5c-3a70-46fe-9430-ece41741f59e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jTjg3tyvGiPkUgSBV49V7MnaJohPoqaUvgf1Iq+12tb4ivBC2VcbDCaZBz8b/mkfqnSrUyYN5gW1+WfLymYPsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR13MB1035 X-OriginatorOrg: hammerspace.com Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org SGkgU3UsDQoNCk9uIE1vbiwgMjAxOS0wOS0zMCBhdCAxNzoxMSArMDgwMCwgU3UgWWFuanVuIHdy b3RlOg0KPiBJbiB4ZnN0ZXN0cyBnZW5lcmljLzQ2NSB0ZXN0cyBmYWlsZWQuIEJlY2F1c2UgT19E SVJFQ1Qgci93IHVzZQ0KPiBhc3luYyBycGMgY2FsbHMsIHdoZW4gci93IHJwYyBjYWxscyBhcmUg cnVubmluZyBjb25jdXJyZW50bHkgd2UNCj4gbWF5IHJlYWQgcGFydGlhbCBkYXRhIHdoaWNoIGlz IHdyb25nLg0KPiANCj4gRm9yIGV4YW1wbGUgYXMgZm9sbG93cy4NCj4gIHVzZXIgYnVmZmVyDQo+ IC8tLS0tLS0tLVwNCj4gPiAgICB8WFhYWHwNCj4gIHJwYzAgcnBjMQ0KPiANCj4gV2hlbiBycGMw IHJ1bnMgaXQgZW5jb3VudGVycyBlb2Ygc28gcmV0dXJuIDAsIHRoZW4gYW5vdGhlciB3cml0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