From: Jeff Layton Date: Tue, 17 May 2016 16:28:40 +0000 (-0400) Subject: pnfs: record sequence in pnfs_layout_segment when it's created X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6675528380f8b7fffa82047211d8352dc6797321;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Anna Schumaker --- 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) 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;