From patchwork Tue Dec 21 02:20:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fred Isaman X-Patchwork-Id: 423261 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBL2L5i6004622 for ; Tue, 21 Dec 2010 02:21:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933445Ab0LUCU4 (ORCPT ); Mon, 20 Dec 2010 21:20:56 -0500 Received: from mx2.netapp.com ([216.240.18.37]:46909 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933433Ab0LUCUz (ORCPT ); Mon, 20 Dec 2010 21:20:55 -0500 X-IronPort-AV: E=Sophos;i="4.60,205,1291622400"; d="scan'208";a="497219764" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 20 Dec 2010 18:20:55 -0800 Received: from localhost.localdomain (tomwang3-lxp.hq.netapp.com [10.58.52.177]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id oBL2Kp2I017931; Mon, 20 Dec 2010 18:20:54 -0800 (PST) From: Fred Isaman To: linux-nfs@vger.kernel.org Cc: Trond Myklebust Subject: [PATCH 03/14] pnfs: wave 2: rename lo->state to lo->plh_flags Date: Mon, 20 Dec 2010 21:20:35 -0500 Message-Id: <1292898046-7336-4-git-send-email-iisaman@netapp.com> X-Mailer: git-send-email 1.7.2.1 In-Reply-To: <1292898046-7336-1-git-send-email-iisaman@netapp.com> References: <1292898046-7336-1-git-send-email-iisaman@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 21 Dec 2010 02:21:06 +0000 (UTC) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 6e9daff..f6320e6 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -259,7 +259,7 @@ pnfs_clear_lseg_list(struct pnfs_layout_hdr *lo, struct list_head *tmp_list) list_del_init(&lo->layouts); spin_unlock(&clp->cl_lock); write_seqlock(&lo->seqlock); - clear_bit(NFS_LAYOUT_STATEID_SET, &lo->state); + clear_bit(NFS_LAYOUT_STATEID_SET, &lo->plh_flags); write_sequnlock(&lo->seqlock); dprintk("%s:Return\n", __func__); @@ -331,7 +331,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, bool overwrite = false; write_seqlock(&lo->seqlock); - if (!test_bit(NFS_LAYOUT_STATEID_SET, &lo->state) || + if (!test_bit(NFS_LAYOUT_STATEID_SET, &lo->plh_flags) || memcmp(old->stateid.other, new->stateid.other, sizeof(new->stateid.other))) overwrite = true; else { @@ -360,7 +360,7 @@ pnfs_layout_from_open_stateid(struct pnfs_layout_hdr *lo, memcpy(lo->stateid.data, state->stateid.data, sizeof(state->stateid.data)); } while (read_seqretry(&state->seqlock, seq)); - set_bit(NFS_LAYOUT_STATEID_SET, &lo->state); + set_bit(NFS_LAYOUT_STATEID_SET, &lo->plh_flags); write_sequnlock(&lo->seqlock); dprintk("<-- %s\n", __func__); } @@ -374,7 +374,7 @@ pnfs_get_layout_stateid(nfs4_stateid *dst, struct pnfs_layout_hdr *lo, dprintk("--> %s\n", __func__); do { seq = read_seqbegin(&lo->seqlock); - if (!test_bit(NFS_LAYOUT_STATEID_SET, &lo->state)) { + if (!test_bit(NFS_LAYOUT_STATEID_SET, &lo->plh_flags)) { /* This will trigger retry of the read */ pnfs_layout_from_open_stateid(lo, open_state); } else @@ -424,7 +424,7 @@ send_layoutget(struct pnfs_layout_hdr *lo, nfs4_proc_layoutget(lgp); if (!lseg) { /* remember that LAYOUTGET failed and suspend trying */ - set_bit(lo_fail_bit(iomode), &lo->state); + set_bit(lo_fail_bit(iomode), &lo->plh_flags); } return lseg; } @@ -597,7 +597,7 @@ pnfs_update_layout(struct inode *ino, } /* if LAYOUTGET already failed once we don't try again */ - if (test_bit(lo_fail_bit(iomode), &nfsi->layout->state)) + if (test_bit(lo_fail_bit(iomode), &nfsi->layout->plh_flags)) goto out_unlock; get_layout_hdr_locked(lo); /* Matched in nfs4_layoutget_release */ @@ -606,7 +606,7 @@ pnfs_update_layout(struct inode *ino, lseg = send_layoutget(lo, ctx, iomode); out: dprintk("%s end, state 0x%lx lseg %p\n", __func__, - nfsi->layout->state, lseg); + nfsi->layout->plh_flags, lseg); return lseg; out_unlock: spin_unlock(&ino->i_lock); diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h index e12367d..5e29d31 100644 --- a/fs/nfs/pnfs.h +++ b/fs/nfs/pnfs.h @@ -65,7 +65,7 @@ struct pnfs_layout_hdr { struct list_head segs; /* layout segments list */ seqlock_t seqlock; /* Protects the stateid */ nfs4_stateid stateid; - unsigned long state; + unsigned long plh_flags; struct inode *inode; };