Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2387696pxp; Mon, 21 Mar 2022 18:48:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6kka3qUNEGEfgp6A4lwaPfqQ19sH1EVYs4FD/Da7du3sI3Jg7hQJWtN//cwAUULsSzKUE X-Received: by 2002:a63:5d62:0:b0:381:eef5:c9d6 with SMTP id o34-20020a635d62000000b00381eef5c9d6mr20210023pgm.412.1647913724086; Mon, 21 Mar 2022 18:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647913724; cv=none; d=google.com; s=arc-20160816; b=ygVzInp6itEeewywshAh/AzhBHBcRn6WKlf8eidze4YuAnDshw0SotcPnxMGyezmen ws5MO/XKzHWclnqtXGPetGbPxWfLeTusyEf8OOJ5HsXEcjJf3Ku+C7CIr2b4vPTdPm/G OBm+LJKb98j3P3Snt3Wr0PkQRmHAdv1cNvqc1ujbd6n4GMo2II3tqeFbsrwjSSyn6Odi ++BF7ikILr8uLZvmYwQSY58n6B7jAEEIXIoWIzJMWtsy0UMSfofoA7dwBIDVjHm2Q8Ym eMRMNNgBu40Mr2mF7bHnaS4ub01soVmEDuSPqo3v9CehDh9fs1ufZw9VddDJC+S5bKKV Ro1g== 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=zTAWLmKfhvWxyB6HG83k5b/M7nb66O1z1xjTBISdJPhB/MijkB6LI/mXlU8rlF/9JE I6si5RZ4IfgAf2tlk7siVLQV+ifAnnWuLxbsrIhdZhIGTUl9P/OnY2SV7XSbmFxznla3 32eaGrWqqzLXQI2fLqfGoBDW7Y/WeXp56h8f5+9GAnCadr8AXjKFQFJOUXtrFJq6G6qO 28GkyIMLLwKR8TGEhPdhOoyDJWYVZB+5HeaLWRf6PWx1Y8jHFpX0o4CtG/ENGVgfh6K6 i8vMcwi9pK9T4OipXnZSbE9l6vSYf05Od7NTTOOqYLU4nzFcE3MU9RNAXvvxxwnPUCsd o9GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UivfGdqS; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id om10-20020a17090b3a8a00b001c6c8e19f0csi865655pjb.98.2022.03.21.18.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 18:48:44 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UivfGdqS; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 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 0E7782B246; Mon, 21 Mar 2022 18:22:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234626AbiCVBYA (ORCPT + 99 others); Mon, 21 Mar 2022 21:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234645AbiCVBX5 (ORCPT ); Mon, 21 Mar 2022 21:23:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45139289BC for ; Mon, 21 Mar 2022 18:22:31 -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 8579D615E2 for ; Tue, 22 Mar 2022 01:22:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CE4EC340EE; Tue, 22 Mar 2022 01:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647912149; bh=jBsBs0MYAmbMA+BaUY2qfe0Peph2k09n9zyI5ZjvPMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UivfGdqSdXZi0VsoX6VKOSqFVPPvfw5EpeliHjDk2rw3LRw5RgeCkJwzonMzWeNym dJdIiCrBd9JOXIPg3bzuYUw/tCJhFYyMZhtnZq/S6cy/eNC9wUaWQ1vHI2+WxhYLOA QXu0eIw9+qMl+/e2/IcoAQelNwzpiLo+MdE8uG3FFhWjsfk20ZmthwKej9qyPxdr/t YOjpjUWJIXPNf3U1QXnLInZ2rrPlahl9RpQ0wcBX6gxmCtyw+9DYpuWkcmX2Zv1QBd XLWgK6DcWQVlFpEbrqzMpMYBYTZax7YWxaPqWU+FPBaftHPZXoItP1wqbCf3P31+0U P7MZ6AYQ9KPbQ== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Cc: Neil Brown Subject: [PATCH v2 9/9] pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod Date: Mon, 21 Mar 2022 21:16:18 -0400 Message-Id: <20220322011618.1052288-10-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220322011618.1052288-9-trondmy@kernel.org> References: <20220322011618.1052288-1-trondmy@kernel.org> <20220322011618.1052288-2-trondmy@kernel.org> <20220322011618.1052288-3-trondmy@kernel.org> <20220322011618.1052288-4-trondmy@kernel.org> <20220322011618.1052288-5-trondmy@kernel.org> <20220322011618.1052288-6-trondmy@kernel.org> <20220322011618.1052288-7-trondmy@kernel.org> <20220322011618.1052288-8-trondmy@kernel.org> <20220322011618.1052288-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