diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/filter.h | 2 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/hwmon-vid.h | 6 | ||||
| -rw-r--r-- | include/linux/i2c-id.h | 20 | ||||
| -rw-r--r-- | include/linux/i2c.h | 41 | ||||
| -rw-r--r-- | include/linux/inet.h | 2 | ||||
| -rw-r--r-- | include/linux/ip.h | 10 | ||||
| -rw-r--r-- | include/linux/lockd/lockd.h | 2 | ||||
| -rw-r--r-- | include/linux/moduleparam.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_fs.h | 65 | ||||
| -rw-r--r-- | include/linux/nfs_idmap.h | 2 | ||||
| -rw-r--r-- | include/linux/nfs_page.h | 12 | ||||
| -rw-r--r-- | include/linux/nfs_xdr.h | 89 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
| -rw-r--r-- | include/linux/sunrpc/clnt.h | 5 | ||||
| -rw-r--r-- | include/linux/sunrpc/gss_spkm3.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/sched.h | 48 | ||||
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 6 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 12 | ||||
| -rw-r--r-- | include/linux/writeback.h | 9 |
20 files changed, 185 insertions, 153 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 3ba843c46382..c6cb8f095088 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -143,7 +143,7 @@ static inline unsigned int sk_filter_len(struct sk_filter *fp) | |||
| 143 | struct sk_buff; | 143 | struct sk_buff; |
| 144 | struct sock; | 144 | struct sock; |
| 145 | 145 | ||
| 146 | extern int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen); | 146 | extern unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int flen); |
| 147 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 147 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
| 148 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 148 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
| 149 | #endif /* __KERNEL__ */ | 149 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 115e72be25d0..2c9c48d65630 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -760,7 +760,7 @@ extern struct file_lock *posix_test_lock(struct file *, struct file_lock *); | |||
| 760 | extern int posix_lock_file(struct file *, struct file_lock *); | 760 | extern int posix_lock_file(struct file *, struct file_lock *); |
| 761 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 761 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
| 762 | extern void posix_block_lock(struct file_lock *, struct file_lock *); | 762 | extern void posix_block_lock(struct file_lock *, struct file_lock *); |
| 763 | extern void posix_unblock_lock(struct file *, struct file_lock *); | 763 | extern int posix_unblock_lock(struct file *, struct file_lock *); |
| 764 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); | 764 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); |
| 765 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); | 765 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); |
| 766 | extern int __break_lease(struct inode *inode, unsigned int flags); | 766 | extern int __break_lease(struct inode *inode, unsigned int flags); |
diff --git a/include/linux/hwmon-vid.h b/include/linux/hwmon-vid.h index cd4b7a042b86..f346e4d5381c 100644 --- a/include/linux/hwmon-vid.h +++ b/include/linux/hwmon-vid.h | |||
| @@ -23,14 +23,14 @@ | |||
| 23 | #ifndef _LINUX_HWMON_VID_H | 23 | #ifndef _LINUX_HWMON_VID_H |
| 24 | #define _LINUX_HWMON_VID_H | 24 | #define _LINUX_HWMON_VID_H |
| 25 | 25 | ||
| 26 | int vid_from_reg(int val, int vrm); | 26 | int vid_from_reg(int val, u8 vrm); |
| 27 | int vid_which_vrm(void); | 27 | u8 vid_which_vrm(void); |
| 28 | 28 | ||
| 29 | /* vrm is the VRM/VRD document version multiplied by 10. | 29 | /* vrm is the VRM/VRD document version multiplied by 10. |
| 30 | val is in mV to avoid floating point in the kernel. | 30 | val is in mV to avoid floating point in the kernel. |
| 31 | Returned value is the 4-, 5- or 6-bit VID code. | 31 | Returned value is the 4-, 5- or 6-bit VID code. |
| 32 | Note that only VRM 9.x is supported for now. */ | 32 | Note that only VRM 9.x is supported for now. */ |
| 33 | static inline int vid_to_reg(int val, int vrm) | 33 | static inline int vid_to_reg(int val, u8 vrm) |
| 34 | { | 34 | { |
| 35 | switch (vrm) { | 35 | switch (vrm) { |
| 36 | case 91: /* VRM 9.1 */ | 36 | case 91: /* VRM 9.1 */ |
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 006c81ef4d50..fb46f8d56999 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
| @@ -25,12 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | /* | 26 | /* |
| 27 | * ---- Driver types ----------------------------------------------------- | 27 | * ---- Driver types ----------------------------------------------------- |
| 28 | * device id name + number function description, i2c address(es) | ||
| 29 | * | ||
| 30 | * Range 1000-1999 range is defined in sensors/sensors.h | ||
| 31 | * Range 0x100 - 0x1ff is for V4L2 Common Components | ||
| 32 | * Range 0xf000 - 0xffff is reserved for local experimentation, and should | ||
| 33 | * never be used in official drivers | ||
| 34 | */ | 28 | */ |
| 35 | 29 | ||
| 36 | #define I2C_DRIVERID_MSP3400 1 | 30 | #define I2C_DRIVERID_MSP3400 1 |
| @@ -110,13 +104,7 @@ | |||
| 110 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ | 104 | #define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ |
| 111 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ | 105 | #define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ |
| 112 | 106 | ||
| 113 | #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ | ||
| 114 | #define I2C_DRIVERID_EXP1 0xF1 | ||
| 115 | #define I2C_DRIVERID_EXP2 0xF2 | ||
| 116 | #define I2C_DRIVERID_EXP3 0xF3 | ||
| 117 | |||
| 118 | #define I2C_DRIVERID_I2CDEV 900 | 107 | #define I2C_DRIVERID_I2CDEV 900 |
| 119 | #define I2C_DRIVERID_I2CPROC 901 | ||
| 120 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ | 108 | #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ |
| 121 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ | 109 | #define I2C_DRIVERID_ALERT 903 /* SMBus Alert Responder Client */ |
| 122 | 110 | ||
| @@ -131,15 +119,12 @@ | |||
| 131 | #define I2C_DRIVERID_ADM1021 1008 | 119 | #define I2C_DRIVERID_ADM1021 1008 |
| 132 | #define I2C_DRIVERID_ADM9240 1009 | 120 | #define I2C_DRIVERID_ADM9240 1009 |
| 133 | #define I2C_DRIVERID_LTC1710 1010 | 121 | #define I2C_DRIVERID_LTC1710 1010 |
| 134 | #define I2C_DRIVERID_SIS5595 1011 | ||
| 135 | #define I2C_DRIVERID_ICSPLL 1012 | 122 | #define I2C_DRIVERID_ICSPLL 1012 |
| 136 | #define I2C_DRIVERID_BT869 1013 | 123 | #define I2C_DRIVERID_BT869 1013 |
| 137 | #define I2C_DRIVERID_MAXILIFE 1014 | 124 | #define I2C_DRIVERID_MAXILIFE 1014 |
| 138 | #define I2C_DRIVERID_MATORB 1015 | 125 | #define I2C_DRIVERID_MATORB 1015 |
| 139 | #define I2C_DRIVERID_GL520 1016 | 126 | #define I2C_DRIVERID_GL520 1016 |
| 140 | #define I2C_DRIVERID_THMC50 1017 | 127 | #define I2C_DRIVERID_THMC50 1017 |
| 141 | #define I2C_DRIVERID_DDCMON 1018 | ||
| 142 | #define I2C_DRIVERID_VIA686A 1019 | ||
| 143 | #define I2C_DRIVERID_ADM1025 1020 | 128 | #define I2C_DRIVERID_ADM1025 1020 |
| 144 | #define I2C_DRIVERID_LM87 1021 | 129 | #define I2C_DRIVERID_LM87 1021 |
| 145 | #define I2C_DRIVERID_PCF8574 1022 | 130 | #define I2C_DRIVERID_PCF8574 1022 |
| @@ -151,21 +136,16 @@ | |||
| 151 | #define I2C_DRIVERID_FSCPOS 1028 | 136 | #define I2C_DRIVERID_FSCPOS 1028 |
| 152 | #define I2C_DRIVERID_FSCSCY 1029 | 137 | #define I2C_DRIVERID_FSCSCY 1029 |
| 153 | #define I2C_DRIVERID_PCF8591 1030 | 138 | #define I2C_DRIVERID_PCF8591 1030 |
| 154 | #define I2C_DRIVERID_SMSC47M1 1031 | ||
| 155 | #define I2C_DRIVERID_VT1211 1032 | ||
| 156 | #define I2C_DRIVERID_LM92 1033 | 139 | #define I2C_DRIVERID_LM92 1033 |
| 157 | #define I2C_DRIVERID_VT8231 1034 | ||
| 158 | #define I2C_DRIVERID_SMARTBATT 1035 | 140 | #define I2C_DRIVERID_SMARTBATT 1035 |
| 159 | #define I2C_DRIVERID_BMCSENSORS 1036 | 141 | #define I2C_DRIVERID_BMCSENSORS 1036 |
| 160 | #define I2C_DRIVERID_FS451 1037 | 142 | #define I2C_DRIVERID_FS451 1037 |
| 161 | #define I2C_DRIVERID_W83627HF 1038 | ||
| 162 | #define I2C_DRIVERID_LM85 1039 | 143 | #define I2C_DRIVERID_LM85 1039 |
| 163 | #define I2C_DRIVERID_LM83 1040 | 144 | #define I2C_DRIVERID_LM83 1040 |
| 164 | #define I2C_DRIVERID_LM90 1042 | 145 | #define I2C_DRIVERID_LM90 1042 |
| 165 | #define I2C_DRIVERID_ASB100 1043 | 146 | #define I2C_DRIVERID_ASB100 1043 |
| 166 | #define I2C_DRIVERID_FSCHER 1046 | 147 | #define I2C_DRIVERID_FSCHER 1046 |
| 167 | #define I2C_DRIVERID_W83L785TS 1047 | 148 | #define I2C_DRIVERID_W83L785TS 1047 |
| 168 | #define I2C_DRIVERID_SMSC47B397 1050 | ||
| 169 | 149 | ||
| 170 | /* | 150 | /* |
| 171 | * ---- Adapter types ---------------------------------------------------- | 151 | * ---- Adapter types ---------------------------------------------------- |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 5e19a7ba69b2..7863a59bd598 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
| @@ -105,14 +105,14 @@ extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, | |||
| 105 | * A driver is capable of handling one or more physical devices present on | 105 | * A driver is capable of handling one or more physical devices present on |
| 106 | * I2C adapters. This information is used to inform the driver of adapter | 106 | * I2C adapters. This information is used to inform the driver of adapter |
| 107 | * events. | 107 | * events. |
| 108 | * | ||
| 109 | * The driver.owner field should be set to the module owner of this driver. | ||
| 110 | * The driver.name field should be set to the name of this driver. | ||
| 108 | */ | 111 | */ |
| 109 | 112 | ||
| 110 | struct i2c_driver { | 113 | struct i2c_driver { |
| 111 | struct module *owner; | ||
| 112 | char name[32]; | ||
| 113 | int id; | 114 | int id; |
| 114 | unsigned int class; | 115 | unsigned int class; |
| 115 | unsigned int flags; /* div., see below */ | ||
| 116 | 116 | ||
| 117 | /* Notifies the driver that a new bus has appeared. This routine | 117 | /* Notifies the driver that a new bus has appeared. This routine |
| 118 | * can be used by the driver to test if the bus meets its conditions | 118 | * can be used by the driver to test if the bus meets its conditions |
| @@ -250,18 +250,7 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) | |||
| 250 | dev_set_drvdata (&dev->dev, data); | 250 | dev_set_drvdata (&dev->dev, data); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | /*flags for the driver struct: */ | ||
| 254 | #define I2C_DF_NOTIFY 0x01 /* notify on bus (de/a)ttaches */ | ||
| 255 | #if 0 | ||
| 256 | /* this flag is gone -- there is a (optional) driver->detach_adapter | ||
| 257 | * callback now which can be used instead */ | ||
| 258 | # define I2C_DF_DUMMY 0x02 | ||
| 259 | #endif | ||
| 260 | |||
| 261 | /*flags for the client struct: */ | 253 | /*flags for the client struct: */ |
| 262 | #define I2C_CLIENT_ALLOW_USE 0x01 /* Client allows access */ | ||
| 263 | #define I2C_CLIENT_ALLOW_MULTIPLE_USE 0x02 /* Allow multiple access-locks */ | ||
| 264 | /* on an i2c_client */ | ||
| 265 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ | 254 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ |
| 266 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ | 255 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ |
| 267 | /* Must equal I2C_M_TEN below */ | 256 | /* Must equal I2C_M_TEN below */ |
| @@ -302,26 +291,20 @@ struct i2c_client_address_data { | |||
| 302 | extern int i2c_add_adapter(struct i2c_adapter *); | 291 | extern int i2c_add_adapter(struct i2c_adapter *); |
| 303 | extern int i2c_del_adapter(struct i2c_adapter *); | 292 | extern int i2c_del_adapter(struct i2c_adapter *); |
| 304 | 293 | ||
| 305 | extern int i2c_add_driver(struct i2c_driver *); | 294 | extern int i2c_register_driver(struct module *, struct i2c_driver *); |
| 306 | extern int i2c_del_driver(struct i2c_driver *); | 295 | extern int i2c_del_driver(struct i2c_driver *); |
| 307 | 296 | ||
| 297 | static inline int i2c_add_driver(struct i2c_driver *driver) | ||
| 298 | { | ||
| 299 | return i2c_register_driver(THIS_MODULE, driver); | ||
| 300 | } | ||
| 301 | |||
| 308 | extern int i2c_attach_client(struct i2c_client *); | 302 | extern int i2c_attach_client(struct i2c_client *); |
| 309 | extern int i2c_detach_client(struct i2c_client *); | 303 | extern int i2c_detach_client(struct i2c_client *); |
| 310 | 304 | ||
| 311 | /* New function: This is to get an i2c_client-struct for controlling the | 305 | /* Should be used to make sure that client-struct is valid and that it |
| 312 | client either by using i2c_control-function or having the | 306 | is okay to access the i2c-client. |
| 313 | client-module export functions that can be used with the i2c_client | 307 | returns -ENODEV if client has gone in the meantime */ |
| 314 | -struct. */ | ||
| 315 | extern struct i2c_client *i2c_get_client(int driver_id, int adapter_id, | ||
| 316 | struct i2c_client *prev); | ||
| 317 | |||
| 318 | /* Should be used with new function | ||
| 319 | extern struct i2c_client *i2c_get_client(int,int,struct i2c_client *); | ||
| 320 | to make sure that client-struct is valid and that it is okay to access | ||
| 321 | the i2c-client. | ||
| 322 | returns -EACCES if client doesn't allow use (default) | ||
| 323 | returns -EBUSY if client doesn't allow multiple use (default) and | ||
| 324 | usage_count >0 */ | ||
| 325 | extern int i2c_use_client(struct i2c_client *); | 308 | extern int i2c_use_client(struct i2c_client *); |
| 326 | extern int i2c_release_client(struct i2c_client *); | 309 | extern int i2c_release_client(struct i2c_client *); |
| 327 | 310 | ||
diff --git a/include/linux/inet.h b/include/linux/inet.h index 3b5e9fdff872..6c5587af118d 100644 --- a/include/linux/inet.h +++ b/include/linux/inet.h | |||
| @@ -45,6 +45,6 @@ | |||
| 45 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
| 46 | #include <linux/types.h> | 46 | #include <linux/types.h> |
| 47 | 47 | ||
| 48 | extern __u32 in_aton(const char *str); | 48 | extern __be32 in_aton(const char *str); |
| 49 | #endif | 49 | #endif |
| 50 | #endif /* _LINUX_INET_H */ | 50 | #endif /* _LINUX_INET_H */ |
diff --git a/include/linux/ip.h b/include/linux/ip.h index 9e2eb9a602eb..4b55cf1df732 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
| @@ -90,14 +90,14 @@ struct iphdr { | |||
| 90 | #error "Please fix <asm/byteorder.h>" | 90 | #error "Please fix <asm/byteorder.h>" |
| 91 | #endif | 91 | #endif |
| 92 | __u8 tos; | 92 | __u8 tos; |
| 93 | __u16 tot_len; | 93 | __be16 tot_len; |
| 94 | __u16 id; | 94 | __be16 id; |
| 95 | __u16 frag_off; | 95 | __be16 frag_off; |
| 96 | __u8 ttl; | 96 | __u8 ttl; |
| 97 | __u8 protocol; | 97 | __u8 protocol; |
| 98 | __u16 check; | 98 | __u16 check; |
| 99 | __u32 saddr; | 99 | __be32 saddr; |
| 100 | __u32 daddr; | 100 | __be32 daddr; |
| 101 | /*The options start here. */ | 101 | /*The options start here. */ |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 16d4e5a08e1d..95c8fea293ba 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -172,7 +172,7 @@ extern struct nlm_host *nlm_find_client(void); | |||
| 172 | /* | 172 | /* |
| 173 | * Server-side lock handling | 173 | * Server-side lock handling |
| 174 | */ | 174 | */ |
| 175 | int nlmsvc_async_call(struct nlm_rqst *, u32, rpc_action); | 175 | int nlmsvc_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *); |
| 176 | u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, | 176 | u32 nlmsvc_lock(struct svc_rqst *, struct nlm_file *, |
| 177 | struct nlm_lock *, int, struct nlm_cookie *); | 177 | struct nlm_lock *, int, struct nlm_cookie *); |
| 178 | u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); | 178 | u32 nlmsvc_unlock(struct nlm_file *, struct nlm_lock *); |
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 368ec8e45bd0..b5c98c43779e 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | #ifdef MODULE | 10 | #ifdef MODULE |
| 11 | #define MODULE_PARAM_PREFIX /* empty */ | 11 | #define MODULE_PARAM_PREFIX /* empty */ |
| 12 | #else | 12 | #else |
| 13 | #define MODULE_PARAM_PREFIX __stringify(KBUILD_MODNAME) "." | 13 | #define MODULE_PARAM_PREFIX KBUILD_MODNAME "." |
| 14 | #endif | 14 | #endif |
| 15 | 15 | ||
| 16 | #ifdef MODULE | 16 | #ifdef MODULE |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 2516adeccecf..547d649b274e 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
| @@ -38,9 +38,6 @@ | |||
| 38 | # define NFS_DEBUG | 38 | # define NFS_DEBUG |
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | #define NFS_MAX_FILE_IO_BUFFER_SIZE 32768 | ||
| 42 | #define NFS_DEF_FILE_IO_BUFFER_SIZE 4096 | ||
| 43 | |||
| 44 | /* Default timeout values */ | 41 | /* Default timeout values */ |
| 45 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) | 42 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) |
| 46 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) | 43 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) |
| @@ -65,6 +62,7 @@ | |||
| 65 | #define FLUSH_STABLE 4 /* commit to stable storage */ | 62 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
| 66 | #define FLUSH_LOWPRI 8 /* low priority background flush */ | 63 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
| 67 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ | 64 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
| 65 | #define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ | ||
| 68 | 66 | ||
| 69 | #ifdef __KERNEL__ | 67 | #ifdef __KERNEL__ |
| 70 | 68 | ||
| @@ -394,6 +392,17 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_ | |||
| 394 | extern struct inode_operations nfs_symlink_inode_operations; | 392 | extern struct inode_operations nfs_symlink_inode_operations; |
| 395 | 393 | ||
| 396 | /* | 394 | /* |
| 395 | * linux/fs/nfs/sysctl.c | ||
| 396 | */ | ||
| 397 | #ifdef CONFIG_SYSCTL | ||
| 398 | extern int nfs_register_sysctl(void); | ||
| 399 | extern void nfs_unregister_sysctl(void); | ||
| 400 | #else | ||
| 401 | #define nfs_register_sysctl() do { } while(0) | ||
| 402 | #define nfs_unregister_sysctl() do { } while(0) | ||
| 403 | #endif | ||
| 404 | |||
| 405 | /* | ||
| 397 | * linux/fs/nfs/unlink.c | 406 | * linux/fs/nfs/unlink.c |
| 398 | */ | 407 | */ |
| 399 | extern int nfs_async_unlink(struct dentry *); | 408 | extern int nfs_async_unlink(struct dentry *); |
| @@ -406,10 +415,12 @@ extern int nfs_writepage(struct page *page, struct writeback_control *wbc); | |||
| 406 | extern int nfs_writepages(struct address_space *, struct writeback_control *); | 415 | extern int nfs_writepages(struct address_space *, struct writeback_control *); |
| 407 | extern int nfs_flush_incompatible(struct file *file, struct page *page); | 416 | extern int nfs_flush_incompatible(struct file *file, struct page *page); |
| 408 | extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); | 417 | extern int nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int); |
| 409 | extern void nfs_writeback_done(struct rpc_task *task); | 418 | extern void nfs_writeback_done(struct rpc_task *task, void *data); |
| 419 | extern void nfs_writedata_release(void *data); | ||
| 410 | 420 | ||
| 411 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 421 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
| 412 | extern void nfs_commit_done(struct rpc_task *); | 422 | extern void nfs_commit_done(struct rpc_task *, void *data); |
| 423 | extern void nfs_commit_release(void *data); | ||
| 413 | #endif | 424 | #endif |
| 414 | 425 | ||
| 415 | /* | 426 | /* |
| @@ -460,18 +471,33 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) | |||
| 460 | */ | 471 | */ |
| 461 | extern mempool_t *nfs_wdata_mempool; | 472 | extern mempool_t *nfs_wdata_mempool; |
| 462 | 473 | ||
| 463 | static inline struct nfs_write_data *nfs_writedata_alloc(void) | 474 | static inline struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount) |
| 464 | { | 475 | { |
| 465 | struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); | 476 | struct nfs_write_data *p = mempool_alloc(nfs_wdata_mempool, SLAB_NOFS); |
| 477 | |||
| 466 | if (p) { | 478 | if (p) { |
| 467 | memset(p, 0, sizeof(*p)); | 479 | memset(p, 0, sizeof(*p)); |
| 468 | INIT_LIST_HEAD(&p->pages); | 480 | INIT_LIST_HEAD(&p->pages); |
| 481 | if (pagecount < NFS_PAGEVEC_SIZE) | ||
| 482 | p->pagevec = &p->page_array[0]; | ||
| 483 | else { | ||
| 484 | size_t size = ++pagecount * sizeof(struct page *); | ||
| 485 | p->pagevec = kmalloc(size, GFP_NOFS); | ||
| 486 | if (p->pagevec) { | ||
| 487 | memset(p->pagevec, 0, size); | ||
| 488 | } else { | ||
| 489 | mempool_free(p, nfs_wdata_mempool); | ||
| 490 | p = NULL; | ||
| 491 | } | ||
| 492 | } | ||
| 469 | } | 493 | } |
| 470 | return p; | 494 | return p; |
| 471 | } | 495 | } |
| 472 | 496 | ||
| 473 | static inline void nfs_writedata_free(struct nfs_write_data *p) | 497 | static inline void nfs_writedata_free(struct nfs_write_data *p) |
| 474 | { | 498 | { |
| 499 | if (p && (p->pagevec != &p->page_array[0])) | ||
| 500 | kfree(p->pagevec); | ||
| 475 | mempool_free(p, nfs_wdata_mempool); | 501 | mempool_free(p, nfs_wdata_mempool); |
| 476 | } | 502 | } |
| 477 | 503 | ||
| @@ -481,28 +507,45 @@ static inline void nfs_writedata_free(struct nfs_write_data *p) | |||
| 481 | extern int nfs_readpage(struct file *, struct page *); | 507 | extern int nfs_readpage(struct file *, struct page *); |
| 482 | extern int nfs_readpages(struct file *, struct address_space *, | 508 | extern int nfs_readpages(struct file *, struct address_space *, |
| 483 | struct list_head *, unsigned); | 509 | struct list_head *, unsigned); |
| 484 | extern void nfs_readpage_result(struct rpc_task *); | 510 | extern void nfs_readpage_result(struct rpc_task *, void *); |
| 511 | extern void nfs_readdata_release(void *data); | ||
| 512 | |||
| 485 | 513 | ||
| 486 | /* | 514 | /* |
| 487 | * Allocate and free nfs_read_data structures | 515 | * Allocate and free nfs_read_data structures |
| 488 | */ | 516 | */ |
| 489 | extern mempool_t *nfs_rdata_mempool; | 517 | extern mempool_t *nfs_rdata_mempool; |
| 490 | 518 | ||
| 491 | static inline struct nfs_read_data *nfs_readdata_alloc(void) | 519 | static inline struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount) |
| 492 | { | 520 | { |
| 493 | struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); | 521 | struct nfs_read_data *p = mempool_alloc(nfs_rdata_mempool, SLAB_NOFS); |
| 494 | if (p) | 522 | |
| 523 | if (p) { | ||
| 495 | memset(p, 0, sizeof(*p)); | 524 | memset(p, 0, sizeof(*p)); |
| 525 | INIT_LIST_HEAD(&p->pages); | ||
| 526 | if (pagecount < NFS_PAGEVEC_SIZE) | ||
| 527 | p->pagevec = &p->page_array[0]; | ||
| 528 | else { | ||
| 529 | size_t size = ++pagecount * sizeof(struct page *); | ||
| 530 | p->pagevec = kmalloc(size, GFP_NOFS); | ||
| 531 | if (p->pagevec) { | ||
| 532 | memset(p->pagevec, 0, size); | ||
| 533 | } else { | ||
| 534 | mempool_free(p, nfs_rdata_mempool); | ||
| 535 | p = NULL; | ||
| 536 | } | ||
| 537 | } | ||
| 538 | } | ||
| 496 | return p; | 539 | return p; |
| 497 | } | 540 | } |
| 498 | 541 | ||
| 499 | static inline void nfs_readdata_free(struct nfs_read_data *p) | 542 | static inline void nfs_readdata_free(struct nfs_read_data *p) |
| 500 | { | 543 | { |
| 544 | if (p && (p->pagevec != &p->page_array[0])) | ||
| 545 | kfree(p->pagevec); | ||
| 501 | mempool_free(p, nfs_rdata_mempool); | 546 | mempool_free(p, nfs_rdata_mempool); |
| 502 | } | 547 | } |
| 503 | 548 | ||
| 504 | extern void nfs_readdata_release(struct rpc_task *task); | ||
| 505 | |||
| 506 | /* | 549 | /* |
| 507 | * linux/fs/nfs3proc.c | 550 | * linux/fs/nfs3proc.c |
| 508 | */ | 551 | */ |
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index a0f1f25e0ead..102e56094296 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
| @@ -71,6 +71,8 @@ int nfs_map_name_to_uid(struct nfs4_client *, const char *, size_t, __u32 *); | |||
| 71 | int nfs_map_group_to_gid(struct nfs4_client *, const char *, size_t, __u32 *); | 71 | int nfs_map_group_to_gid(struct nfs4_client *, const char *, size_t, __u32 *); |
| 72 | int nfs_map_uid_to_name(struct nfs4_client *, __u32, char *); | 72 | int nfs_map_uid_to_name(struct nfs4_client *, __u32, char *); |
| 73 | int nfs_map_gid_to_group(struct nfs4_client *, __u32, char *); | 73 | int nfs_map_gid_to_group(struct nfs4_client *, __u32, char *); |
| 74 | |||
| 75 | extern unsigned int nfs_idmap_cache_timeout; | ||
| 74 | #endif /* __KERNEL__ */ | 76 | #endif /* __KERNEL__ */ |
| 75 | 77 | ||
| 76 | #endif /* NFS_IDMAP_H */ | 78 | #endif /* NFS_IDMAP_H */ |
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index da2e077b65e2..66e2ed658527 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h | |||
| @@ -79,9 +79,7 @@ extern void nfs_clear_page_writeback(struct nfs_page *req); | |||
| 79 | static inline int | 79 | static inline int |
| 80 | nfs_lock_request_dontget(struct nfs_page *req) | 80 | nfs_lock_request_dontget(struct nfs_page *req) |
| 81 | { | 81 | { |
| 82 | if (test_and_set_bit(PG_BUSY, &req->wb_flags)) | 82 | return !test_and_set_bit(PG_BUSY, &req->wb_flags); |
| 83 | return 0; | ||
| 84 | return 1; | ||
| 85 | } | 83 | } |
| 86 | 84 | ||
| 87 | /* | 85 | /* |
| @@ -125,9 +123,7 @@ nfs_list_remove_request(struct nfs_page *req) | |||
| 125 | static inline int | 123 | static inline int |
| 126 | nfs_defer_commit(struct nfs_page *req) | 124 | nfs_defer_commit(struct nfs_page *req) |
| 127 | { | 125 | { |
| 128 | if (test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags)) | 126 | return !test_and_set_bit(PG_NEED_COMMIT, &req->wb_flags); |
| 129 | return 0; | ||
| 130 | return 1; | ||
| 131 | } | 127 | } |
| 132 | 128 | ||
| 133 | static inline void | 129 | static inline void |
| @@ -141,9 +137,7 @@ nfs_clear_commit(struct nfs_page *req) | |||
| 141 | static inline int | 137 | static inline int |
| 142 | nfs_defer_reschedule(struct nfs_page *req) | 138 | nfs_defer_reschedule(struct nfs_page *req) |
| 143 | { | 139 | { |
| 144 | if (test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags)) | 140 | return !test_and_set_bit(PG_NEED_RESCHED, &req->wb_flags); |
| 145 | return 0; | ||
| 146 | return 1; | ||
| 147 | } | 141 | } |
| 148 | 142 | ||
| 149 | static inline void | 143 | static inline void |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 40718669b9c8..6d6f69ec5675 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -4,6 +4,16 @@ | |||
| 4 | #include <linux/sunrpc/xprt.h> | 4 | #include <linux/sunrpc/xprt.h> |
| 5 | #include <linux/nfsacl.h> | 5 | #include <linux/nfsacl.h> |
| 6 | 6 | ||
| 7 | /* | ||
| 8 | * To change the maximum rsize and wsize supported by the NFS client, adjust | ||
| 9 | * NFS_MAX_FILE_IO_SIZE. 64KB is a typical maximum, but some servers can | ||
| 10 | * support a megabyte or more. The default is left at 4096 bytes, which is | ||
| 11 | * reasonable for NFS over UDP. | ||
| 12 | */ | ||
| 13 | #define NFS_MAX_FILE_IO_SIZE (1048576U) | ||
| 14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | ||
| 15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | ||
| 16 | |||
| 7 | struct nfs4_fsid { | 17 | struct nfs4_fsid { |
| 8 | __u64 major; | 18 | __u64 major; |
| 9 | __u64 minor; | 19 | __u64 minor; |
| @@ -137,7 +147,7 @@ struct nfs_openres { | |||
| 137 | */ | 147 | */ |
| 138 | struct nfs_open_confirmargs { | 148 | struct nfs_open_confirmargs { |
| 139 | const struct nfs_fh * fh; | 149 | const struct nfs_fh * fh; |
| 140 | nfs4_stateid stateid; | 150 | nfs4_stateid * stateid; |
| 141 | struct nfs_seqid * seqid; | 151 | struct nfs_seqid * seqid; |
| 142 | }; | 152 | }; |
| 143 | 153 | ||
| @@ -165,66 +175,62 @@ struct nfs_closeres { | |||
| 165 | * * Arguments to the lock,lockt, and locku call. | 175 | * * Arguments to the lock,lockt, and locku call. |
| 166 | * */ | 176 | * */ |
| 167 | struct nfs_lowner { | 177 | struct nfs_lowner { |
| 168 | __u64 clientid; | 178 | __u64 clientid; |
| 169 | u32 id; | 179 | u32 id; |
| 170 | }; | 180 | }; |
| 171 | 181 | ||
| 172 | struct nfs_lock_opargs { | 182 | struct nfs_lock_args { |
| 183 | struct nfs_fh * fh; | ||
| 184 | struct file_lock * fl; | ||
| 173 | struct nfs_seqid * lock_seqid; | 185 | struct nfs_seqid * lock_seqid; |
| 174 | nfs4_stateid * lock_stateid; | 186 | nfs4_stateid * lock_stateid; |
| 175 | struct nfs_seqid * open_seqid; | 187 | struct nfs_seqid * open_seqid; |
| 176 | nfs4_stateid * open_stateid; | 188 | nfs4_stateid * open_stateid; |
| 177 | struct nfs_lowner lock_owner; | 189 | struct nfs_lowner lock_owner; |
| 178 | __u32 reclaim; | 190 | unsigned char block : 1; |
| 179 | __u32 new_lock_owner; | 191 | unsigned char reclaim : 1; |
| 192 | unsigned char new_lock_owner : 1; | ||
| 180 | }; | 193 | }; |
| 181 | 194 | ||
| 182 | struct nfs_locku_opargs { | 195 | struct nfs_lock_res { |
| 196 | nfs4_stateid stateid; | ||
| 197 | }; | ||
| 198 | |||
| 199 | struct nfs_locku_args { | ||
| 200 | struct nfs_fh * fh; | ||
| 201 | struct file_lock * fl; | ||
| 183 | struct nfs_seqid * seqid; | 202 | struct nfs_seqid * seqid; |
| 184 | nfs4_stateid * stateid; | 203 | nfs4_stateid * stateid; |
| 185 | }; | 204 | }; |
| 186 | 205 | ||
| 187 | struct nfs_lockargs { | 206 | struct nfs_locku_res { |
| 188 | struct nfs_fh * fh; | 207 | nfs4_stateid stateid; |
| 189 | __u32 type; | ||
| 190 | __u64 offset; | ||
| 191 | __u64 length; | ||
| 192 | union { | ||
| 193 | struct nfs_lock_opargs *lock; /* LOCK */ | ||
| 194 | struct nfs_lowner *lockt; /* LOCKT */ | ||
| 195 | struct nfs_locku_opargs *locku; /* LOCKU */ | ||
| 196 | } u; | ||
| 197 | }; | 208 | }; |
| 198 | 209 | ||
| 199 | struct nfs_lock_denied { | 210 | struct nfs_lockt_args { |
| 200 | __u64 offset; | 211 | struct nfs_fh * fh; |
| 201 | __u64 length; | 212 | struct file_lock * fl; |
| 202 | __u32 type; | 213 | struct nfs_lowner lock_owner; |
| 203 | struct nfs_lowner owner; | ||
| 204 | }; | 214 | }; |
| 205 | 215 | ||
| 206 | struct nfs_lockres { | 216 | struct nfs_lockt_res { |
| 207 | union { | 217 | struct file_lock * denied; /* LOCK, LOCKT failed */ |
| 208 | nfs4_stateid stateid;/* LOCK success, LOCKU */ | ||
| 209 | struct nfs_lock_denied denied; /* LOCK failed, LOCKT success */ | ||
| 210 | } u; | ||
| 211 | const struct nfs_server * server; | ||
| 212 | }; | 218 | }; |
| 213 | 219 | ||
| 214 | struct nfs4_delegreturnargs { | 220 | struct nfs4_delegreturnargs { |
| 215 | const struct nfs_fh *fhandle; | 221 | const struct nfs_fh *fhandle; |
| 216 | const nfs4_stateid *stateid; | 222 | const nfs4_stateid *stateid; |
| 223 | const u32 * bitmask; | ||
| 224 | }; | ||
| 225 | |||
| 226 | struct nfs4_delegreturnres { | ||
| 227 | struct nfs_fattr * fattr; | ||
| 228 | const struct nfs_server *server; | ||
| 217 | }; | 229 | }; |
| 218 | 230 | ||
| 219 | /* | 231 | /* |
| 220 | * Arguments to the read call. | 232 | * Arguments to the read call. |
| 221 | */ | 233 | */ |
| 222 | |||
| 223 | #define NFS_READ_MAXIOV (9U) | ||
| 224 | #if (NFS_READ_MAXIOV > (MAX_IOVEC -2)) | ||
| 225 | #error "NFS_READ_MAXIOV is too large" | ||
| 226 | #endif | ||
| 227 | |||
| 228 | struct nfs_readargs { | 234 | struct nfs_readargs { |
| 229 | struct nfs_fh * fh; | 235 | struct nfs_fh * fh; |
| 230 | struct nfs_open_context *context; | 236 | struct nfs_open_context *context; |
| @@ -243,11 +249,6 @@ struct nfs_readres { | |||
| 243 | /* | 249 | /* |
| 244 | * Arguments to the write call. | 250 | * Arguments to the write call. |
| 245 | */ | 251 | */ |
| 246 | #define NFS_WRITE_MAXIOV (9U) | ||
| 247 | #if (NFS_WRITE_MAXIOV > (MAX_IOVEC -2)) | ||
| 248 | #error "NFS_WRITE_MAXIOV is too large" | ||
| 249 | #endif | ||
| 250 | |||
| 251 | struct nfs_writeargs { | 252 | struct nfs_writeargs { |
| 252 | struct nfs_fh * fh; | 253 | struct nfs_fh * fh; |
| 253 | struct nfs_open_context *context; | 254 | struct nfs_open_context *context; |
| @@ -678,6 +679,8 @@ struct nfs4_server_caps_res { | |||
| 678 | 679 | ||
| 679 | struct nfs_page; | 680 | struct nfs_page; |
| 680 | 681 | ||
| 682 | #define NFS_PAGEVEC_SIZE (8U) | ||
| 683 | |||
| 681 | struct nfs_read_data { | 684 | struct nfs_read_data { |
| 682 | int flags; | 685 | int flags; |
| 683 | struct rpc_task task; | 686 | struct rpc_task task; |
| @@ -686,13 +689,14 @@ struct nfs_read_data { | |||
| 686 | struct nfs_fattr fattr; /* fattr storage */ | 689 | struct nfs_fattr fattr; /* fattr storage */ |
| 687 | struct list_head pages; /* Coalesced read requests */ | 690 | struct list_head pages; /* Coalesced read requests */ |
| 688 | struct nfs_page *req; /* multi ops per nfs_page */ | 691 | struct nfs_page *req; /* multi ops per nfs_page */ |
| 689 | struct page *pagevec[NFS_READ_MAXIOV]; | 692 | struct page **pagevec; |
| 690 | struct nfs_readargs args; | 693 | struct nfs_readargs args; |
| 691 | struct nfs_readres res; | 694 | struct nfs_readres res; |
| 692 | #ifdef CONFIG_NFS_V4 | 695 | #ifdef CONFIG_NFS_V4 |
| 693 | unsigned long timestamp; /* For lease renewal */ | 696 | unsigned long timestamp; /* For lease renewal */ |
| 694 | #endif | 697 | #endif |
| 695 | void (*complete) (struct nfs_read_data *, int); | 698 | void (*complete) (struct nfs_read_data *, int); |
| 699 | struct page *page_array[NFS_PAGEVEC_SIZE + 1]; | ||
| 696 | }; | 700 | }; |
| 697 | 701 | ||
| 698 | struct nfs_write_data { | 702 | struct nfs_write_data { |
| @@ -704,13 +708,14 @@ struct nfs_write_data { | |||
| 704 | struct nfs_writeverf verf; | 708 | struct nfs_writeverf verf; |
| 705 | struct list_head pages; /* Coalesced requests we wish to flush */ | 709 | struct list_head pages; /* Coalesced requests we wish to flush */ |
| 706 | struct nfs_page *req; /* multi ops per nfs_page */ | 710 | struct nfs_page *req; /* multi ops per nfs_page */ |
| 707 | struct page *pagevec[NFS_WRITE_MAXIOV]; | 711 | struct page **pagevec; |
| 708 | struct nfs_writeargs args; /* argument struct */ | 712 | struct nfs_writeargs args; /* argument struct */ |
| 709 | struct nfs_writeres res; /* result struct */ | 713 | struct nfs_writeres res; /* result struct */ |
| 710 | #ifdef CONFIG_NFS_V4 | 714 | #ifdef CONFIG_NFS_V4 |
| 711 | unsigned long timestamp; /* For lease renewal */ | 715 | unsigned long timestamp; /* For lease renewal */ |
| 712 | #endif | 716 | #endif |
| 713 | void (*complete) (struct nfs_write_data *, int); | 717 | void (*complete) (struct nfs_write_data *, int); |
| 718 | struct page *page_array[NFS_PAGEVEC_SIZE + 1]; | ||
| 714 | }; | 719 | }; |
| 715 | 720 | ||
| 716 | struct nfs_access_entry; | 721 | struct nfs_access_entry; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 24db7248301a..a213e999de31 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -986,6 +986,7 @@ | |||
| 986 | #define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a | 986 | #define PCI_DEVICE_ID_NVIDIA_TNT_UNKNOWN 0x002a |
| 987 | #define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C | 987 | #define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C |
| 988 | #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D | 988 | #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D |
| 989 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS 0x0034 | ||
| 989 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 | 990 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 |
| 990 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 | 991 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 |
| 991 | #define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 | 992 | #define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index ab151bbb66df..f147e6b84332 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -49,7 +49,6 @@ struct rpc_clnt { | |||
| 49 | 49 | ||
| 50 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 50 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
| 51 | cl_intr : 1,/* interruptible */ | 51 | cl_intr : 1,/* interruptible */ |
| 52 | cl_chatty : 1,/* be verbose */ | ||
| 53 | cl_autobind : 1,/* use getport() */ | 52 | cl_autobind : 1,/* use getport() */ |
| 54 | cl_oneshot : 1,/* dispose after use */ | 53 | cl_oneshot : 1,/* dispose after use */ |
| 55 | cl_dead : 1;/* abandoned */ | 54 | cl_dead : 1;/* abandoned */ |
| @@ -126,7 +125,8 @@ int rpc_register(u32, u32, int, unsigned short, int *); | |||
| 126 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); | 125 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); |
| 127 | 126 | ||
| 128 | int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, | 127 | int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg, |
| 129 | int flags, rpc_action callback, void *clntdata); | 128 | int flags, const struct rpc_call_ops *tk_ops, |
| 129 | void *calldata); | ||
| 130 | int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, | 130 | int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, |
| 131 | int flags); | 131 | int flags); |
| 132 | void rpc_restart_call(struct rpc_task *); | 132 | void rpc_restart_call(struct rpc_task *); |
| @@ -134,6 +134,7 @@ void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); | |||
| 134 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); | 134 | void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); |
| 135 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 135 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
| 136 | size_t rpc_max_payload(struct rpc_clnt *); | 136 | size_t rpc_max_payload(struct rpc_clnt *); |
| 137 | void rpc_force_rebind(struct rpc_clnt *); | ||
| 137 | int rpc_ping(struct rpc_clnt *clnt, int flags); | 138 | int rpc_ping(struct rpc_clnt *clnt, int flags); |
| 138 | 139 | ||
| 139 | static __inline__ | 140 | static __inline__ |
diff --git a/include/linux/sunrpc/gss_spkm3.h b/include/linux/sunrpc/gss_spkm3.h index 0beb2cf00a84..336e218c2782 100644 --- a/include/linux/sunrpc/gss_spkm3.h +++ b/include/linux/sunrpc/gss_spkm3.h | |||
| @@ -48,7 +48,7 @@ u32 spkm3_read_token(struct spkm3_ctx *ctx, struct xdr_netobj *read_token, struc | |||
| 48 | #define CKSUMTYPE_RSA_MD5 0x0007 | 48 | #define CKSUMTYPE_RSA_MD5 0x0007 |
| 49 | 49 | ||
| 50 | s32 make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, | 50 | s32 make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, |
| 51 | struct xdr_netobj *cksum); | 51 | int body_offset, struct xdr_netobj *cksum); |
| 52 | void asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits); | 52 | void asn1_bitstring_len(struct xdr_netobj *in, int *enclen, int *zerobits); |
| 53 | int decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, | 53 | int decode_asn1_bitstring(struct xdr_netobj *out, char *in, int enclen, |
| 54 | int explen); | 54 | int explen); |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 4d77e90d0b30..8b25629accd8 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
| @@ -27,6 +27,7 @@ struct rpc_message { | |||
| 27 | struct rpc_cred * rpc_cred; /* Credentials */ | 27 | struct rpc_cred * rpc_cred; /* Credentials */ |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | struct rpc_call_ops; | ||
| 30 | struct rpc_wait_queue; | 31 | struct rpc_wait_queue; |
| 31 | struct rpc_wait { | 32 | struct rpc_wait { |
| 32 | struct list_head list; /* wait queue links */ | 33 | struct list_head list; /* wait queue links */ |
| @@ -41,6 +42,7 @@ struct rpc_task { | |||
| 41 | #ifdef RPC_DEBUG | 42 | #ifdef RPC_DEBUG |
| 42 | unsigned long tk_magic; /* 0xf00baa */ | 43 | unsigned long tk_magic; /* 0xf00baa */ |
| 43 | #endif | 44 | #endif |
| 45 | atomic_t tk_count; /* Reference count */ | ||
| 44 | struct list_head tk_task; /* global list of tasks */ | 46 | struct list_head tk_task; /* global list of tasks */ |
| 45 | struct rpc_clnt * tk_client; /* RPC client */ | 47 | struct rpc_clnt * tk_client; /* RPC client */ |
| 46 | struct rpc_rqst * tk_rqstp; /* RPC request */ | 48 | struct rpc_rqst * tk_rqstp; /* RPC request */ |
| @@ -50,8 +52,6 @@ struct rpc_task { | |||
| 50 | * RPC call state | 52 | * RPC call state |
| 51 | */ | 53 | */ |
| 52 | struct rpc_message tk_msg; /* RPC call info */ | 54 | struct rpc_message tk_msg; /* RPC call info */ |
| 53 | __u32 * tk_buffer; /* XDR buffer */ | ||
| 54 | size_t tk_bufsize; | ||
| 55 | __u8 tk_garb_retry; | 55 | __u8 tk_garb_retry; |
| 56 | __u8 tk_cred_retry; | 56 | __u8 tk_cred_retry; |
| 57 | 57 | ||
| @@ -61,13 +61,12 @@ struct rpc_task { | |||
| 61 | * timeout_fn to be executed by timer bottom half | 61 | * timeout_fn to be executed by timer bottom half |
| 62 | * callback to be executed after waking up | 62 | * callback to be executed after waking up |
| 63 | * action next procedure for async tasks | 63 | * action next procedure for async tasks |
| 64 | * exit exit async task and report to caller | 64 | * tk_ops caller callbacks |
| 65 | */ | 65 | */ |
| 66 | void (*tk_timeout_fn)(struct rpc_task *); | 66 | void (*tk_timeout_fn)(struct rpc_task *); |
| 67 | void (*tk_callback)(struct rpc_task *); | 67 | void (*tk_callback)(struct rpc_task *); |
| 68 | void (*tk_action)(struct rpc_task *); | 68 | void (*tk_action)(struct rpc_task *); |
| 69 | void (*tk_exit)(struct rpc_task *); | 69 | const struct rpc_call_ops *tk_ops; |
| 70 | void (*tk_release)(struct rpc_task *); | ||
| 71 | void * tk_calldata; | 70 | void * tk_calldata; |
| 72 | 71 | ||
| 73 | /* | 72 | /* |
| @@ -78,7 +77,6 @@ struct rpc_task { | |||
| 78 | struct timer_list tk_timer; /* kernel timer */ | 77 | struct timer_list tk_timer; /* kernel timer */ |
| 79 | unsigned long tk_timeout; /* timeout for rpc_sleep() */ | 78 | unsigned long tk_timeout; /* timeout for rpc_sleep() */ |
| 80 | unsigned short tk_flags; /* misc flags */ | 79 | unsigned short tk_flags; /* misc flags */ |
| 81 | unsigned char tk_active : 1;/* Task has been activated */ | ||
| 82 | unsigned char tk_priority : 2;/* Task priority */ | 80 | unsigned char tk_priority : 2;/* Task priority */ |
| 83 | unsigned long tk_runstate; /* Task run status */ | 81 | unsigned long tk_runstate; /* Task run status */ |
| 84 | struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could | 82 | struct workqueue_struct *tk_workqueue; /* Normally rpciod, but could |
| @@ -111,6 +109,13 @@ struct rpc_task { | |||
| 111 | 109 | ||
| 112 | typedef void (*rpc_action)(struct rpc_task *); | 110 | typedef void (*rpc_action)(struct rpc_task *); |
| 113 | 111 | ||
| 112 | struct rpc_call_ops { | ||
| 113 | void (*rpc_call_prepare)(struct rpc_task *, void *); | ||
| 114 | void (*rpc_call_done)(struct rpc_task *, void *); | ||
| 115 | void (*rpc_release)(void *); | ||
| 116 | }; | ||
| 117 | |||
| 118 | |||
| 114 | /* | 119 | /* |
| 115 | * RPC task flags | 120 | * RPC task flags |
| 116 | */ | 121 | */ |
| @@ -129,7 +134,6 @@ typedef void (*rpc_action)(struct rpc_task *); | |||
| 129 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) | 134 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) |
| 130 | #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) | 135 | #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) |
| 131 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) | 136 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) |
| 132 | #define RPC_IS_ACTIVATED(t) ((t)->tk_active) | ||
| 133 | #define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL) | 137 | #define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL) |
| 134 | #define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT) | 138 | #define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT) |
| 135 | #define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR) | 139 | #define RPC_TASK_UNINTERRUPTIBLE(t) ((t)->tk_flags & RPC_TASK_NOINTR) |
| @@ -138,6 +142,7 @@ typedef void (*rpc_action)(struct rpc_task *); | |||
| 138 | #define RPC_TASK_QUEUED 1 | 142 | #define RPC_TASK_QUEUED 1 |
| 139 | #define RPC_TASK_WAKEUP 2 | 143 | #define RPC_TASK_WAKEUP 2 |
| 140 | #define RPC_TASK_HAS_TIMER 3 | 144 | #define RPC_TASK_HAS_TIMER 3 |
| 145 | #define RPC_TASK_ACTIVE 4 | ||
| 141 | 146 | ||
| 142 | #define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 147 | #define RPC_IS_RUNNING(t) (test_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) |
| 143 | #define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) | 148 | #define rpc_set_running(t) (set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate)) |
| @@ -168,6 +173,15 @@ typedef void (*rpc_action)(struct rpc_task *); | |||
| 168 | smp_mb__after_clear_bit(); \ | 173 | smp_mb__after_clear_bit(); \ |
| 169 | } while (0) | 174 | } while (0) |
| 170 | 175 | ||
| 176 | #define RPC_IS_ACTIVATED(t) (test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) | ||
| 177 | #define rpc_set_active(t) (set_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate)) | ||
| 178 | #define rpc_clear_active(t) \ | ||
| 179 | do { \ | ||
| 180 | smp_mb__before_clear_bit(); \ | ||
| 181 | clear_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate); \ | ||
| 182 | smp_mb__after_clear_bit(); \ | ||
| 183 | } while(0) | ||
| 184 | |||
| 171 | /* | 185 | /* |
| 172 | * Task priorities. | 186 | * Task priorities. |
| 173 | * Note: if you change these, you must also change | 187 | * Note: if you change these, you must also change |
| @@ -228,11 +242,16 @@ struct rpc_wait_queue { | |||
| 228 | /* | 242 | /* |
| 229 | * Function prototypes | 243 | * Function prototypes |
| 230 | */ | 244 | */ |
| 231 | struct rpc_task *rpc_new_task(struct rpc_clnt *, rpc_action, int flags); | 245 | struct rpc_task *rpc_new_task(struct rpc_clnt *, int flags, |
| 246 | const struct rpc_call_ops *ops, void *data); | ||
| 247 | struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags, | ||
| 248 | const struct rpc_call_ops *ops, void *data); | ||
| 232 | struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent); | 249 | struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent); |
| 233 | void rpc_init_task(struct rpc_task *, struct rpc_clnt *, | 250 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, |
| 234 | rpc_action exitfunc, int flags); | 251 | int flags, const struct rpc_call_ops *ops, |
| 252 | void *data); | ||
| 235 | void rpc_release_task(struct rpc_task *); | 253 | void rpc_release_task(struct rpc_task *); |
| 254 | void rpc_exit_task(struct rpc_task *); | ||
| 236 | void rpc_killall_tasks(struct rpc_clnt *); | 255 | void rpc_killall_tasks(struct rpc_clnt *); |
| 237 | int rpc_execute(struct rpc_task *); | 256 | int rpc_execute(struct rpc_task *); |
| 238 | void rpc_run_child(struct rpc_task *parent, struct rpc_task *child, | 257 | void rpc_run_child(struct rpc_task *parent, struct rpc_task *child, |
| @@ -247,9 +266,11 @@ struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); | |||
| 247 | void rpc_wake_up_status(struct rpc_wait_queue *, int); | 266 | void rpc_wake_up_status(struct rpc_wait_queue *, int); |
| 248 | void rpc_delay(struct rpc_task *, unsigned long); | 267 | void rpc_delay(struct rpc_task *, unsigned long); |
| 249 | void * rpc_malloc(struct rpc_task *, size_t); | 268 | void * rpc_malloc(struct rpc_task *, size_t); |
| 269 | void rpc_free(struct rpc_task *); | ||
| 250 | int rpciod_up(void); | 270 | int rpciod_up(void); |
| 251 | void rpciod_down(void); | 271 | void rpciod_down(void); |
| 252 | void rpciod_wake_up(void); | 272 | void rpciod_wake_up(void); |
| 273 | int __rpc_wait_for_completion_task(struct rpc_task *task, int (*)(void *)); | ||
| 253 | #ifdef RPC_DEBUG | 274 | #ifdef RPC_DEBUG |
| 254 | void rpc_show_tasks(void); | 275 | void rpc_show_tasks(void); |
| 255 | #endif | 276 | #endif |
| @@ -259,7 +280,12 @@ void rpc_destroy_mempool(void); | |||
| 259 | static inline void rpc_exit(struct rpc_task *task, int status) | 280 | static inline void rpc_exit(struct rpc_task *task, int status) |
| 260 | { | 281 | { |
| 261 | task->tk_status = status; | 282 | task->tk_status = status; |
| 262 | task->tk_action = NULL; | 283 | task->tk_action = rpc_exit_task; |
| 284 | } | ||
| 285 | |||
| 286 | static inline int rpc_wait_for_completion_task(struct rpc_task *task) | ||
| 287 | { | ||
| 288 | return __rpc_wait_for_completion_task(task, NULL); | ||
| 263 | } | 289 | } |
| 264 | 290 | ||
| 265 | #ifdef RPC_DEBUG | 291 | #ifdef RPC_DEBUG |
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 5da968729cf8..84c35d42d250 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
| @@ -91,7 +91,6 @@ struct xdr_buf { | |||
| 91 | u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len); | 91 | u32 * xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len); |
| 92 | u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len); | 92 | u32 * xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len); |
| 93 | u32 * xdr_encode_string(u32 *p, const char *s); | 93 | u32 * xdr_encode_string(u32 *p, const char *s); |
| 94 | u32 * xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen); | ||
| 95 | u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); | 94 | u32 * xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen); |
| 96 | u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); | 95 | u32 * xdr_encode_netobj(u32 *p, const struct xdr_netobj *); |
| 97 | u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *); | 96 | u32 * xdr_decode_netobj(u32 *p, struct xdr_netobj *); |
| @@ -135,11 +134,6 @@ xdr_adjust_iovec(struct kvec *iov, u32 *p) | |||
| 135 | } | 134 | } |
| 136 | 135 | ||
| 137 | /* | 136 | /* |
| 138 | * Maximum number of iov's we use. | ||
| 139 | */ | ||
| 140 | #define MAX_IOVEC (12) | ||
| 141 | |||
| 142 | /* | ||
| 143 | * XDR buffer helper functions | 137 | * XDR buffer helper functions |
| 144 | */ | 138 | */ |
| 145 | extern void xdr_shift_buf(struct xdr_buf *, size_t); | 139 | extern void xdr_shift_buf(struct xdr_buf *, size_t); |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3b8b6e823c70..6ef99b14ff09 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -79,21 +79,19 @@ struct rpc_rqst { | |||
| 79 | void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */ | 79 | void (*rq_release_snd_buf)(struct rpc_rqst *); /* release rq_enc_pages */ |
| 80 | struct list_head rq_list; | 80 | struct list_head rq_list; |
| 81 | 81 | ||
| 82 | __u32 * rq_buffer; /* XDR encode buffer */ | ||
| 83 | size_t rq_bufsize; | ||
| 84 | |||
| 82 | struct xdr_buf rq_private_buf; /* The receive buffer | 85 | struct xdr_buf rq_private_buf; /* The receive buffer |
| 83 | * used in the softirq. | 86 | * used in the softirq. |
| 84 | */ | 87 | */ |
| 85 | unsigned long rq_majortimeo; /* major timeout alarm */ | 88 | unsigned long rq_majortimeo; /* major timeout alarm */ |
| 86 | unsigned long rq_timeout; /* Current timeout value */ | 89 | unsigned long rq_timeout; /* Current timeout value */ |
| 87 | unsigned int rq_retries; /* # of retries */ | 90 | unsigned int rq_retries; /* # of retries */ |
| 88 | /* | ||
| 89 | * For authentication (e.g. auth_des) | ||
| 90 | */ | ||
| 91 | u32 rq_creddata[2]; | ||
| 92 | 91 | ||
| 93 | /* | 92 | /* |
| 94 | * Partial send handling | 93 | * Partial send handling |
| 95 | */ | 94 | */ |
| 96 | |||
| 97 | u32 rq_bytes_sent; /* Bytes we have sent */ | 95 | u32 rq_bytes_sent; /* Bytes we have sent */ |
| 98 | 96 | ||
| 99 | unsigned long rq_xtime; /* when transmitted */ | 97 | unsigned long rq_xtime; /* when transmitted */ |
| @@ -106,7 +104,10 @@ struct rpc_xprt_ops { | |||
| 106 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); | 104 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); |
| 107 | int (*reserve_xprt)(struct rpc_task *task); | 105 | int (*reserve_xprt)(struct rpc_task *task); |
| 108 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 106 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
| 107 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | ||
| 109 | void (*connect)(struct rpc_task *task); | 108 | void (*connect)(struct rpc_task *task); |
| 109 | void * (*buf_alloc)(struct rpc_task *task, size_t size); | ||
| 110 | void (*buf_free)(struct rpc_task *task); | ||
| 110 | int (*send_request)(struct rpc_task *task); | 111 | int (*send_request)(struct rpc_task *task); |
| 111 | void (*set_retrans_timeout)(struct rpc_task *task); | 112 | void (*set_retrans_timeout)(struct rpc_task *task); |
| 112 | void (*timer)(struct rpc_task *task); | 113 | void (*timer)(struct rpc_task *task); |
| @@ -253,6 +254,7 @@ int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to); | |||
| 253 | #define XPRT_LOCKED (0) | 254 | #define XPRT_LOCKED (0) |
| 254 | #define XPRT_CONNECTED (1) | 255 | #define XPRT_CONNECTED (1) |
| 255 | #define XPRT_CONNECTING (2) | 256 | #define XPRT_CONNECTING (2) |
| 257 | #define XPRT_CLOSE_WAIT (3) | ||
| 256 | 258 | ||
| 257 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 259 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
| 258 | { | 260 | { |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 64a36ba43b2f..b096159086e8 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -53,10 +53,11 @@ struct writeback_control { | |||
| 53 | loff_t start; | 53 | loff_t start; |
| 54 | loff_t end; | 54 | loff_t end; |
| 55 | 55 | ||
| 56 | unsigned nonblocking:1; /* Don't get stuck on request queues */ | 56 | unsigned nonblocking:1; /* Don't get stuck on request queues */ |
| 57 | unsigned encountered_congestion:1; /* An output: a queue is full */ | 57 | unsigned encountered_congestion:1; /* An output: a queue is full */ |
| 58 | unsigned for_kupdate:1; /* A kupdate writeback */ | 58 | unsigned for_kupdate:1; /* A kupdate writeback */ |
| 59 | unsigned for_reclaim:1; /* Invoked from the page allocator */ | 59 | unsigned for_reclaim:1; /* Invoked from the page allocator */ |
| 60 | unsigned for_writepages:1; /* This is a writepages() call */ | ||
| 60 | }; | 61 | }; |
| 61 | 62 | ||
| 62 | /* | 63 | /* |
