Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5607747ybp; Tue, 8 Oct 2019 05:45:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxstm/WYFm9lILx8pPUadmctvg3DJvNjjdkwiWVKrK55lVAXGoj5831etWTKJvHboyj9Glj X-Received: by 2002:a17:906:d154:: with SMTP id br20mr28424972ejb.79.1570538742561; Tue, 08 Oct 2019 05:45:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570538742; cv=pass; d=google.com; s=arc-20160816; b=XfKZpP8AlESJJtKKiB0SxmJLJb3Rjw/bZio4qMkV4XxBh9RNE/7eT4KPMqp4oifTOQ 7jK1P5IgqF+wOJ4zoWyhgnu1GkQAOr/3yW5I+d9uT/2TrBed0oWzfGaMdcO/1rQFUjd4 gZUDAWM6YDFNPs+8HWO6O5Vupzh57M/77+lM8LtQtZLAbzd971FeGCYKB565CQ1dDXpe eiov2lKKXfXybZbB1FTdWK/LvyGx6gOvWJTrhNrQJTNI6W31UrDT/CpQLmdXbR1suiwz 9UYlPBuM84BhNwc9UFHr0M+UwnbErSEvGspdgWGv084mNjEceVRwd1OfM9bWHmhAz5Ja 59fA== 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=4kz/hto8N+NFFfgoUw8nh/uf8QEF2+8DPASpqgW7L2Q=; b=RPefNeENyqwznU/xSKIPKdwyKbZma7sV07JUr9XctmEBsmVIJ/o9SCuAkERvmm0YVu e1uKPuUlBiK9jsIjmph6GLzCKdSO4lmT8gqtZetc2WiQF2is/8zOB+B5ZRrxQgjrzGCb 1NKfNBd+rIiBAuPCOcSiJvkTa35VV83HXmgrkCNQYtZAhrJBluIyW2M9zRrh1xaUNHvS xldfLMcVLsdFNol1Od2jk3ZYMwwdiQzGXyHS9oNfO4o4kobSWpWnZ+s0Q3Z951PFtKHS KzfikYzhjNzdyRxk0ByZV8KYwTdCw1oryUniBjBOHEPr2ps4Fnfn9msw473lFVZnVpEJ Djqg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@hammerspace.com header.s=selector2 header.b=JQYx0p+4; 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 i18si9080650ejb.145.2019.10.08.05.45.13; Tue, 08 Oct 2019 05:45:42 -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=JQYx0p+4; 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 S1730719AbfJHMnH (ORCPT + 99 others); Tue, 8 Oct 2019 08:43:07 -0400 Received: from mail-eopbgr810137.outbound.protection.outlook.com ([40.107.81.137]:61072 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730555AbfJHMnH (ORCPT ); Tue, 8 Oct 2019 08:43:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FUQsBN1AmSgYb9uvVOL81V9B1gIT2Cf44DLBclHit8ykJ3wlZueppiEwAnQdC4G42vgthDSs/y3IM9z3pC6bAj2oVv5J6SgwT+pj2VBoUVsqdxgu0algp0LFlnL5SXN2JJXhuz3JcdVQzicjg1cn7APS+CFPK7PplIsEdRlMJf07eRyolzb/ZoIAPpTC5MF6CsQhFvdHrxAcO2SBug1F2uEKMIJyd0XPrTm/z8O7BHdgs0zu0nFd2DezIFvlFUlif+9DjtW0mgjsrn+a9MboDWWNeYNQWpfneCORXfCb4H2N4iTARlb7lcaJ9ed1Wbf/CkwcjHUQVXZIoRZf0KhqzQ== 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=4kz/hto8N+NFFfgoUw8nh/uf8QEF2+8DPASpqgW7L2Q=; b=kwf1SpuG99tAhq5vpNACXIyVVU0ps7/PXRqY8BfGazdPg37bA9eULc6Bf44/oqL59r4WvCa24xFUPM6n02IEJ4QWmMzsqwrg5WT17pRRXezt3k2szWBlKoSj1eHriE3Lf6PBrDsnRzm2XluTy3kSkQ0ryhpJYVsAofR0zQGmZpD94UAVmLIqVMO77yuUomHGOyYUrWs+uOJNmjC9dTjhvYqUd337On2qZ3/5UAq5ZIhovZuawPEP6FgQsFEaeZV7GNbGbhZPsKrfWNhDPQGcVtv+BqNsGQ55GNFrIPBKp8NLjGpV4yIPpqJyYGa/2GMowCdf6mvhSvurX0Y9JAtT/g== 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=4kz/hto8N+NFFfgoUw8nh/uf8QEF2+8DPASpqgW7L2Q=; b=JQYx0p+4fdokGgp4ShC/Di/+GK59RdmwgM6BUg/VcHL4VadhKaf8yYaLtNFqINZVTZnUjyPwNaeulwVU22/VNspYiGGnzoUeziClFdYq68jkY2wWidNGDX2aGY0csRibNW67tlz3YpBxE06z4SujsnVwnp/LZVfHrFpKKmrwa70= Received: from DM5PR13MB1851.namprd13.prod.outlook.com (10.171.159.143) by DM5PR13MB1257.namprd13.prod.outlook.com (10.168.114.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.13; Tue, 8 Oct 2019 12:42:59 +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.2347.015; Tue, 8 Oct 2019 12:42:59 +0000 From: Trond Myklebust To: "Anna.Schumaker@netapp.com" , "suyj.fnst@cn.fujitsu.com" CC: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH v2 1/2] NFS: Fix O_DIRECT accounting of number of bytes read/written Thread-Topic: [PATCH v2 1/2] NFS: Fix O_DIRECT accounting of number of bytes read/written Thread-Index: AQHVeJXoTps+EK3YYUmhD5Vo9ALxX6dQbvAAgABLtQA= Date: Tue, 8 Oct 2019 12:42:59 +0000 Message-ID: <720ba5cdec121e09bec59ef348d477f925000456.camel@hammerspace.com> References: <20191001202000.13248-1-trond.myklebust@hammerspace.com> <20191001202000.13248-2-trond.myklebust@hammerspace.com> <6185d0c7-9343-d524-a79d-7a9b2fbb4e1e@cn.fujitsu.com> In-Reply-To: <6185d0c7-9343-d524-a79d-7a9b2fbb4e1e@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: 8107ef96-704b-4924-0825-08d74bed0d14 x-ms-traffictypediagnostic: DM5PR13MB1257: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 01842C458A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(136003)(396003)(346002)(366004)(39840400004)(376002)(199004)(189003)(2906002)(71200400001)(7736002)(71190400001)(486006)(6116002)(15650500001)(6246003)(86362001)(25786009)(26005)(186003)(2501003)(3846002)(91956017)(476003)(99286004)(446003)(76116006)(11346002)(5660300002)(66946007)(256004)(6506007)(14444005)(118296001)(229853002)(110136005)(8936002)(36756003)(6436002)(76176011)(14454004)(478600001)(64756008)(6512007)(102836004)(8676002)(6486002)(66446008)(66066001)(66556008)(81156014)(4326008)(81166006)(2616005)(316002)(305945005)(66476007);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR13MB1257;H:DM5PR13MB1851.namprd13.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX: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: u48kqKfCXgTJYZFqEyshvOA4CkXWwZKJIRV9iWTyIRWQQXtsuDHpCTgLB8Q9a2i/wik5TZnb205JGUqzS/MdJe/CzNP46ZgY5FKFLm7m4Fw0oK5oSWFX4ax4mjOaIUqfV6M38boZPsksvzePhYS5lS+RSDz+uOQsvyBF25QfnGLoF4DG0yELGBU6+9Jx0QbCXEL/Uwl/0NTUXZV/MsrndFQHMaXFfiAEL6KTcNu2hNyo4L896POt4U1JeE3fYbxX4binYlHb/ra9tL3M3nzn7LmFJ8V2KhgczLrwzyrMXtSBJJwmjKU0aNZAbS2rBnZ+xGgJ+dCFyjKpfhxoD5xbt3ZpHr5AJg8IxZyYSP3XS0R5p+vnbZFCnY1mkSgrqjgM9CtbpfnoIPTvSinc0VFUDgszQti8HnSlpRBnbCXCTJo= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-OriginatorOrg: hammerspace.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8107ef96-704b-4924-0825-08d74bed0d14 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2019 12:42:59.3504 (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: O5c20sp1ERYzmP+NVVIDoSFQfCQRyySB92x4wcbApOUsVgEIQbOKGheR5TMTOjH4RH+J3+nQ/ORqq3RHJsqeGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR13MB1257 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org T24gVHVlLCAyMDE5LTEwLTA4IGF0IDE2OjExICswODAwLCBTdSBZYW5qdW4gd3JvdGU6DQo+IEhp IFRyb25kLA0KPiANCj4gQWZ0ZXIgdGhpcyBwYXRjaCB3ZSBoYXZlIG5ldyBwcm9ibGVtLiBTb21l dGltZXMgZ2VuZXJpYy80NjUgdGVzdA0KPiBmYWlsZWQuDQo+IA0KPiBXZSBjYXB0dXJlIHRoZSBw YWNrZXRzIGFuZCBmaW5kIHRoYXQgInJlYWQiIHdpbGwgcmVhZCBmaWxlIGhvbGUgZGF0YSANCj4g d2hlbiAid3JpdGUiIGlzIGdvaW5nIG9uLg0KPiANCj4gU29tZXRoaW5nIGxpa2UgdGhpcyBzaXR1 YXRpb24gYXMgYmVsb3csDQo+IA0KPiA+IHh4eHh4eHh4eHh4eHwgICAgICAgICAgICAgICAgICB8 eHh4eHh4eHh4eHh4eHh4eHh8DQo+IA0KPiBcLS0tLS0tLXctLS0tL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