diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-23 19:58:40 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-23 19:58:40 -0400 |
| commit | 9f261e011340bcd22c1dd48b465153bd78caa8c8 (patch) | |
| tree | b1c266ea746a0e8591e6af781aef22854e652ff9 /include/linux | |
| parent | a4c12d6c5dde48c69464baf7c703e425ee511433 (diff) | |
| parent | 026ed5c9185dcc4b2df92e98c3d61a01cea19cbf (diff) | |
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (74 commits)
NFS: unmark NFS direct I/O as experimental
NFS: add comments clarifying the use of nfs_post_op_update()
NFSv4: rpc_mkpipe creating socket inodes w/out sk buffers
NFS: Use SEEK_END instead of hardcoded value
NFSv4: When mounting with a port=0 argument, substitute port=2049
NFSv4: Poll more aggressively when handling NFS4ERR_DELAY
NFSv4: Handle the condition NFS4ERR_FILE_OPEN
NFSv4: Retry lease recovery if it failed during a synchronous operation.
NFS: Don't invalidate the symlink we just stuffed into the cache
NFS: Make read() return an ESTALE if the file has been deleted
NFSv4: It's perfectly legal for clp to be NULL here....
NFS: nfs_lookup - don't hash dentry when optimising away the lookup
SUNRPC: Fix Oops in pmap_getport_done
SUNRPC: Add refcounting to the struct rpc_xprt
SUNRPC: Clean up soft task error handling
SUNRPC: Handle ENETUNREACH, EHOSTUNREACH and EHOSTDOWN socket errors
SUNRPC: rpc_delay() should not clobber the rpc_task->tk_status
Fix a referral error Oops
NFS: NFS_ROOT should use the new rpc_create API
NFS: Fix up compiler warnings on 64-bit platforms in client.c
...
Manually resolved conflict in net/sunrpc/xprtsock.c
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blkdev.h | 1 | ||||
| -rw-r--r-- | include/linux/dcache.h | 1 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 13 | ||||
| -rw-r--r-- | include/linux/nfs_fs_sb.h | 89 | ||||
| -rw-r--r-- | include/linux/nfs_idmap.h | 14 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 29 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 57 | ||||
| -rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/sched.h | 5 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 52 | ||||
| -rw-r--r-- | include/linux/writeback.h | 1 |
11 files changed, 187 insertions, 77 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index aafe82788b4e..96c9040c00a8 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -746,6 +746,7 @@ extern void blk_queue_free_tags(request_queue_t *); | |||
| 746 | extern int blk_queue_resize_tags(request_queue_t *, int); | 746 | extern int blk_queue_resize_tags(request_queue_t *, int); |
| 747 | extern void blk_queue_invalidate_tags(request_queue_t *); | 747 | extern void blk_queue_invalidate_tags(request_queue_t *); |
| 748 | extern long blk_congestion_wait(int rw, long timeout); | 748 | extern long blk_congestion_wait(int rw, long timeout); |
| 749 | extern void blk_congestion_end(int rw); | ||
| 749 | 750 | ||
| 750 | extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *); | 751 | extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *); |
| 751 | extern int blkdev_issue_flush(struct block_device *, sector_t *); | 752 | extern int blkdev_issue_flush(struct block_device *, sector_t *); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 471781ffeab1..44605be59409 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -221,6 +221,7 @@ static inline int dname_external(struct dentry *dentry) | |||
| 221 | */ | 221 | */ |
| 222 | extern void d_instantiate(struct dentry *, struct inode *); | 222 | extern void d_instantiate(struct dentry *, struct inode *); |
| 223 | extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); | 223 | extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); |
| 224 | extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); | ||
| 224 | extern void d_delete(struct dentry *); | 225 | extern void d_delete(struct dentry *); |
| 225 | 226 | ||
| 226 | /* allocate/de-allocate */ | 227 | /* allocate/de-allocate */ |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 6c2066caeaab..3b5b04193fee 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | #include <linux/in.h> | 42 | #include <linux/in.h> |
| 43 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
| 44 | #include <linux/pagemap.h> | 44 | #include <linux/pagemap.h> |
| 45 | #include <linux/rbtree.h> | ||
| 45 | #include <linux/rwsem.h> | 46 | #include <linux/rwsem.h> |
| 46 | #include <linux/wait.h> | 47 | #include <linux/wait.h> |
| 47 | 48 | ||
| @@ -69,6 +70,8 @@ | |||
| 69 | * NFSv3/v4 Access mode cache entry | 70 | * NFSv3/v4 Access mode cache entry |
| 70 | */ | 71 | */ |
| 71 | struct nfs_access_entry { | 72 | struct nfs_access_entry { |
| 73 | struct rb_node rb_node; | ||
| 74 | struct list_head lru; | ||
| 72 | unsigned long jiffies; | 75 | unsigned long jiffies; |
| 73 | struct rpc_cred * cred; | 76 | struct rpc_cred * cred; |
| 74 | int mask; | 77 | int mask; |
| @@ -145,7 +148,9 @@ struct nfs_inode { | |||
| 145 | */ | 148 | */ |
| 146 | atomic_t data_updates; | 149 | atomic_t data_updates; |
| 147 | 150 | ||
| 148 | struct nfs_access_entry cache_access; | 151 | struct rb_root access_cache; |
| 152 | struct list_head access_cache_entry_lru; | ||
| 153 | struct list_head access_cache_inode_lru; | ||
| 149 | #ifdef CONFIG_NFS_V3_ACL | 154 | #ifdef CONFIG_NFS_V3_ACL |
| 150 | struct posix_acl *acl_access; | 155 | struct posix_acl *acl_access; |
| 151 | struct posix_acl *acl_default; | 156 | struct posix_acl *acl_default; |
| @@ -199,6 +204,7 @@ struct nfs_inode { | |||
| 199 | #define NFS_INO_REVALIDATING (0) /* revalidating attrs */ | 204 | #define NFS_INO_REVALIDATING (0) /* revalidating attrs */ |
| 200 | #define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ | 205 | #define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ |
| 201 | #define NFS_INO_STALE (2) /* possible stale inode */ | 206 | #define NFS_INO_STALE (2) /* possible stale inode */ |
| 207 | #define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ | ||
| 202 | 208 | ||
| 203 | static inline struct nfs_inode *NFS_I(struct inode *inode) | 209 | static inline struct nfs_inode *NFS_I(struct inode *inode) |
| 204 | { | 210 | { |
| @@ -209,8 +215,7 @@ static inline struct nfs_inode *NFS_I(struct inode *inode) | |||
| 209 | #define NFS_FH(inode) (&NFS_I(inode)->fh) | 215 | #define NFS_FH(inode) (&NFS_I(inode)->fh) |
| 210 | #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) | 216 | #define NFS_SERVER(inode) (NFS_SB(inode->i_sb)) |
| 211 | #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) | 217 | #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client) |
| 212 | #define NFS_PROTO(inode) (NFS_SERVER(inode)->rpc_ops) | 218 | #define NFS_PROTO(inode) (NFS_SERVER(inode)->nfs_client->rpc_ops) |
| 213 | #define NFS_ADDR(inode) (RPC_PEERADDR(NFS_CLIENT(inode))) | ||
| 214 | #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) | 219 | #define NFS_COOKIEVERF(inode) (NFS_I(inode)->cookieverf) |
| 215 | #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) | 220 | #define NFS_READTIME(inode) (NFS_I(inode)->read_cache_jiffies) |
| 216 | #define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) | 221 | #define NFS_CHANGE_ATTR(inode) (NFS_I(inode)->change_attr) |
| @@ -297,6 +302,7 @@ extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | |||
| 297 | extern int nfs_permission(struct inode *, int, struct nameidata *); | 302 | extern int nfs_permission(struct inode *, int, struct nameidata *); |
| 298 | extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *); | 303 | extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *); |
| 299 | extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); | 304 | extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *); |
| 305 | extern void nfs_access_zap_cache(struct inode *inode); | ||
| 300 | extern int nfs_open(struct inode *, struct file *); | 306 | extern int nfs_open(struct inode *, struct file *); |
| 301 | extern int nfs_release(struct inode *, struct file *); | 307 | extern int nfs_release(struct inode *, struct file *); |
| 302 | extern int nfs_attribute_timeout(struct inode *inode); | 308 | extern int nfs_attribute_timeout(struct inode *inode); |
| @@ -579,6 +585,7 @@ extern void * nfs_root_data(void); | |||
| 579 | #define NFSDBG_FILE 0x0040 | 585 | #define NFSDBG_FILE 0x0040 |
| 580 | #define NFSDBG_ROOT 0x0080 | 586 | #define NFSDBG_ROOT 0x0080 |
| 581 | #define NFSDBG_CALLBACK 0x0100 | 587 | #define NFSDBG_CALLBACK 0x0100 |
| 588 | #define NFSDBG_CLIENT 0x0200 | ||
| 582 | #define NFSDBG_ALL 0xFFFF | 589 | #define NFSDBG_ALL 0xFFFF |
| 583 | 590 | ||
| 584 | #ifdef __KERNEL__ | 591 | #ifdef __KERNEL__ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 6b4a13c79474..7ccfc7ef0a83 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -7,13 +7,79 @@ | |||
| 7 | struct nfs_iostats; | 7 | struct nfs_iostats; |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
| 10 | * The nfs_client identifies our client state to the server. | ||
| 11 | */ | ||
| 12 | struct nfs_client { | ||
| 13 | atomic_t cl_count; | ||
| 14 | int cl_cons_state; /* current construction state (-ve: init error) */ | ||
| 15 | #define NFS_CS_READY 0 /* ready to be used */ | ||
| 16 | #define NFS_CS_INITING 1 /* busy initialising */ | ||
| 17 | int cl_nfsversion; /* NFS protocol version */ | ||
| 18 | unsigned long cl_res_state; /* NFS resources state */ | ||
| 19 | #define NFS_CS_RPCIOD 0 /* - rpciod started */ | ||
| 20 | #define NFS_CS_CALLBACK 1 /* - callback started */ | ||
| 21 | #define NFS_CS_IDMAP 2 /* - idmap started */ | ||
| 22 | #define NFS_CS_RENEWD 3 /* - renewd started */ | ||
| 23 | struct sockaddr_in cl_addr; /* server identifier */ | ||
| 24 | char * cl_hostname; /* hostname of server */ | ||
| 25 | struct list_head cl_share_link; /* link in global client list */ | ||
| 26 | struct list_head cl_superblocks; /* List of nfs_server structs */ | ||
| 27 | |||
| 28 | struct rpc_clnt * cl_rpcclient; | ||
| 29 | const struct nfs_rpc_ops *rpc_ops; /* NFS protocol vector */ | ||
| 30 | unsigned long retrans_timeo; /* retransmit timeout */ | ||
| 31 | unsigned int retrans_count; /* number of retransmit tries */ | ||
| 32 | |||
| 33 | #ifdef CONFIG_NFS_V4 | ||
| 34 | u64 cl_clientid; /* constant */ | ||
| 35 | nfs4_verifier cl_confirm; | ||
| 36 | unsigned long cl_state; | ||
| 37 | |||
| 38 | u32 cl_lockowner_id; | ||
| 39 | |||
| 40 | /* | ||
| 41 | * The following rwsem ensures exclusive access to the server | ||
| 42 | * while we recover the state following a lease expiration. | ||
| 43 | */ | ||
| 44 | struct rw_semaphore cl_sem; | ||
| 45 | |||
| 46 | struct list_head cl_delegations; | ||
| 47 | struct list_head cl_state_owners; | ||
| 48 | struct list_head cl_unused; | ||
| 49 | int cl_nunused; | ||
| 50 | spinlock_t cl_lock; | ||
| 51 | |||
| 52 | unsigned long cl_lease_time; | ||
| 53 | unsigned long cl_last_renewal; | ||
| 54 | struct work_struct cl_renewd; | ||
| 55 | |||
| 56 | struct rpc_wait_queue cl_rpcwaitq; | ||
| 57 | |||
| 58 | /* used for the setclientid verifier */ | ||
| 59 | struct timespec cl_boot_time; | ||
| 60 | |||
| 61 | /* idmapper */ | ||
| 62 | struct idmap * cl_idmap; | ||
| 63 | |||
| 64 | /* Our own IP address, as a null-terminated string. | ||
| 65 | * This is used to generate the clientid, and the callback address. | ||
| 66 | */ | ||
| 67 | char cl_ipaddr[16]; | ||
| 68 | unsigned char cl_id_uniquifier; | ||
| 69 | #endif | ||
| 70 | }; | ||
| 71 | |||
| 72 | /* | ||
| 10 | * NFS client parameters stored in the superblock. | 73 | * NFS client parameters stored in the superblock. |
| 11 | */ | 74 | */ |
| 12 | struct nfs_server { | 75 | struct nfs_server { |
| 76 | struct nfs_client * nfs_client; /* shared client and NFS4 state */ | ||
| 77 | struct list_head client_link; /* List of other nfs_server structs | ||
