diff options
author | Steve French <sfrench@us.ibm.com> | 2005-06-22 21:26:47 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-06-22 21:26:47 -0400 |
commit | ea0daab4ae4a2f853f06c76961c0ed324fd0804c (patch) | |
tree | f6fbe2db5772695181b7a7257b05e43343bd8d75 /include/linux/nfs_fs.h | |
parent | 58aab753de605c14b9878a897e7349c3063afeff (diff) | |
parent | 1bdf7a78c2b21fb94dfe7994dbe89310b18479d2 (diff) |
Merge with rsync://rsync.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r-- | include/linux/nfs_fs.h | 306 |
1 files changed, 59 insertions, 247 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index dbac7f363e5d..8ea249110fb0 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/pagemap.h> | 15 | #include <linux/pagemap.h> |
16 | #include <linux/rwsem.h> | 16 | #include <linux/rwsem.h> |
17 | #include <linux/wait.h> | 17 | #include <linux/wait.h> |
18 | #include <linux/uio.h> | ||
19 | 18 | ||
20 | #include <linux/nfs_fs_sb.h> | 19 | #include <linux/nfs_fs_sb.h> |
21 | 20 | ||
@@ -29,7 +28,6 @@ | |||
29 | #include <linux/nfs4.h> | 28 | #include <linux/nfs4.h> |
30 | #include <linux/nfs_xdr.h> | 29 | #include <linux/nfs_xdr.h> |
31 | #include <linux/rwsem.h> | 30 | #include <linux/rwsem.h> |
32 | #include <linux/workqueue.h> | ||
33 | #include <linux/mempool.h> | 31 | #include <linux/mempool.h> |
34 | 32 | ||
35 | /* | 33 | /* |
@@ -44,13 +42,6 @@ | |||
44 | #define NFS_DEF_FILE_IO_BUFFER_SIZE 4096 | 42 | #define NFS_DEF_FILE_IO_BUFFER_SIZE 4096 |
45 | 43 | ||
46 | /* | 44 | /* |
47 | * The upper limit on timeouts for the exponential backoff algorithm. | ||
48 | */ | ||
49 | #define NFS_WRITEBACK_DELAY (5*HZ) | ||
50 | #define NFS_WRITEBACK_LOCKDELAY (60*HZ) | ||
51 | #define NFS_COMMIT_DELAY (5*HZ) | ||
52 | |||
53 | /* | ||
54 | * superblock magic number for NFS | 45 | * superblock magic number for NFS |
55 | */ | 46 | */ |
56 | #define NFS_SUPER_MAGIC 0x6969 | 47 | #define NFS_SUPER_MAGIC 0x6969 |
@@ -60,9 +51,6 @@ | |||
60 | */ | 51 | */ |
61 | #define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) | 52 | #define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) |
62 | 53 | ||
63 | #define NFS_RW_SYNC 0x0001 /* O_SYNC handling */ | ||
64 | #define NFS_RW_SWAP 0x0002 /* This is a swap request */ | ||
65 | |||
66 | /* | 54 | /* |
67 | * When flushing a cluster of dirty pages, there can be different | 55 | * When flushing a cluster of dirty pages, there can be different |
68 | * strategies: | 56 | * strategies: |
@@ -96,7 +84,8 @@ struct nfs_open_context { | |||
96 | int error; | 84 | int error; |
97 | 85 | ||
98 | struct list_head list; | 86 | struct list_head list; |
99 | wait_queue_head_t waitq; | 87 | |
88 | __u64 dir_cookie; | ||
100 | }; | 89 | }; |
101 | 90 | ||
102 | /* | 91 | /* |
@@ -104,6 +93,8 @@ struct nfs_open_context { | |||
104 | */ | 93 | */ |
105 | struct nfs_delegation; | 94 | struct nfs_delegation; |
106 | 95 | ||
96 | struct posix_acl; | ||
97 | |||
107 | /* | 98 | /* |
108 | * nfs fs inode data in memory | 99 | * nfs fs inode data in memory |
109 | */ | 100 | */ |
@@ -140,7 +131,6 @@ struct nfs_inode { | |||
140 | * | 131 | * |
141 | * mtime != read_cache_mtime | 132 | * mtime != read_cache_mtime |
142 | */ | 133 | */ |
143 | unsigned long readdir_timestamp; | ||
144 | unsigned long read_cache_jiffies; | 134 | unsigned long read_cache_jiffies; |
145 | unsigned long attrtimeo; | 135 | unsigned long attrtimeo; |
146 | unsigned long attrtimeo_timestamp; | 136 | unsigned long attrtimeo_timestamp; |
@@ -158,6 +148,10 @@ struct nfs_inode { | |||
158 | atomic_t data_updates; | 148 | atomic_t data_updates; |
159 | 149 | ||
160 | struct nfs_access_entry cache_access; | 150 | struct nfs_access_entry cache_access; |
151 | #ifdef CONFIG_NFS_V3_ACL | ||
152 | struct posix_acl *acl_access; | ||
153 | struct posix_acl *acl_default; | ||
154 | #endif | ||
161 | 155 | ||
162 | /* | 156 | /* |
163 | * This is the cookie verifier used for NFSv3 readdir | 157 | * This is the cookie verifier used for NFSv3 readdir |
@@ -183,13 +177,13 @@ struct nfs_inode { | |||
183 | wait_queue_head_t nfs_i_wait; | 177 | wait_queue_head_t nfs_i_wait; |
184 | 178 | ||
185 | #ifdef CONFIG_NFS_V4 | 179 | #ifdef CONFIG_NFS_V4 |
180 | struct nfs4_cached_acl *nfs4_acl; | ||
186 | /* NFSv4 state */ | 181 | /* NFSv4 state */ |
187 | struct list_head open_states; | 182 | struct list_head open_states; |
188 | struct nfs_delegation *delegation; | 183 | struct nfs_delegation *delegation; |
189 | int delegation_state; | 184 | int delegation_state; |
190 | struct rw_semaphore rwsem; | 185 | struct rw_semaphore rwsem; |
191 | #endif /* CONFIG_NFS_V4*/ | 186 | #endif /* CONFIG_NFS_V4*/ |
192 | |||
193 | struct inode vfs_inode; | 187 | struct inode vfs_inode; |
194 | }; | 188 | }; |
195 | 189 | ||
@@ -203,6 +197,8 @@ struct nfs_inode { | |||
203 | #define NFS_INO_INVALID_DATA 0x0010 /* cached data is invalid */ | 197 | #define NFS_INO_INVALID_DATA 0x0010 /* cached data is invalid */ |
204 | #define NFS_INO_INVALID_ATIME 0x0020 /* cached atime is invalid */ | 198 | #define NFS_INO_INVALID_ATIME 0x0020 /* cached atime is invalid */ |
205 | #define NFS_INO_INVALID_ACCESS 0x0040 /* cached access cred invalid */ | 199 | #define NFS_INO_INVALID_ACCESS 0x0040 /* cached access cred invalid */ |
200 | #define NFS_INO_INVALID_ACL 0x0080 /* cached acls are invalid */ | ||
201 | #define NFS_INO_REVAL_PAGECACHE 0x1000 /* must revalidate pagecache */ | ||
206 | 202 | ||
207 | static inline struct nfs_inode *NFS_I(struct inode *inode) | 203 | static inline struct nfs_inode *NFS_I(struct inode *inode) |
208 | { | 204 | { |
@@ -294,12 +290,12 @@ extern int nfs_release(struct inode *, struct file *); | |||
294 | extern int nfs_attribute_timeout(struct inode *inode); | 290 | extern int nfs_attribute_timeout(struct inode *inode); |
295 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); | 291 | extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); |
296 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); | 292 | extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); |
293 | extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); | ||
297 | extern int nfs_setattr(struct dentry *, struct iattr *); | 294 | extern int nfs_setattr(struct dentry *, struct iattr *); |
298 | extern void nfs_begin_attr_update(struct inode *); | 295 | extern void nfs_begin_attr_update(struct inode *); |
299 | extern void nfs_end_attr_update(struct inode *); | 296 | extern void nfs_end_attr_update(struct inode *); |
300 | extern void nfs_begin_data_update(struct inode *); | 297 | extern void nfs_begin_data_update(struct inode *); |
301 | extern void nfs_end_data_update(struct inode *); | 298 | extern void nfs_end_data_update(struct inode *); |
302 | extern void nfs_end_data_update_defer(struct inode *); | ||
303 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred); | 299 | extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, struct rpc_cred *cred); |
304 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); | 300 | extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); |
305 | extern void put_nfs_open_context(struct nfs_open_context *ctx); | 301 | extern void put_nfs_open_context(struct nfs_open_context *ctx); |
@@ -314,6 +310,9 @@ extern u32 root_nfs_parse_addr(char *name); /*__init*/ | |||
314 | * linux/fs/nfs/file.c | 310 | * linux/fs/nfs/file.c |
315 | */ | 311 | */ |
316 | extern struct inode_operations nfs_file_inode_operations; | 312 | extern struct inode_operations nfs_file_inode_operations; |
313 | #ifdef CONFIG_NFS_V3 | ||
314 | extern struct inode_operations nfs3_file_inode_operations; | ||
315 | #endif /* CONFIG_NFS_V3 */ | ||
317 | extern struct file_operations nfs_file_operations; | 316 | extern struct file_operations nfs_file_operations; |
318 | extern struct address_space_operations nfs_file_aops; | 317 | extern struct address_space_operations nfs_file_aops; |
319 | 318 | ||
@@ -329,6 +328,22 @@ static inline struct rpc_cred *nfs_file_cred(struct file *file) | |||
329 | } | 328 | } |
330 | 329 | ||
331 | /* | 330 | /* |
331 | * linux/fs/nfs/xattr.c | ||
332 | */ | ||
333 | #ifdef CONFIG_NFS_V3_ACL | ||
334 | extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t); | ||
335 | extern ssize_t nfs3_getxattr(struct dentry *, const char *, void *, size_t); | ||
336 | extern int nfs3_setxattr(struct dentry *, const char *, | ||
337 | const void *, size_t, int); | ||
338 | extern int nfs3_removexattr (struct dentry *, const char *name); | ||
339 | #else | ||
340 | # define nfs3_listxattr NULL | ||
341 | # define nfs3_getxattr NULL | ||
342 | # define nfs3_setxattr NULL | ||
343 | # define nfs3_removexattr NULL | ||
344 | #endif | ||
345 | |||
346 | /* | ||
332 | * linux/fs/nfs/direct.c | 347 | * linux/fs/nfs/direct.c |
333 | */ | 348 | */ |
334 | extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, | 349 | extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, |
@@ -342,6 +357,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, | |||
342 | * linux/fs/nfs/dir.c | 357 | * linux/fs/nfs/dir.c |
343 | */ | 358 | */ |
344 | extern struct inode_operations nfs_dir_inode_operations; | 359 | extern struct inode_operations nfs_dir_inode_operations; |
360 | #ifdef CONFIG_NFS_V3 | ||
361 | extern struct inode_operations nfs3_dir_inode_operations; | ||
362 | #endif /* CONFIG_NFS_V3 */ | ||
345 | extern struct file_operations nfs_dir_operations; | 363 | extern struct file_operations nfs_dir_operations; |
346 | extern struct dentry_operations nfs_dentry_operations; | 364 | extern struct dentry_operations nfs_dentry_operations; |
347 | 365 | ||
@@ -377,10 +395,10 @@ extern void nfs_commit_done(struct rpc_task *); | |||
377 | */ | 395 | */ |
378 | extern int nfs_sync_inode(struct inode *, unsigned long, unsigned int, int); | 396 | extern int nfs_sync_inode(struct inode *, unsigned long, unsigned int, int); |
379 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 397 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
380 | extern int nfs_commit_inode(struct inode *, unsigned long, unsigned int, int); | 398 | extern int nfs_commit_inode(struct inode *, int); |
381 | #else | 399 | #else |
382 | static inline int | 400 | static inline int |
383 | nfs_commit_inode(struct inode *inode, unsigned long idx_start, unsigned int npages, int how) | 401 | nfs_commit_inode(struct inode *inode, int how) |
384 | { | 402 | { |
385 | return 0; | 403 | return 0; |
386 | } | 404 | } |
@@ -434,11 +452,6 @@ static inline void nfs_writedata_free(struct nfs_write_data *p) | |||
434 | mempool_free(p, nfs_wdata_mempool); | 452 | mempool_free(p, nfs_wdata_mempool); |
435 | } | 453 | } |
436 | 454 | ||
437 | /* Hack for future NFS swap support */ | ||
438 | #ifndef IS_SWAPFILE | ||
439 | # define IS_SWAPFILE(inode) (0) | ||
440 | #endif | ||
441 | |||
442 | /* | 455 | /* |
443 | * linux/fs/nfs/read.c | 456 | * linux/fs/nfs/read.c |
444 | */ | 457 | */ |
@@ -468,6 +481,29 @@ static inline void nfs_readdata_free(struct nfs_read_data *p) | |||
468 | extern void nfs_readdata_release(struct rpc_task *task); | 481 | extern void nfs_readdata_release(struct rpc_task *task); |
469 | 482 | ||
470 | /* | 483 | /* |
484 | * linux/fs/nfs3proc.c | ||
485 | */ | ||
486 | #ifdef CONFIG_NFS_V3_ACL | ||
487 | extern struct posix_acl *nfs3_proc_getacl(struct inode *inode, int type); | ||
488 | extern int nfs3_proc_setacl(struct inode *inode, int type, | ||
489 | struct posix_acl *acl); | ||
490 | extern int nfs3_proc_set_default_acl(struct inode *dir, struct inode *inode, | ||
491 | mode_t mode); | ||
492 | extern void nfs3_forget_cached_acls(struct inode *inode); | ||
493 | #else | ||
494 | static inline int nfs3_proc_set_default_acl(struct inode *dir, | ||
495 | struct inode *inode, | ||
496 | mode_t mode) | ||
497 | { | ||
498 | return 0; | ||
499 | } | ||
500 | |||
501 | static inline void nfs3_forget_cached_acls(struct inode *inode) | ||
502 | { | ||
503 | } | ||
504 | #endif /* CONFIG_NFS_V3_ACL */ | ||
505 | |||
506 | /* | ||
471 | * linux/fs/mount_clnt.c | 507 | * linux/fs/mount_clnt.c |
472 | * (Used only by nfsroot module) | 508 | * (Used only by nfsroot module) |
473 | */ | 509 | */ |
@@ -515,230 +551,6 @@ extern void * nfs_root_data(void); | |||
515 | 551 | ||
516 | #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) | 552 | #define NFS_JUKEBOX_RETRY_TIME (5 * HZ) |
517 | 553 | ||
518 | #ifdef CONFIG_NFS_V4 | ||
519 | |||
520 | struct idmap; | ||
521 | |||
522 | /* | ||
523 | * In a seqid-mutating op, this macro controls which error return | ||
524 | * values trigger incrementation of the seqid. | ||
525 | * | ||
526 | * from rfc 3010: | ||
527 | * The client MUST monotonically increment the sequence number for the | ||
528 | * CLOSE, LOCK, LOCKU, OPEN, OPEN_CONFIRM, and OPEN_DOWNGRADE | ||
529 | * operations. This is true even in the event that the previous | ||
530 | * operation that used the sequence number received an error. The only | ||
531 | * exception to this rule is if the previous operation received one of | ||
532 | * the following errors: NFSERR_STALE_CLIENTID, NFSERR_STALE_STATEID, | ||
533 | * NFSERR_BAD_STATEID, NFSERR_BAD_SEQID, NFSERR_BADXDR, | ||
534 | * NFSERR_RESOURCE, NFSERR_NOFILEHANDLE. | ||
535 | * | ||
536 | */ | ||
537 | #define seqid_mutating_err(err) \ | ||
538 | (((err) != NFSERR_STALE_CLIENTID) && \ | ||
539 | ((err) != NFSERR_STALE_STATEID) && \ | ||
540 | ((err) != NFSERR_BAD_STATEID) && \ | ||
541 | ((err) != NFSERR_BAD_SEQID) && \ | ||
542 | ((err) != NFSERR_BAD_XDR) && \ | ||
543 | ((err) != NFSERR_RESOURCE) && \ | ||
544 | ((err) != NFSERR_NOFILEHANDLE)) | ||
545 | |||
546 | enum nfs4_client_state { | ||
547 | NFS4CLNT_OK = 0, | ||
548 | }; | ||
549 | |||
550 | /* | ||
551 | * The nfs4_client identifies our client state to the server. | ||
552 | */ | ||
553 | struct nfs4_client { | ||
554 | struct list_head cl_servers; /* Global list of servers */ | ||
555 | struct in_addr cl_addr; /* Server identifier */ | ||
556 | u64 cl_clientid; /* constant */ | ||
557 | nfs4_verifier cl_confirm; | ||
558 | unsigned long cl_state; | ||
559 | |||
560 | u32 cl_lockowner_id; | ||
561 | |||
562 | /* | ||
563 | * The following rwsem ensures exclusive access to the server | ||
564 | * while we recover the state following a lease expiration. | ||
565 | */ | ||
566 | struct rw_semaphore cl_sem; | ||
567 | |||
568 | struct list_head cl_delegations; | ||
569 | struct list_head cl_state_owners; | ||
570 | struct list_head cl_unused; | ||
571 | int cl_nunused; | ||
572 | spinlock_t cl_lock; | ||
573 | atomic_t cl_count; | ||
574 | |||
575 | struct rpc_clnt * cl_rpcclient; | ||
576 | struct rpc_cred * cl_cred; | ||
577 | |||
578 | struct list_head cl_superblocks; /* List of nfs_server structs */ | ||
579 | |||
580 | unsigned long cl_lease_time; | ||
581 | unsigned long cl_last_renewal; | ||
582 | struct work_struct cl_renewd; | ||
583 | struct work_struct cl_recoverd; | ||
584 | |||
585 | wait_queue_head_t cl_waitq; | ||
586 | struct rpc_wait_queue cl_rpcwaitq; | ||
587 | |||
588 | /* used for the setclientid verifier */ | ||
589 | struct timespec cl_boot_time; | ||
590 | |||
591 | /* idmapper */ | ||
592 | struct idmap * cl_idmap; | ||
593 | |||
594 | /* Our own IP address, as a null-terminated string. | ||
595 | * This is used to generate the clientid, and the callback address. | ||
596 | */ | ||
597 | char cl_ipaddr[16]; | ||
598 | unsigned char cl_id_uniquifier; | ||
599 | }; | ||
600 | |||
601 | /* | ||
602 | * NFS4 state_owners and lock_owners are simply labels for ordered | ||
603 | * sequences of RPC calls. Their sole purpose is to provide once-only | ||
604 | * semantics by allowing the server to identify replayed requests. | ||
605 | * | ||
606 | * The ->so_sema is held during all state_owner seqid-mutating operations: | ||
607 | * OPEN, OPEN_DOWNGRADE, and CLOSE. Its purpose is to properly serialize | ||
608 | * so_seqid. | ||
609 | */ | ||
610 | struct nfs4_state_owner { | ||
611 | struct list_head so_list; /* per-clientid list of state_owners */ | ||
612 | struct nfs4_client *so_client; | ||
613 | u32 so_id; /* 32-bit identifier, unique */ | ||
614 | struct semaphore so_sema; | ||
615 | u32 so_seqid; /* protected by so_sema */ | ||
616 | atomic_t so_count; | ||
617 | |||
618 | struct rpc_cred *so_cred; /* Associated cred */ | ||
619 | struct list_head so_states; | ||
620 | struct list_head so_delegations; | ||
621 | }; | ||
622 | |||
623 | /* | ||
624 | * struct nfs4_state maintains the client-side state for a given | ||
625 | * (state_owner,inode) tuple (OPEN) or state_owner (LOCK). | ||
626 | * | ||
627 | * OPEN: | ||
628 | * In order to know when to OPEN_DOWNGRADE or CLOSE the state on the server, | ||
629 | * we need to know how many files are open for reading or writing on a | ||
630 | * given inode. This information too is stored here. | ||
631 | * | ||
632 | * LOCK: one nfs4_state (LOCK) to hold the lock stateid nfs4_state(OPEN) | ||
633 | */ | ||
634 | |||
635 | struct nfs4_lock_state { | ||
636 | struct list_head ls_locks; /* Other lock stateids */ | ||
637 | fl_owner_t ls_owner; /* POSIX lock owner */ | ||
638 | #define NFS_LOCK_INITIALIZED 1 | ||
639 | int ls_flags; | ||
640 | u32 ls_seqid; | ||
641 | u32 ls_id; | ||
642 | nfs4_stateid ls_stateid; | ||
643 | atomic_t ls_count; | ||
644 | }; | ||
645 | |||
646 | /* bits for nfs4_state->flags */ | ||
647 | enum { | ||
648 | LK_STATE_IN_USE, | ||
649 | NFS_DELEGATED_STATE, | ||
650 | }; | ||
651 | |||
652 | struct nfs4_state { | ||
653 | struct list_head open_states; /* List of states for the same state_owner */ | ||
654 | struct list_head inode_states; /* List of states for the same inode */ | ||
655 | struct list_head lock_states; /* List of subservient lock stateids */ | ||
656 | |||
657 | struct nfs4_state_owner *owner; /* Pointer to the open owner */ | ||
658 | struct inode *inode; /* Pointer to the inode */ | ||
659 | |||
660 | unsigned long flags; /* Do we hold any locks? */ | ||
661 | struct semaphore lock_sema; /* Serializes file locking operations */ | ||
662 | rwlock_t state_lock; /* Protects the lock_states list */ | ||
663 | |||
664 | nfs4_stateid stateid; | ||
665 | |||
666 | unsigned int nreaders; | ||
667 | unsigned int nwriters; | ||
668 | int state; /* State on the server (R,W, or RW) */ | ||
669 | atomic_t count; | ||
670 | }; | ||
671 | |||
672 | |||
673 | struct nfs4_exception { | ||
674 | long timeout; | ||
675 | int retry; | ||
676 | }; | ||
677 | |||
678 | struct nfs4_state_recovery_ops { | ||
679 | int (*recover_open)(struct nfs4_state_owner *, struct nfs4_state *); | ||
680 | int (*recover_lock)(struct nfs4_state *, struct file_lock *); | ||
681 | }; | ||
682 | |||
683 | extern struct dentry_operations nfs4_dentry_operations; | ||
684 | extern struct inode_operations nfs4_dir_inode_operations; | ||
685 | |||
686 | /* nfs4proc.c */ | ||
687 | extern int nfs4_map_errors(int err); | ||
688 | extern int nfs4_proc_setclientid(struct nfs4_client *, u32, unsigned short); | ||
689 | extern int nfs4_proc_setclientid_confirm(struct nfs4_client *); | ||
690 | extern int nfs4_proc_async_renew(struct nfs4_client *); | ||
691 | extern int nfs4_proc_renew(struct nfs4_client *); | ||
692 | extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state, mode_t mode); | ||
693 | extern struct inode *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *); | ||
694 | extern int nfs4_open_revalidate(struct inode *, struct dentry *, int); | ||
695 | |||
696 | extern struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops; | ||
697 | extern struct nfs4_state_recovery_ops nfs4_network_partition_recovery_ops; | ||
698 | |||
699 | /* nfs4renewd.c */ | ||
700 | extern void nfs4_schedule_state_renewal(struct nfs4_client *); | ||
701 | extern void nfs4_renewd_prepare_shutdown(struct nfs_server *); | ||
702 | extern void nfs4_kill_renewd(struct nfs4_client *); | ||
703 | |||
704 | /* nfs4state.c */ | ||
705 | extern void init_nfsv4_state(struct nfs_server *); | ||
706 | extern void destroy_nfsv4_state(struct nfs_server *); | ||
707 | extern struct nfs4_client *nfs4_get_client(struct in_addr *); | ||
708 | extern void nfs4_put_client(struct nfs4_client *clp); | ||
709 | extern int nfs4_init_client(struct nfs4_client *clp); | ||
710 | extern struct nfs4_client *nfs4_find_client(struct in_addr *); | ||
711 | extern u32 nfs4_alloc_lockowner_id(struct nfs4_client *); | ||
712 | |||
713 | extern struct nfs4_state_owner * nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *); | ||
714 | extern void nfs4_put_state_owner(struct nfs4_state_owner *); | ||
715 | extern void nfs4_drop_state_owner(struct nfs4_state_owner *); | ||
716 | extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *); | ||
717 | extern void nfs4_put_open_state(struct nfs4_state *); | ||
718 | extern void nfs4_close_state(struct nfs4_state *, mode_t); | ||
719 | extern struct nfs4_state *nfs4_find_state(struct inode *, struct rpc_cred *, mode_t mode); | ||
720 | extern void nfs4_increment_seqid(int status, struct nfs4_state_owner *sp); | ||
721 | extern void nfs4_schedule_state_recovery(struct nfs4_client *); | ||
722 | extern struct nfs4_lock_state *nfs4_find_lock_state(struct nfs4_state *state, fl_owner_t); | ||
723 | extern struct nfs4_lock_state *nfs4_get_lock_state(struct nfs4_state *state, fl_owner_t); | ||
724 | extern void nfs4_put_lock_state(struct nfs4_lock_state *state); | ||
725 | extern void nfs4_increment_lock_seqid(int status, struct nfs4_lock_state *ls); | ||
726 | extern void nfs4_notify_setlk(struct nfs4_state *, struct file_lock *, struct nfs4_lock_state *); | ||
727 | extern void nfs4_notify_unlck(struct nfs4_state *, struct file_lock *, struct nfs4_lock_state *); | ||
728 | extern void nfs4_copy_stateid(nfs4_stateid *, struct nfs4_state *, fl_owner_t); | ||
729 | |||
730 | |||
731 | |||
732 | struct nfs4_mount_data; | ||
733 | #else | ||
734 | #define init_nfsv4_state(server) do { } while (0) | ||
735 | #define destroy_nfsv4_state(server) do { } while (0) | ||
736 | #define nfs4_put_state_owner(inode, owner) do { } while (0) | ||
737 | #define nfs4_put_open_state(state) do { } while (0) | ||
738 | #define nfs4_close_state(a, b) do { } while (0) | ||
739 | #define nfs4_renewd_prepare_shutdown(server) do { } while (0) | ||
740 | #endif | ||
741 | |||
742 | #endif /* __KERNEL__ */ | 554 | #endif /* __KERNEL__ */ |
743 | 555 | ||
744 | /* | 556 | /* |