diff options
author | Jeff Layton <jlayton@poochiereds.net> | 2016-05-17 12:28:40 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-05-17 15:48:09 -0400 |
commit | 6675528380f8b7fffa82047211d8352dc6797321 (patch) | |
tree | 913a2fabf93fb27185379e3fd5fdc07e3480ad6f | |
parent | ee26bdd680aa10df628499fe95a7b88345574248 (diff) |
pnfs: record sequence in pnfs_layout_segment when it's created
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 <jeff.layton@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r-- | fs/nfs/pnfs.c | 1 | ||||
-rw-r--r-- | fs/nfs/pnfs.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index faea98281c75..c09ced88bd38 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c | |||
@@ -1697,6 +1697,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp) | |||
1697 | 1697 | ||
1698 | init_lseg(lo, lseg); | 1698 | init_lseg(lo, lseg); |
1699 | lseg->pls_range = res->range; | 1699 | lseg->pls_range = res->range; |
1700 | lseg->pls_seq = be32_to_cpu(res->stateid.seqid); | ||
1700 | 1701 | ||
1701 | spin_lock(&ino->i_lock); | 1702 | spin_lock(&ino->i_lock); |
1702 | if (pnfs_layoutgets_blocked(lo)) { | 1703 | 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 { | |||
64 | struct list_head pls_lc_list; | 64 | struct list_head pls_lc_list; |
65 | struct pnfs_layout_range pls_range; | 65 | struct pnfs_layout_range pls_range; |
66 | atomic_t pls_refcount; | 66 | atomic_t pls_refcount; |
67 | u32 pls_seq; | ||
67 | unsigned long pls_flags; | 68 | unsigned long pls_flags; |
68 | struct pnfs_layout_hdr *pls_layout; | 69 | struct pnfs_layout_hdr *pls_layout; |
69 | struct work_struct pls_work; | 70 | struct work_struct pls_work; |