From patchwork Fri Nov 10 22:37:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Watt X-Patchwork-Id: 10053909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A44726032D for ; Fri, 10 Nov 2017 22:37:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 982AC223C6 for ; Fri, 10 Nov 2017 22:37:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D1832B4B9; Fri, 10 Nov 2017 22:37:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 809DB2AD24 for ; Fri, 10 Nov 2017 22:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754725AbdKJWhl (ORCPT ); Fri, 10 Nov 2017 17:37:41 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:56133 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754604AbdKJWhi (ORCPT ); Fri, 10 Nov 2017 17:37:38 -0500 Received: by mail-it0-f67.google.com with SMTP id l196so3395256itl.4 for ; Fri, 10 Nov 2017 14:37:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EeCa7/GwfP+XEXs/5lPb0T86kPn1sLIzC1gH1068Gmo=; b=R2iBCh508j3ghuID4QQCq0bMM6GBIrt8Nj9YpuMvrPlZZ1VdJKhtR84b75FPVBRlXN equS6doO0qRVs1OuZj//ZA8tjsR/P3HCRAV6v/sHoicr1zdabd+1CviakmSwqd2R+0Th 3uwUbihJYWEYfnXZCsddsyOIumfAkQm2g7Xo8XvkwIT/UboYM7HN7AxO1auKmsAV1NT0 xqEJRFs9zRKG/N/K8T3ZLD2n1iyN0PZtXZpp+hmzeoP1KZQHn/qG4Muyq1ejrwtvBMbY pk6IMmmMWtwSrdv8Qw+yDCue8t2MXQB4LfoB72T+QwNLy7/9EuFwCyFpRXbQZ5m7Q5yd /7RQ== 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:in-reply-to :references; bh=EeCa7/GwfP+XEXs/5lPb0T86kPn1sLIzC1gH1068Gmo=; b=by5vSHWGB25XIyPvbrtt9Y+oZ1A3MEwgm0qS0uGpviIjAGuL5D2kMIn15Oh+UfZswg jzfRy3/fqk5XRkCl0IhPUsDVG6M0ikemYks1nsRVz1YOEfBHpf0HjBLwhQlpB6QF49+A g8QF+qo3BrrqeE3hCSuFu9b1Vkrv0CpuBxRoOttRThmjgk5F/7rsFNooQn70RwNvFKEK XYVnQoa2cw0zMpUTHOwIFroRWST5ler2OsB1kC/YSY+W+76iLhF41JuGnS9QMs31Wljm 8YphDeLLrDvwoufckQX+OJsxz5sKQZ5ZKuV1V/2pRivU9yeJu7zOQ0/QS9Rrv0p3tB2J NRqw== X-Gm-Message-State: AJaThX4Nadv673IwlerStlXfDoqySC6kIIsmmod2q1jYVLed73z8/1A4 jGSWllejAm+yFo5BBt/rQOI= X-Google-Smtp-Source: AGs4zMZamogV7inHrU1TM6+aCjvmgU9jv8mt+pW9eIJcrkNY883OsqHGCT56I39dxwUEc48VkR30Nw== X-Received: by 10.36.197.130 with SMTP id f124mr2102350itg.99.1510353458354; Fri, 10 Nov 2017 14:37:38 -0800 (PST) Received: from ola-842mrw1.ad.garmin.com ([204.77.163.55]) by smtp.googlemail.com with ESMTPSA id f3sm5001090iob.70.2017.11.10.14.37.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Nov 2017 14:37:37 -0800 (PST) From: Joshua Watt X-Google-Original-From: Joshua Watt To: NeilBrown , Jeff Layton , Trond Myklebust Cc: linux-nfs@vger.kernel.org, Al Viro , "J . Bruce Fields" , David Howells , Joshua Watt Subject: [RFC v2 7/7] NFS: Propagate operations to unshared clients Date: Fri, 10 Nov 2017 16:37:07 -0600 Message-Id: <20171110223707.17098-8-JPEWhacker@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171110223707.17098-1-JPEWhacker@gmail.com> References: <20171110223707.17098-1-JPEWhacker@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If a struct nfs_server's client is not shared with other superblocks, propagate the umount_begin and serverfailed behavior to it. Signed-off-by: Joshua Watt --- fs/nfs/super.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index bca38e1cdd85..0348fd43ffe4 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -911,6 +911,11 @@ void nfs_umount_begin(struct super_block *sb) rpc = server->client; if (!IS_ERR(rpc)) rpc_killall_tasks(rpc); + + rpc = server->nfs_client->cl_rpcclient; + if (test_bit(NFS_CS_UNSHARED, &server->nfs_client->cl_flags) && + !IS_ERR(rpc)) + rpc_killall_tasks(rpc); } EXPORT_SYMBOL_GPL(nfs_umount_begin); @@ -2223,6 +2228,7 @@ nfs_compare_and_set_remount_data(struct nfs_server *nfss, { int changed_flags_mask = data->flags_mask & NFS_REMOUNT_CHANGE_FLAGS; struct rpc_clnt *cl = nfss->client; + bool serverfailed; if ((data->flags ^ nfss->flags) & NFS_REMOUNT_CMP_FLAGMASK || data->rsize != nfss->rsize || @@ -2257,7 +2263,11 @@ nfs_compare_and_set_remount_data(struct nfs_server *nfss, cl->cl_timeout_default.to_initval = data->timeo * HZ / 10U; } - cl->cl_kill_new_tasks = !!(nfss->flags & NFS_MOUNT_SERVERFAILED); + serverfailed = !!(nfss->flags & NFS_MOUNT_SERVERFAILED); + cl->cl_kill_new_tasks = serverfailed; + if (test_bit(NFS_CS_UNSHARED, &nfss->nfs_client->cl_flags)) + nfss->nfs_client->cl_rpcclient->cl_kill_new_tasks = + serverfailed; return 0; }