From patchwork Tue May 17 16:28:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 9114291 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D061B9F30C for ; Tue, 17 May 2016 16:29:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01071201B9 for ; Tue, 17 May 2016 16:29:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE04F20306 for ; Tue, 17 May 2016 16:29:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756204AbcEQQ3I (ORCPT ); Tue, 17 May 2016 12:29:08 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33203 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755882AbcEQQ3E (ORCPT ); Tue, 17 May 2016 12:29:04 -0400 Received: by mail-qk0-f194.google.com with SMTP id q184so1931407qkf.0 for ; Tue, 17 May 2016 09:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poochiereds-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HL0qz6PzunysQygcFvFCuV16WJym6j3VoWGMAX3OHOM=; b=qmlAW4saed8RT+uJA49SmGfaxLu902xo9j0ZYUbgTaV6hBwgtTmjTSfS4mW6S3pOvZ +QoEA/Tu8/q3f0iXa6G8HYKFxqGx1Qp6jDIrsig4+0nL3nkgHT1BIH2V4/jLa6AFxbsl v8sIuife5qZNyrEju0aZYHGB3GYZ6pfazZZBxHT3JLUrUUGF5BJO6bJcUYLgSaNPApNi G1ZiUnaNkCm0BcF1JkjPiDIIrxefl33UE4miacUrikT1sMo7tXMbMPkuxUZGS26lhejL B4j4MKP5V1IpIvgvuh45WYVicBqMthw7yYld8Ha4EfhUbGHZvAUuOGrIMsbqANaH1q+B IF0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HL0qz6PzunysQygcFvFCuV16WJym6j3VoWGMAX3OHOM=; b=irdL5Glwmt5QFcrcz4weHlkihVf9z9maXcBQArC8KoMcuBuPKuc8xUQpPKWtG3qBhK prjd6N2eJ313r1Fs7IV405IHdF7nMPU6RcnGJXkADC7tfvB0sEw5ejW+b503oWYZhktW 5urQqu/faMUkd0Fy2RTzRByXLm5lWWOFdHoQ7I/BRIu1b9Hhm457sx/vSvRjV45M92PZ ZbwkGCsJtxAdNdM8DcnkayBSHZ0+d2KawptJbbcXVk3uNtdofRUiMf48xi4s+jgaGHbG wFsP1tJO/L6VTuA8L0tmui+xKrndyeGpdap9VgQCRuPsrjXfHn/iWX/FzsT8o14rSt8t FHkQ== X-Gm-Message-State: AOPr4FV8yt1UlWyn40XEeJBv0LZBsaPSy+wNn9ye1t9gAa8NQd2LfUlX/iHg2ZLsL9c/Ig== X-Received: by 10.55.78.9 with SMTP id c9mr2782382qkb.0.1463502543259; Tue, 17 May 2016 09:29:03 -0700 (PDT) Received: from tlielax.poochiereds.net ([2606:a000:1125:4074:3a60:77ff:fe93:a95d]) by smtp.googlemail.com with ESMTPSA id a31sm1685827qga.34.2016.05.17.09.29.02 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 May 2016 09:29:02 -0700 (PDT) From: Jeff Layton X-Google-Original-From: Jeff Layton To: Trond Myklebust , Anna Schumaker Cc: Thomas Haynes , linux-nfs@vger.kernel.org, hch@lst.de Subject: [PATCH v4 08/13] flexfiles: remove pointless setting of NFS_LAYOUT_RETURN_REQUESTED Date: Tue, 17 May 2016 12:28:43 -0400 Message-Id: <1463502528-11519-9-git-send-email-jeff.layton@primarydata.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1463502528-11519-1-git-send-email-jeff.layton@primarydata.com> References: <1463502528-11519-1-git-send-email-jeff.layton@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Setting just the NFS_LAYOUT_RETURN_REQUESTED flag doesn't do anything, unless there are lsegs that are also being marked for return. At the point where that happens this flag is also set, so these set_bit calls don't do anything useful. Signed-off-by: Jeff Layton --- fs/nfs/flexfilelayout/flexfilelayout.c | 2 -- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 127a65fa639a..1c902b01db9e 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -1269,8 +1269,6 @@ static int ff_layout_read_done_cb(struct rpc_task *task, hdr->pgio_mirror_idx + 1, &hdr->pgio_mirror_idx)) goto out_eagain; - set_bit(NFS_LAYOUT_RETURN_REQUESTED, - &hdr->lseg->pls_layout->plh_flags); pnfs_read_resend_pnfs(hdr); return task->tk_status; case -NFS4ERR_RESET_TO_MDS: diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index c52ca75081a8..5532cb14e800 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -393,13 +393,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx, mirror, lseg->pls_range.offset, lseg->pls_range.length, NFS4ERR_NXIO, OP_ILLEGAL, GFP_NOIO); - if (!fail_return) { - if (ff_layout_has_available_ds(lseg)) - set_bit(NFS_LAYOUT_RETURN_REQUESTED, - &lseg->pls_layout->plh_flags); - else - pnfs_error_mark_layout_for_return(ino, lseg); - } else + if (fail_return || !ff_layout_has_available_ds(lseg)) pnfs_error_mark_layout_for_return(ino, lseg); ds = NULL; }