Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp311924ybn; Tue, 1 Oct 2019 21:34:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjOmA9BORahx3UGtcAbb2A4kzES4YpwaOGH7NDDa4Io3v65WgopNalN2gQl5/XnK8HDtke X-Received: by 2002:aa7:df14:: with SMTP id c20mr1713094edy.133.1569990843891; Tue, 01 Oct 2019 21:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569990843; cv=none; d=google.com; s=arc-20160816; b=OFGaW8IxeAL5JW9lTkKGffrchIWRHOq5LPtwHdj8FzLhyhdcBwX1Mi8Mp9EeMxcoSw hKzNnSQFYufsZ2FdujeMpky0odjJ56E8B0IDaDG002d5o35bSUv3eHU5pSnEz7giHSIm FsfcX/TxAdbg/SF3/Ib33EOFTYlfwEaWg6/2I9ADuduWp0ZkXK7bXs9j6+UlpBHbPdQL /8xTiJ8RI6z1F5PUZUZCteUL5RhLvFEGhDV8MkYTdfLUgTA4wQaIIBenXby56HHy3qk8 sx1m52EdNPESWU39ZB2UPlJO24kX59409sfsHS+BYIZOyVQlkPOP/xHgdD07Lw2xp0YT SHNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=F8L90vKwRkdlDt7xNjsJpOWp+5BT+qzsHeD4ywVlciU=; b=UGcyS/zaAN0GejndcZxM10wpL/youuYhCYPRehOeAwn7dKzOerotf+S3ta+jjjqOER yqVP8fshafv41i7HmtsVs5lty3DxzTGxkmbaE5mg4iz+Ab99Tt/xR4ZRQ3kJLpQt6zyR zeZLj8R4K0A8DyjCSMYeUV36t074UlM8brDIN1oW3AwRTLQYLnkpIC321bMmp2vLcdvs 74M+THYXMx/dg78IuMbWZ1SCVbr+G3eXi1Xo8qK+xOsk9XIvKK31DVBzvhH7aSxmSiNS rVTXGx9E/4+u2cMvUtbg+rXKlUjQCW/W+lGjSwYMwWRVgfi9HnShRVqtTx+GsLvQxaAV fbUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mT/+L6jZ"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f17si11066596ede.380.2019.10.01.21.33.24; Tue, 01 Oct 2019 21:34:03 -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=@gmail.com header.s=20161025 header.b="mT/+L6jZ"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727189AbfJAUWJ (ORCPT + 99 others); Tue, 1 Oct 2019 16:22:09 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:36575 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbfJAUWJ (ORCPT ); Tue, 1 Oct 2019 16:22:09 -0400 Received: by mail-io1-f68.google.com with SMTP id b136so51429249iof.3 for ; Tue, 01 Oct 2019 13:22:09 -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=F8L90vKwRkdlDt7xNjsJpOWp+5BT+qzsHeD4ywVlciU=; b=mT/+L6jZ52hWB1cyM1wprED5qgDhaPRNaC1qkSYkHJsRuo4MnJGOZ6wUF4T0FanPGn KBha60VTXQd8SQKpODozmV0/kN1Hzf15c7Bs5FJmm+KvlejW3q11z4kkaHxkaHqUpp9k i3JJv/ANzfkzx4usrWUdcO/25EawZttzyGWgK45/MZsRDhOoVPyUviCcOlH+EpSmsV1r TbGWyuQsDUo8hG+W9r1rvkvKP+ys6+qO1X/gTiy9hhMSZ8+L9n8uxm41p49CoeWbhd+d OAiQFGDkdLmamZOIZh0W5BdkNeDELcd7dL8VF8zNZB0OXHnd5bXT9jpsCNZB8xPVrJHI B+WQ== 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=F8L90vKwRkdlDt7xNjsJpOWp+5BT+qzsHeD4ywVlciU=; b=IQclavGWf0eQmwRYMgdrEI2mYYkBnU0g9fJIHJgB6nOYVzzUfkE8da6xgkbqs9610N VbYN1Nu+oJD3u3GXn2alXRBJGuP/imeaYie7tMTCD6xdpnEGNzDYe3zHZZ2Z9GrJwlJT JhfQSgCKliOeQc9GXGdH/iXK1/OrTTQp6nBa1LhbmAmbCuZeTxuhZ7YlFuCaBtNAyoRj kRniIcM++DZSEu+0xUl45sH61u8ZEh98G3Ec+0kN4amp3O3gnQ22Zs34K8eSmJIiUi3I UsaBcz/yH7XZuG+5bsxZHeRgW/wu3ftrUbuXVHAI5sVo8RNYK7263DQz80WWsKtG0vrZ /j5Q== X-Gm-Message-State: APjAAAWpa6WeNZCVcz8senu9FMFFbkFpv73rFU/CltDs6z91Ur+9i0KG sEvjQ55tFrt7GXZcibIMog== X-Received: by 2002:a92:3851:: with SMTP id f78mr27071521ila.179.1569961328462; Tue, 01 Oct 2019 13:22:08 -0700 (PDT) Received: from localhost.localdomain (c-68-40-189-247.hsd1.mi.comcast.net. [68.40.189.247]) by smtp.gmail.com with ESMTPSA id c65sm8038648ilg.26.2019.10.01.13.22.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 13:22:07 -0700 (PDT) From: Trond Myklebust X-Google-Original-From: Trond Myklebust To: Su Yanjun , Anna Schumaker Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2 0/2] Fix O_DIRECT error handling Date: Tue, 1 Oct 2019 16:19:58 -0400 Message-Id: <20191001202000.13248-1-trond.myklebust@hammerspace.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org These patches fix issues with how O_DIRECT handles read and write errors, and also how it handles eof. v2: - Change to handle all short reads and writes in the same manner. Note that we can still end up breaking generic/465 by using the nconnect= (where n > 1) mount option. The reason is that the test assumes the writes land in increasing order on the server, despite having being launched in parallel. Trond Myklebust (2): NFS: Fix O_DIRECT accounting of number of bytes read/written NFS: Remove redundant mirror tracking in O_DIRECT fs/nfs/direct.c | 111 ++++++++++++++++++------------------------------ 1 file changed, 41 insertions(+), 70 deletions(-) -- 2.21.0