From patchwork Sun May 15 01:06:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 9095761 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 AC4DE9F441 for ; Sun, 15 May 2016 01:07:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D4D282025A for ; Sun, 15 May 2016 01:07:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D23A120263 for ; Sun, 15 May 2016 01:07:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754005AbcEOBHA (ORCPT ); Sat, 14 May 2016 21:07:00 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:35124 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753999AbcEOBG6 (ORCPT ); Sat, 14 May 2016 21:06:58 -0400 Received: by mail-qk0-f194.google.com with SMTP id n62so5069633qkc.2 for ; Sat, 14 May 2016 18:06:57 -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=injMkXzLVLolGv//2KBQ1mlwZKMHPZjFmc3Mi+YaNKc=; b=H2KZXFYdkER5Y64jWGNfgVqMCZckInz+OMzBS3VoMxFJiFhm7/Fcq33Ja2Hj2H81oo F5MeSuMHizXfo9CgkxWpfO/sKC0LMkx3R0PAskBJ9AA+SXowe1T04RHVIgmyAmIUZigz RJ4IsiHxnk/W4cEzBY5fmijxQrYlF2Y1gsoJbPpinAHPUKoKnyx7CSUBoKxgquG6SSaq JrnC3P8dMZXPv5UTgjibe2Syc8/N/VbQNVVQIhZY1C0XXRn/S5tMzu3oRRJk7cBVCjbi hU/j9YsVGZIzpgLS+Pu62DQtoFUlUhZ2qPt8JBmFbRvmeGp/Of0CwIFz99sU/FLWCG5r oRfw== 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=injMkXzLVLolGv//2KBQ1mlwZKMHPZjFmc3Mi+YaNKc=; b=FVsm5+pRG9l6Gt/lzSddbzpTFyAuEE9HjWtQh20t6t82rFa6AKlUzO3PCI95u8qokN o1zd5qHryZ08bDukiPIEHiooHFsMArmco62hDSePyjJUejp7vnWTxJ1ky7LNFexiWk6p rRD297iEJWjypEGymKgdtXbuMtoUFnm/iumwh8qjRA/UUZEJh6rxc0MEN9CVQ6JYUBxM XZtogjGhIICu0T+l8y9AYReJ0WmI/4IJBTB3kxap/wKfgaMCodWUPsMYwH5A+XJdBaAI mb7SxVxR2Fj8GBK6PD7CDcR57MHAqxzMZbbsmmiN5sfyRyntncXv460JB03h+BCT+ppp P6DQ== X-Gm-Message-State: AOPr4FUw1LPRDqFZhSxS5Z+Y5eic98ZCvJ+QZh2+SYJjVu+eWbo0/OAAEdpiBMXUAqNOlQ== X-Received: by 10.55.42.81 with SMTP id q78mr16239785qkh.41.1463274416888; Sat, 14 May 2016 18:06:56 -0700 (PDT) Received: from tlielax.poochiereds.net ([2606:a000:1125:4074:3a60:77ff:fe93:a95d]) by smtp.googlemail.com with ESMTPSA id d12sm11520330qhd.13.2016.05.14.18.06.55 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 May 2016 18:06:56 -0700 (PDT) From: Jeff Layton X-Google-Original-From: Jeff Layton To: Trond Myklebust , Anna Schumaker Cc: linux-nfs@vger.kernel.org, hch@infradead.org Subject: [PATCH v3 05/13] pnfs: record sequence in pnfs_layout_segment when it's created Date: Sat, 14 May 2016 21:06:34 -0400 Message-Id: <1463274402-17746-6-git-send-email-jeff.layton@primarydata.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1463274402-17746-1-git-send-email-jeff.layton@primarydata.com> References: <1463274402-17746-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 In later patches, we're going to teach the client to be more selective about how it returns layouts. This means keeping a record of what the stateid's seqid was at the time that the server handed out a layout segment. Signed-off-by: Jeff Layton --- fs/nfs/pnfs.c | 1 + fs/nfs/pnfs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 5b404d926e08..18b6f950e300 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1697,6 +1697,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp) init_lseg(lo, lseg); lseg->pls_range = res->range; + lseg->pls_seq = be32_to_cpu(res->stateid.seqid); spin_lock(&ino->i_lock); if (pnfs_layoutgets_blocked(lo)) { diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index 7222d3a35439..361fa5494aa5 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h @@ -64,6 +64,7 @@ struct pnfs_layout_segment { struct list_head pls_lc_list; struct pnfs_layout_range pls_range; atomic_t pls_refcount; + u32 pls_seq; unsigned long pls_flags; struct pnfs_layout_hdr *pls_layout; struct work_struct pls_work;