Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2405264pxp; Mon, 21 Mar 2022 19:21:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvMynKejk9iSdaR50Nz9p9EBd3J3nCdSjrIpNtATfn2K03KeN4ZwxbBAAo2dNdbTDP/vbm X-Received: by 2002:a17:902:7613:b0:151:6e1c:c49c with SMTP id k19-20020a170902761300b001516e1cc49cmr15849419pll.109.1647915707055; Mon, 21 Mar 2022 19:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647915707; cv=none; d=google.com; s=arc-20160816; b=DPnZHL3L1ly2ZIhQpG35BPOYq4NAn/1KP81ewNMeFgjQowrxSgM+7yrq+qOWFX8xQ3 FQ/cESkMu4ZGsNr0p1TexF3OnW2MoFMu1Vr8pOiUpJiHqN9se+qJVi1Z4fitR3f81k6B 1kysy+1x1SRlego5gelr63oxA4rm21c0KDeovOvJzcd5J5oYtcDztBC/3cDopl77Mm05 LpO5bUpHeKNCC4tbbhHWgPV28HAWqPRyF/8k+ri+rwKHYSIke4FQBdiyKvUeueCBBAXk QtTKzNzAlRE+AOR5GmSZUmHAxvEPhUejD0lrEWFtzPTHl7104qFcaPtOF7UvSEQH4Jfn hegw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IWhS42STHT4osqCtKCEkYDGNhAkP3uhaYZ9oWL8cHY4=; b=CaTj49i8p8+0Si37WDLu3sheoJRSEXFgah4UbVKGRBA1TYHnpSHuqoqM+yngo9WKZI vFjhWJqD57jAjRGoLGMg9ajFiBx0Zg8pDVVv3dnZwDLjmpv8U8rjDyBZ1ZcB5OoULVyS DaPxqiHC2Gx9gmOLk1lfx+BROqhLZzH7xyd+92ooOeHDNx17As9IVEO5yCZTdP7uhhbx 6aQA8nSxQneI27dzNGx36j55aitomfXM3pGo6Y3qdHWuwucorbsExCyGMnDJfxz7qnix sN3m+8U6y3dz4QKXUfU1xg0GE+Nwv2eS3dOUB6bMXjtNsxlbG5gMtCDt0A3CTSjOVIIQ 2mTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hdPcCjz2; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h11-20020a170902eecb00b00153b2d165d2si10895950plb.474.2022.03.21.19.21.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 19:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hdPcCjz2; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 84F9244741; Mon, 21 Mar 2022 18:54:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235166AbiCVB4J (ORCPT + 99 others); Mon, 21 Mar 2022 21:56:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235189AbiCVB4F (ORCPT ); Mon, 21 Mar 2022 21:56:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24CC612AE3 for ; Mon, 21 Mar 2022 18:54:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B2DB860B09 for ; Tue, 22 Mar 2022 01:54:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6FE0C340EE; Tue, 22 Mar 2022 01:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647914078; bh=jBsBs0MYAmbMA+BaUY2qfe0Peph2k09n9zyI5ZjvPMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hdPcCjz22GOtaJKGbARdUwAuT8tn+81ub0dy0aaUb5aZbrJ5FC+GxHBZax3bu3w58 1ubD5BGVPThbZ+uCHgHB2dQ00mFv9gS3yBqAY5uC8/HBkkS9is+hCX4opJbtbd2rjq KLxWkZnkluKEHe0MoNx5UfbiW8FvdC+6lbcYUGMtUldRMCfkZIsvqwFwLzULphicgF MPiIojHRQCz4tuOz1sPLvCUssIRZMivTDHDFV0cMtv+77WjwuV6o0T3ipinQssU4M6 DWAgRU3YF8PIRsC1sLG3uh1rOwiX15zMU1PMCieJqpT2EBAYvgLGGEy+biIz4gjFJx jEs6/Lv6IMhPg== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Cc: Chuck Lever , Enrico Scholz Subject: [PATCH v2 9/9] pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod Date: Mon, 21 Mar 2022 21:47:46 -0400 Message-Id: <20220322014746.1052984-10-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220322014746.1052984-9-trondmy@kernel.org> References: <20220322014746.1052984-1-trondmy@kernel.org> <20220322014746.1052984-2-trondmy@kernel.org> <20220322014746.1052984-3-trondmy@kernel.org> <20220322014746.1052984-4-trondmy@kernel.org> <20220322014746.1052984-5-trondmy@kernel.org> <20220322014746.1052984-6-trondmy@kernel.org> <20220322014746.1052984-7-trondmy@kernel.org> <20220322014746.1052984-8-trondmy@kernel.org> <20220322014746.1052984-9-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Trond Myklebust Ensure that pNFS file commit allocations in rpciod/nfsiod callbacks can fail in low memory mode, so that the threads don't block and loop forever. Signed-off-by: Trond Myklebust --- fs/nfs/filelayout/filelayout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c index 9c96e3e5ed35..76deddab0a8f 100644 --- a/fs/nfs/filelayout/filelayout.c +++ b/fs/nfs/filelayout/filelayout.c @@ -1075,7 +1075,7 @@ filelayout_setup_ds_info(struct pnfs_ds_commit_info *fl_cinfo, unsigned int size = (fl->stripe_type == STRIPE_SPARSE) ? fl->dsaddr->ds_num : fl->dsaddr->stripe_count; - new = pnfs_alloc_commit_array(size, GFP_NOIO); + new = pnfs_alloc_commit_array(size, nfs_io_gfp_mask()); if (new) { spin_lock(&inode->i_lock); array = pnfs_add_commit_array(fl_cinfo, new, lseg); -- 2.35.1