Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4407123rwj; Tue, 20 Dec 2022 09:40:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf6kpNqTLTyJBN7LeLngUgif0y3Hge8aI03MK9EWvtRXBNcqnneTNWP+iPtz1VyJXD+Picvr X-Received: by 2002:a17:907:595:b0:7c0:f4f8:582a with SMTP id vw21-20020a170907059500b007c0f4f8582amr32766945ejb.52.1671558015328; Tue, 20 Dec 2022 09:40:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671558015; cv=none; d=google.com; s=arc-20160816; b=dHhuZsVnWd0YRkukqOv1KBW7DsNIpxzXtyGs7Zg+E/+EWFe1+bNzYhMo5E0xfPr829 WoVRFBq7exyH85JbDbhUK9EJINUBj9ahRQmT9/txZKuW5kXWctdxw4fpAlqKagwUzJB4 jlj9t0l9/aRYRUgh+ns95Yb217DELrlq4gPVFLpj4kcsYqBcQN+kKW5FOy6YCzv91fQJ 7+HyIhrm9ht0r7jv2BHp2hImDCbZjBuEBhsrEXSUG3IoAhJSBXqFEoSQ6kh/zcrV3Ny1 jJThk1N+nZrmZZLyScnyCDNOW72TasPIywzJ+PUKgsmtq2guIHRam5n9mO5qwQiR16mr OuVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8Ploh3GTv9AfGvgnhWt/Wp5erHoONYXI+0/PTs1jquI=; b=nr0srLJh71RvmohLSO5GXDywz6vpsVpo5JCoiG2/cJdw34Ps4qCRdJeZIYmmlT2oit op+FY22ythqEb32OK5fN8UN0+u3UuN74L7jG0sr7wAui+Sc78QU6qNvScYHz0My4w3hO zV5se1PxpJ6mKTaQ4fA2lM+g15gk8fCaUcf83i9cEjKbXg1dU4DxYdMsUIHmvP6HW5IN iVEA16v/loO38C43IQLg26VTjIdE5poEt9t+OQbapdV7VM9HhwbjrnIaIcIyvVc6PCVO 4gj9DoKCPsbWkHkWnu1Irht8iAgRJd5NjlVU+54HFkYuEaYXRjwFqXI+TO1M6Im5irtc cHzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qNv5XhTa; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa26-20020a1709076d1a00b008318885e1ddsi3853076ejc.616.2022.12.20.09.39.51; Tue, 20 Dec 2022 09:40:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qNv5XhTa; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229619AbiLTRbg (ORCPT + 99 others); Tue, 20 Dec 2022 12:31:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiLTRbf (ORCPT ); Tue, 20 Dec 2022 12:31:35 -0500 Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA6AC1E2 for ; Tue, 20 Dec 2022 09:31:34 -0800 (PST) Received: by mail-vk1-xa35.google.com with SMTP id l17so6076435vkk.3 for ; Tue, 20 Dec 2022 09:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8Ploh3GTv9AfGvgnhWt/Wp5erHoONYXI+0/PTs1jquI=; b=qNv5XhTa0SFoxwnJhEVSF/oZPyz49/xsLRMmvgF/4/sJCWSN/ZWbFCNtW8t1OjSVGI VyTSTQK7WO8S8W0rV+3e3Tw6FJ064JMFaXJsWikJJaPcZfo/miP93BBnn8uthhW8hKGK MTKQ9dwraFk68E5kRmD42TaQa0RUzoLqMv//duCwHhzntpTa7dO+QeeRvgaJFt1Sd6rI Pr6CC9HBNsPnB8EhImseeneEBvwd+pUlF3iik1um2u5A9Ww+HfNvsOFmHt73Bj+z3iVZ 8uXnVV1EzOPFJw9hNuMBETKSeY5CCYFnMcISWfiab5bpjwsul67omARGsxrK4YH9ldxG BNpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8Ploh3GTv9AfGvgnhWt/Wp5erHoONYXI+0/PTs1jquI=; b=kdJgW1F8neaZGsgLPt7/mu/14G6YNYz7+DvsK/XVVFNujRlccyjQc8hah2vZ8tBPUk huK6fpuKhvj6AQy2KhrIIIWP5gSGi/GOUsE2hUvGeSq93EGO0DABhDHGV5jEngLNbhbg zEIbXmva/f/a87TAACKkCv7R1XQ+7NkmBO8GNADmJuzGDWc7EW+xt7MDz4wJiPaPzGzP RYpCDRdRpddBSPCXgt50IM9ifjIttai8Ixlzc6xvfpNdfwVU1K9D8OfpwBxwiMz9CZ0C W903N1N56RNOrFYtbYqIGX4Ixh2Dg1PYfgc29WdjKWnhglAEEjLx+PZBt5bITjatblyT 8Ntg== X-Gm-Message-State: AFqh2koFEisKRC5qMAPlfwWVGcAjwcM5CFqUGMc+tCaRxSVCiwCFDY74 MLRPRmZPY6jOWfatfuJxeC+4I6nfXrQ= X-Received: by 2002:a1f:9481:0:b0:3c1:1866:28d8 with SMTP id w123-20020a1f9481000000b003c1186628d8mr4739233vkd.9.1671557493855; Tue, 20 Dec 2022 09:31:33 -0800 (PST) Received: from kolga-mac-1.vpn.netapp.com ([2600:1700:6a10:2e90:31e3:d2c8:6863:dc26]) by smtp.gmail.com with ESMTPSA id c7-20020a05620a268700b006f87d28ea3asm9263193qkp.54.2022.12.20.09.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 09:31:32 -0800 (PST) From: Olga Kornievskaia To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH v2] pNFS/filelayout: Fix coalescing test for single DS Date: Tue, 20 Dec 2022 12:31:29 -0500 Message-Id: <20221220173129.98009-1-olga.kornievskaia@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org When there is a single DS no striping constraints need to be placed on the IO. When such constraint is applied then buffered reads don't coalesce to the DS's rsize. Signed-off-by: Olga Kornievskaia --- fs/nfs/filelayout/filelayout.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index ad34a33b0737..4974cd18ca46 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -783,6 +783,12 @@ filelayout_alloc_lseg(struct pnfs_layout_hdr *layoutid, return &fl->generic_hdr; } +static bool +filelayout_lseg_is_striped(const struct nfs4_filelayout_segment *flseg) +{ + return flseg->num_fh > 1; +} + /* * filelayout_pg_test(). Called by nfs_can_coalesce_requests() * @@ -803,6 +809,8 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev, size = pnfs_generic_pg_test(pgio, prev, req); if (!size) return 0; + else if (!filelayout_lseg_is_striped(FILELAYOUT_LSEG(pgio->pg_lseg))) + return size; /* see if req and prev are in the same stripe */ if (prev) { -- 2.31.1