aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /include/linux/nfs_fs.h
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h43
1 files changed, 27 insertions, 16 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 508f8cf6da37..1b93b9c60e55 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -33,6 +33,8 @@
33#define FLUSH_STABLE 4 /* commit to stable storage */ 33#define FLUSH_STABLE 4 /* commit to stable storage */
34#define FLUSH_LOWPRI 8 /* low priority background flush */ 34#define FLUSH_LOWPRI 8 /* low priority background flush */
35#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ 35#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */
36#define FLUSH_COND_STABLE 32 /* conditional stable write - only stable
37 * if everything fits in one RPC */
36 38
37#ifdef __KERNEL__ 39#ifdef __KERNEL__
38 40
@@ -93,8 +95,13 @@ struct nfs_open_context {
93 int error; 95 int error;
94 96
95 struct list_head list; 97 struct list_head list;
98};
96 99
100struct nfs_open_dir_context {
101 struct rpc_cred *cred;
97 __u64 dir_cookie; 102 __u64 dir_cookie;
103 __u64 dup_cookie;
104 int duped;
98}; 105};
99 106
100/* 107/*
@@ -185,9 +192,13 @@ struct nfs_inode {
185 struct nfs4_cached_acl *nfs4_acl; 192 struct nfs4_cached_acl *nfs4_acl;
186 /* NFSv4 state */ 193 /* NFSv4 state */
187 struct list_head open_states; 194 struct list_head open_states;
188 struct nfs_delegation *delegation; 195 struct nfs_delegation __rcu *delegation;
189 fmode_t delegation_state; 196 fmode_t delegation_state;
190 struct rw_semaphore rwsem; 197 struct rw_semaphore rwsem;
198
199 /* pNFS layout information */
200 struct pnfs_layout_hdr *layout;
201 atomic_t commits_outstanding;
191#endif /* CONFIG_NFS_V4*/ 202#endif /* CONFIG_NFS_V4*/
192#ifdef CONFIG_NFS_FSCACHE 203#ifdef CONFIG_NFS_FSCACHE
193 struct fscache_cookie *fscache; 204 struct fscache_cookie *fscache;
@@ -212,11 +223,12 @@ struct nfs_inode {
212#define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */ 223#define NFS_INO_ADVISE_RDPLUS (0) /* advise readdirplus */
213#define NFS_INO_STALE (1) /* possible stale inode */ 224#define NFS_INO_STALE (1) /* possible stale inode */
214#define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ 225#define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */
215#define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */
216#define NFS_INO_FLUSHING (4) /* inode is flushing out data */ 226#define NFS_INO_FLUSHING (4) /* inode is flushing out data */
217#define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */ 227#define NFS_INO_FSCACHE (5) /* inode can be cached by FS-Cache */
218#define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */ 228#define NFS_INO_FSCACHE_LOCK (6) /* FS-Cache cookie management lock */
219#define NFS_INO_COMMIT (7) /* inode is committing unstable writes */ 229#define NFS_INO_COMMIT (7) /* inode is committing unstable writes */
230#define NFS_INO_PNFS_COMMIT (8) /* use pnfs code for commit */
231#define NFS_INO_LAYOUTCOMMIT (9) /* layoutcommit required */
220 232
221static inline struct nfs_inode *NFS_I(const struct inode *inode) 233static inline struct nfs_inode *NFS_I(const struct inode *inode)
222{ 234{
@@ -348,7 +360,7 @@ extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
348extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); 360extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);
349extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); 361extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr);
350extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); 362extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
351extern int nfs_permission(struct inode *, int); 363extern int nfs_permission(struct inode *, int, unsigned int);
352extern int nfs_open(struct inode *, struct file *); 364extern int nfs_open(struct inode *, struct file *);
353extern int nfs_release(struct inode *, struct file *); 365extern int nfs_release(struct inode *, struct file *);
354extern int nfs_attribute_timeout(struct inode *inode); 366extern int nfs_attribute_timeout(struct inode *inode);
@@ -360,10 +372,13 @@ extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
360extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); 372extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
361extern void put_nfs_open_context(struct nfs_open_context *ctx); 373extern void put_nfs_open_context(struct nfs_open_context *ctx);
362extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode); 374extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, fmode_t mode);
375extern struct nfs_open_context *alloc_nfs_open_context(struct path *path, struct rpc_cred *cred, fmode_t f_mode);
376extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx);
363extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx); 377extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx);
364extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx); 378extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx);
365extern u64 nfs_compat_user_ino64(u64 fileid); 379extern u64 nfs_compat_user_ino64(u64 fileid);
366extern void nfs_fattr_init(struct nfs_fattr *fattr); 380extern void nfs_fattr_init(struct nfs_fattr *fattr);
381extern unsigned long nfs_inc_attr_generation_counter(void);
367 382
368extern struct nfs_fattr *nfs_alloc_fattr(void); 383extern struct nfs_fattr *nfs_alloc_fattr(void);
369 384
@@ -379,9 +394,12 @@ static inline void nfs_free_fhandle(const struct nfs_fh *fh)
379 kfree(fh); 394 kfree(fh);
380} 395}
381 396
397/*
398 * linux/fs/nfs/nfsroot.c
399 */
400extern int nfs_root_data(char **root_device, char **root_data); /*__init*/
382/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ 401/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */
383extern __be32 root_nfs_parse_addr(char *name); /*__init*/ 402extern __be32 root_nfs_parse_addr(char *name); /*__init*/
384extern unsigned long nfs_inc_attr_generation_counter(void);
385 403
386/* 404/*
387 * linux/fs/nfs/file.c 405 * linux/fs/nfs/file.c
@@ -392,6 +410,7 @@ extern const struct inode_operations nfs3_file_inode_operations;
392#endif /* CONFIG_NFS_V3 */ 410#endif /* CONFIG_NFS_V3 */
393extern const struct file_operations nfs_file_operations; 411extern const struct file_operations nfs_file_operations;
394extern const struct address_space_operations nfs_file_aops; 412extern const struct address_space_operations nfs_file_aops;
413extern const struct address_space_operations nfs_dir_aops;
395 414
396static inline struct nfs_open_context *nfs_file_open_context(struct file *filp) 415static inline struct nfs_open_context *nfs_file_open_context(struct file *filp)
397{ 416{
@@ -479,10 +498,10 @@ extern void nfs_release_automount_timer(void);
479/* 498/*
480 * linux/fs/nfs/unlink.c 499 * linux/fs/nfs/unlink.c
481 */ 500 */
482extern int nfs_async_unlink(struct inode *dir, struct dentry *dentry);
483extern void nfs_complete_unlink(struct dentry *dentry, struct inode *); 501extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
484extern void nfs_block_sillyrename(struct dentry *dentry); 502extern void nfs_block_sillyrename(struct dentry *dentry);
485extern void nfs_unblock_sillyrename(struct dentry *dentry); 503extern void nfs_unblock_sillyrename(struct dentry *dentry);
504extern int nfs_sillyrename(struct inode *dir, struct dentry *dentry);
486 505
487/* 506/*
488 * linux/fs/nfs/write.c 507 * linux/fs/nfs/write.c
@@ -492,7 +511,7 @@ extern int nfs_writepage(struct page *page, struct writeback_control *wbc);
492extern int nfs_writepages(struct address_space *, struct writeback_control *); 511extern int nfs_writepages(struct address_space *, struct writeback_control *);
493extern int nfs_flush_incompatible(struct file *file, struct page *page); 512extern int nfs_flush_incompatible(struct file *file, struct page *page);
494extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); 513extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
495extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); 514extern void nfs_writeback_done(struct rpc_task *, struct nfs_write_data *);
496 515
497/* 516/*
498 * Try to write back everything synchronously (but check the 517 * Try to write back everything synchronously (but check the
@@ -584,16 +603,6 @@ nfs_fileid_to_ino_t(u64 fileid)
584 return ino; 603 return ino;
585} 604}
586 605
587/* NFS root */
588
589extern void * nfs_root_data(void);
590
591#define nfs_wait_event(clnt, wq, condition) \
592({ \
593 int __retval = wait_event_killable(wq, condition); \
594 __retval; \
595})
596
597#define NFS_JUKEBOX_RETRY_TIME (5 * HZ) 606#define NFS_JUKEBOX_RETRY_TIME (5 * HZ)
598 607
599#endif /* __KERNEL__ */ 608#endif /* __KERNEL__ */
@@ -613,6 +622,8 @@ extern void * nfs_root_data(void);
613#define NFSDBG_CLIENT 0x0200 622#define NFSDBG_CLIENT 0x0200
614#define NFSDBG_MOUNT 0x0400 623#define NFSDBG_MOUNT 0x0400
615#define NFSDBG_FSCACHE 0x0800 624#define NFSDBG_FSCACHE 0x0800
625#define NFSDBG_PNFS 0x1000
626#define NFSDBG_PNFS_LD 0x2000
616#define NFSDBG_ALL 0xFFFF 627#define NFSDBG_ALL 0xFFFF
617 628
618#ifdef __KERNEL__ 629#ifdef __KERNEL__