aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfsd.h1
-rw-r--r--fs/nfsd/nfsfh.h59
-rw-r--r--fs/nfsd/state.h1
3 files changed, 55 insertions, 6 deletions
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 479eb681c27c..7d5c310678d0 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -15,6 +15,7 @@
15#include <linux/nfs2.h> 15#include <linux/nfs2.h>
16#include <linux/nfs3.h> 16#include <linux/nfs3.h>
17#include <linux/nfs4.h> 17#include <linux/nfs4.h>
18#include <linux/sunrpc/svc.h>
18#include <linux/sunrpc/msg_prot.h> 19#include <linux/sunrpc/msg_prot.h>
19 20
20#include <linux/nfsd/debug.h> 21#include <linux/nfsd/debug.h>
diff --git a/fs/nfsd/nfsfh.h b/fs/nfsd/nfsfh.h
index ad67964d0bb1..2e89e70ac15c 100644
--- a/fs/nfsd/nfsfh.h
+++ b/fs/nfsd/nfsfh.h
@@ -1,9 +1,58 @@
1/* Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> */ 1/*
2 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
3 *
4 * This file describes the layout of the file handles as passed
5 * over the wire.
6 */
7#ifndef _LINUX_NFSD_NFSFH_H
8#define _LINUX_NFSD_NFSFH_H
9
10#include <linux/sunrpc/svc.h>
11#include <uapi/linux/nfsd/nfsfh.h>
12
13static inline __u32 ino_t_to_u32(ino_t ino)
14{
15 return (__u32) ino;
16}
17
18static inline ino_t u32_to_ino_t(__u32 uino)
19{
20 return (ino_t) uino;
21}
2 22
3#ifndef _LINUX_NFSD_FH_INT_H 23/*
4#define _LINUX_NFSD_FH_INT_H 24 * This is the internal representation of an NFS handle used in knfsd.
25 * pre_mtime/post_version will be used to support wcc_attr's in NFSv3.
26 */
27typedef struct svc_fh {
28 struct knfsd_fh fh_handle; /* FH data */
29 struct dentry * fh_dentry; /* validated dentry */
30 struct svc_export * fh_export; /* export pointer */
31 int fh_maxsize; /* max size for fh_handle */
32
33 unsigned char fh_locked; /* inode locked by us */
34 unsigned char fh_want_write; /* remount protection taken */
35
36#ifdef CONFIG_NFSD_V3
37 unsigned char fh_post_saved; /* post-op attrs saved */
38 unsigned char fh_pre_saved; /* pre-op attrs saved */
39
40 /* Pre-op attributes saved during fh_lock */
41 __u64 fh_pre_size; /* size before operation */
42 struct timespec fh_pre_mtime; /* mtime before oper */
43 struct timespec fh_pre_ctime; /* ctime before oper */
44 /*
45 * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode)
46 * to find out if it is valid.
47 */
48 u64 fh_pre_change;
49
50 /* Post-op attributes saved in fh_unlock */
51 struct kstat fh_post_attr; /* full attrs after operation */
52 u64 fh_post_change; /* nfsv4 change; see above */
53#endif /* CONFIG_NFSD_V3 */
5 54
6#include <linux/nfsd/nfsfh.h> 55} svc_fh;
7 56
8enum nfsd_fsid { 57enum nfsd_fsid {
9 FSID_DEV = 0, 58 FSID_DEV = 0,
@@ -215,4 +264,4 @@ fh_unlock(struct svc_fh *fhp)
215 } 264 }
216} 265}
217 266
218#endif /* _LINUX_NFSD_FH_INT_H */ 267#endif /* _LINUX_NFSD_NFSFH_H */
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index 424d8f5f2317..5b3bbf24097c 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -37,7 +37,6 @@
37 37
38#include <linux/idr.h> 38#include <linux/idr.h>
39#include <linux/sunrpc/svc_xprt.h> 39#include <linux/sunrpc/svc_xprt.h>
40#include <linux/nfsd/nfsfh.h>
41#include "nfsfh.h" 40#include "nfsfh.h"
42 41
43typedef struct { 42typedef struct {