aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 12:36:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-18 12:36:34 -0500
commit2d4dce0070448bcb5ccd04553a4be4635417f565 (patch)
tree300915d2df0b8f28072d090c21d8ac084cd5f6c0 /include
parentea88eeac0cb8328014b53d80ca631e8dc0dc18dc (diff)
parentcd6c5968582a273561464fe6b1e8cc8214be02df (diff)
Merge tag 'nfs-for-3.8-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Features include: - Full audit of BUG_ON asserts in the NFS, SUNRPC and lockd client code. Remove altogether where possible, and replace with WARN_ON_ONCE and appropriate error returns where not. - NFSv4.1 client adds session dynamic slot table management. There is matching server side code that has been submitted to Bruce for consideration. Together, this code allows the server to dynamically manage the amount of memory it allocates to the duplicate request cache for each client. It will constantly resize those caches to reserve more memory for clients that are hot while shrinking caches for those that are quiescent. In addition, there are assorted bugfixes for the generic NFS write code, fixes to deal with the drop_nlink() warnings, and yet another fix for NFSv4 getacl." * tag 'nfs-for-3.8-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (106 commits) SUNRPC: continue run over clients list on PipeFS event instead of break NFS: Don't use SetPageError in the NFS writeback code SUNRPC: variable 'svsk' is unused in function bc_send_request SUNRPC: Handle ECONNREFUSED in xs_local_setup_socket NFSv4.1: Deal effectively with interrupted RPC calls. NFSv4.1: Move the RPC timestamp out of the slot. NFSv4.1: Try to deal with NFS4ERR_SEQ_MISORDERED. NFS: nfs_lookup_revalidate should not trust an inode with i_nlink == 0 NFS: Fix calls to drop_nlink() NFS: Ensure that we always drop inodes that have been marked as stale nfs: Remove unused list nfs4_clientid_list nfs: Remove duplicate function declaration in internal.h NFS: avoid NULL dereference in nfs_destroy_server SUNRPC handle EKEYEXPIRED in call_refreshresult SUNRPC set gss gc_expiry to full lifetime nfs: fix page dirtying in NFS DIO read codepath nfs: don't zero out the rest of the page if we hit the EOF on a DIO READ NFSv4.1: Be conservative about the client highest slotid NFSv4.1: Handle NFS4ERR_BADSLOT errors correctly nfs: don't extend writes to cover entire page if pagecache is invalid ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_fs_sb.h47
-rw-r--r--include/linux/nfs_xdr.h155
-rw-r--r--include/linux/sunrpc/sched.h1
3 files changed, 76 insertions, 127 deletions
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index a9e76ee1adca..6c6ed153a9b4 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -198,51 +198,4 @@ struct nfs_server {
198#define NFS_CAP_POSIX_LOCK (1U << 14) 198#define NFS_CAP_POSIX_LOCK (1U << 14)
199#define NFS_CAP_UIDGID_NOMAP (1U << 15) 199#define NFS_CAP_UIDGID_NOMAP (1U << 15)
200 200
201
202/* maximum number of slots to use */
203#define NFS4_DEF_SLOT_TABLE_SIZE (16U)
204#define NFS4_MAX_SLOT_TABLE (256U)
205#define NFS4_NO_SLOT ((u32)-1)
206
207#if IS_ENABLED(CONFIG_NFS_V4)
208
209/* Sessions */
210#define SLOT_TABLE_SZ DIV_ROUND_UP(NFS4_MAX_SLOT_TABLE, 8*sizeof(long))
211struct nfs4_slot_table {
212 struct nfs4_slot *slots; /* seqid per slot */
213 unsigned long used_slots[SLOT_TABLE_SZ]; /* used/unused bitmap */
214 spinlock_t slot_tbl_lock;
215 struct rpc_wait_queue slot_tbl_waitq; /* allocators may wait here */
216 u32 max_slots; /* # slots in table */
217 u32 highest_used_slotid; /* sent to server on each SEQ.
218 * op for dynamic resizing */
219 u32 target_max_slots; /* Set by CB_RECALL_SLOT as
220 * the new max_slots */
221 struct completion complete;
222};
223
224static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp)
225{
226 return sp - tbl->slots;
227}
228
229/*
230 * Session related parameters
231 */
232struct nfs4_session {
233 struct nfs4_sessionid sess_id;
234 u32 flags;
235 unsigned long session_state;
236 u32 hash_alg;
237 u32 ssv_len;
238
239 /* The fore and back channel */
240 struct nfs4_channel_attrs fc_attrs;
241 struct nfs4_slot_table fc_slot_table;
242 struct nfs4_channel_attrs bc_attrs;
243 struct nfs4_slot_table bc_slot_table;
244 struct nfs_client *clp;
245};
246
247#endif /* CONFIG_NFS_V4 */
248#endif 201#endif
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index a73ea89789d1..29adb12c7ecf 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -185,23 +185,20 @@ struct nfs4_channel_attrs {
185 u32 max_reqs; 185 u32 max_reqs;
186}; 186};
187 187
188/* nfs41 sessions slot seqid */ 188struct nfs4_slot;
189struct nfs4_slot {
190 u32 seq_nr;
191};
192
193struct nfs4_sequence_args { 189struct nfs4_sequence_args {
194 struct nfs4_session *sa_session; 190 struct nfs4_slot *sa_slot;
195 u32 sa_slotid; 191 u8 sa_cache_this : 1,
196 u8 sa_cache_this; 192 sa_privileged : 1;
197}; 193};
198 194
199struct nfs4_sequence_res { 195struct nfs4_sequence_res {
200 struct nfs4_session *sr_session;
201 struct nfs4_slot *sr_slot; /* slot used to send request */ 196 struct nfs4_slot *sr_slot; /* slot used to send request */
197 unsigned long sr_timestamp;
202 int sr_status; /* sequence operation status */ 198 int sr_status; /* sequence operation status */
203 unsigned long sr_renewal_time;
204 u32 sr_status_flags; 199 u32 sr_status_flags;
200 u32 sr_highest_slotid;
201 u32 sr_target_highest_slotid;
205}; 202};
206 203
207struct nfs4_get_lease_time_args { 204struct nfs4_get_lease_time_args {
@@ -209,8 +206,8 @@ struct nfs4_get_lease_time_args {
209}; 206};
210 207
211struct nfs4_get_lease_time_res { 208struct nfs4_get_lease_time_res {
212 struct nfs_fsinfo *lr_fsinfo;
213 struct nfs4_sequence_res lr_seq_res; 209 struct nfs4_sequence_res lr_seq_res;
210 struct nfs_fsinfo *lr_fsinfo;
214}; 211};
215 212
216#define PNFS_LAYOUT_MAXSIZE 4096 213#define PNFS_LAYOUT_MAXSIZE 4096
@@ -228,23 +225,23 @@ struct pnfs_layout_range {
228}; 225};
229 226
230struct nfs4_layoutget_args { 227struct nfs4_layoutget_args {
228 struct nfs4_sequence_args seq_args;
231 __u32 type; 229 __u32 type;
232 struct pnfs_layout_range range; 230 struct pnfs_layout_range range;
233 __u64 minlength; 231 __u64 minlength;
234 __u32 maxcount; 232 __u32 maxcount;
235 struct inode *inode; 233 struct inode *inode;
236 struct nfs_open_context *ctx; 234 struct nfs_open_context *ctx;
237 struct nfs4_sequence_args seq_args;
238 nfs4_stateid stateid; 235 nfs4_stateid stateid;
239 struct nfs4_layoutdriver_data layout; 236 struct nfs4_layoutdriver_data layout;
240}; 237};
241 238
242struct nfs4_layoutget_res { 239struct nfs4_layoutget_res {
240 struct nfs4_sequence_res seq_res;
243 __u32 return_on_close; 241 __u32 return_on_close;
244 struct pnfs_layout_range range; 242 struct pnfs_layout_range range;
245 __u32 type; 243 __u32 type;
246 nfs4_stateid stateid; 244 nfs4_stateid stateid;
247 struct nfs4_sequence_res seq_res;
248 struct nfs4_layoutdriver_data *layoutp; 245 struct nfs4_layoutdriver_data *layoutp;
249}; 246};
250 247
@@ -255,38 +252,38 @@ struct nfs4_layoutget {
255}; 252};
256 253
257struct nfs4_getdevicelist_args { 254struct nfs4_getdevicelist_args {
255 struct nfs4_sequence_args seq_args;
258 const struct nfs_fh *fh; 256 const struct nfs_fh *fh;
259 u32 layoutclass; 257 u32 layoutclass;
260 struct nfs4_sequence_args seq_args;
261}; 258};
262 259
263struct nfs4_getdevicelist_res { 260struct nfs4_getdevicelist_res {
264 struct pnfs_devicelist *devlist;
265 struct nfs4_sequence_res seq_res; 261 struct nfs4_sequence_res seq_res;
262 struct pnfs_devicelist *devlist;
266}; 263};
267 264
268struct nfs4_getdeviceinfo_args { 265struct nfs4_getdeviceinfo_args {
269 struct pnfs_device *pdev;
270 struct nfs4_sequence_args seq_args; 266 struct nfs4_sequence_args seq_args;
267 struct pnfs_device *pdev;
271}; 268};
272 269
273struct nfs4_getdeviceinfo_res { 270struct nfs4_getdeviceinfo_res {
274 struct pnfs_device *pdev;
275 struct nfs4_sequence_res seq_res; 271 struct nfs4_sequence_res seq_res;
272 struct pnfs_device *pdev;
276}; 273};
277 274
278struct nfs4_layoutcommit_args { 275struct nfs4_layoutcommit_args {
276 struct nfs4_sequence_args seq_args;
279 nfs4_stateid stateid; 277 nfs4_stateid stateid;
280 __u64 lastbytewritten; 278 __u64 lastbytewritten;
281 struct inode *inode; 279 struct inode *inode;
282 const u32 *bitmask; 280 const u32 *bitmask;
283 struct nfs4_sequence_args seq_args;
284}; 281};
285 282
286struct nfs4_layoutcommit_res { 283struct nfs4_layoutcommit_res {
284 struct nfs4_sequence_res seq_res;
287 struct nfs_fattr *fattr; 285 struct nfs_fattr *fattr;
288 const struct nfs_server *server; 286 const struct nfs_server *server;
289 struct nfs4_sequence_res seq_res;
290 int status; 287 int status;
291}; 288};
292 289
@@ -300,11 +297,11 @@ struct nfs4_layoutcommit_data {
300}; 297};
301 298
302struct nfs4_layoutreturn_args { 299struct nfs4_layoutreturn_args {
300 struct nfs4_sequence_args seq_args;
303 struct pnfs_layout_hdr *layout; 301 struct pnfs_layout_hdr *layout;
304 struct inode *inode; 302 struct inode *inode;
305 nfs4_stateid stateid; 303 nfs4_stateid stateid;
306 __u32 layout_type; 304 __u32 layout_type;
307 struct nfs4_sequence_args seq_args;
308}; 305};
309 306
310struct nfs4_layoutreturn_res { 307struct nfs4_layoutreturn_res {
@@ -330,6 +327,7 @@ struct stateowner_id {
330 * Arguments to the open call. 327 * Arguments to the open call.
331 */ 328 */
332struct nfs_openargs { 329struct nfs_openargs {
330 struct nfs4_sequence_args seq_args;
333 const struct nfs_fh * fh; 331 const struct nfs_fh * fh;
334 struct nfs_seqid * seqid; 332 struct nfs_seqid * seqid;
335 int open_flags; 333 int open_flags;
@@ -350,10 +348,10 @@ struct nfs_openargs {
350 const u32 * bitmask; 348 const u32 * bitmask;
351 const u32 * open_bitmap; 349 const u32 * open_bitmap;
352 __u32 claim; 350 __u32 claim;
353 struct nfs4_sequence_args seq_args;
354}; 351};
355 352
356struct nfs_openres { 353struct nfs_openres {
354 struct nfs4_sequence_res seq_res;
357 nfs4_stateid stateid; 355 nfs4_stateid stateid;
358 struct nfs_fh fh; 356 struct nfs_fh fh;
359 struct nfs4_change_info cinfo; 357 struct nfs4_change_info cinfo;
@@ -368,7 +366,6 @@ struct nfs_openres {
368 __u32 attrset[NFS4_BITMAP_SIZE]; 366 __u32 attrset[NFS4_BITMAP_SIZE];
369 struct nfs4_string *owner; 367 struct nfs4_string *owner;
370 struct nfs4_string *group_owner; 368 struct nfs4_string *group_owner;
371 struct nfs4_sequence_res seq_res;
372 __u32 access_request; 369 __u32 access_request;
373 __u32 access_supported; 370 __u32 access_supported;
374 __u32 access_result; 371 __u32 access_result;
@@ -392,20 +389,20 @@ struct nfs_open_confirmres {
392 * Arguments to the close call. 389 * Arguments to the close call.
393 */ 390 */
394struct nfs_closeargs { 391struct nfs_closeargs {
392 struct nfs4_sequence_args seq_args;
395 struct nfs_fh * fh; 393 struct nfs_fh * fh;
396 nfs4_stateid * stateid; 394 nfs4_stateid * stateid;
397 struct nfs_seqid * seqid; 395 struct nfs_seqid * seqid;
398 fmode_t fmode; 396 fmode_t fmode;
399 const u32 * bitmask; 397 const u32 * bitmask;
400 struct nfs4_sequence_args seq_args;
401}; 398};
402 399
403struct nfs_closeres { 400struct nfs_closeres {
401 struct nfs4_sequence_res seq_res;
404 nfs4_stateid stateid; 402 nfs4_stateid stateid;
405 struct nfs_fattr * fattr; 403 struct nfs_fattr * fattr;
406 struct nfs_seqid * seqid; 404 struct nfs_seqid * seqid;
407 const struct nfs_server *server; 405 const struct nfs_server *server;
408 struct nfs4_sequence_res seq_res;
409}; 406};
410/* 407/*
411 * * Arguments to the lock,lockt, and locku call. 408 * * Arguments to the lock,lockt, and locku call.
@@ -417,6 +414,7 @@ struct nfs_lowner {
417}; 414};
418 415
419struct nfs_lock_args { 416struct nfs_lock_args {
417 struct nfs4_sequence_args seq_args;
420 struct nfs_fh * fh; 418 struct nfs_fh * fh;
421 struct file_lock * fl; 419 struct file_lock * fl;
422 struct nfs_seqid * lock_seqid; 420 struct nfs_seqid * lock_seqid;
@@ -427,40 +425,39 @@ struct nfs_lock_args {
427 unsigned char block : 1; 425 unsigned char block : 1;
428 unsigned char reclaim : 1; 426 unsigned char reclaim : 1;
429 unsigned char new_lock_owner : 1; 427 unsigned char new_lock_owner : 1;
430 struct nfs4_sequence_args seq_args;
431}; 428};
432 429
433struct nfs_lock_res { 430struct nfs_lock_res {
431 struct nfs4_sequence_res seq_res;
434 nfs4_stateid stateid; 432 nfs4_stateid stateid;
435 struct nfs_seqid * lock_seqid; 433 struct nfs_seqid * lock_seqid;
436 struct nfs_seqid * open_seqid; 434 struct nfs_seqid * open_seqid;
437 struct nfs4_sequence_res seq_res;
438}; 435};
439 436
440struct nfs_locku_args { 437struct nfs_locku_args {
438 struct nfs4_sequence_args seq_args;
441 struct nfs_fh * fh; 439 struct nfs_fh * fh;
442 struct file_lock * fl; 440 struct file_lock * fl;
443 struct nfs_seqid * seqid; 441 struct nfs_seqid * seqid;
444 nfs4_stateid * stateid; 442 nfs4_stateid * stateid;
445 struct nfs4_sequence_args seq_args;
446}; 443};
447 444
448struct nfs_locku_res { 445struct nfs_locku_res {
446 struct nfs4_sequence_res seq_res;
449 nfs4_stateid stateid; 447 nfs4_stateid stateid;
450 struct nfs_seqid * seqid; 448 struct nfs_seqid * seqid;
451 struct nfs4_sequence_res seq_res;
452}; 449};
453 450
454struct nfs_lockt_args { 451struct nfs_lockt_args {
452 struct nfs4_sequence_args seq_args;
455 struct nfs_fh * fh; 453 struct nfs_fh * fh;
456 struct file_lock * fl; 454 struct file_lock * fl;
457 struct nfs_lowner lock_owner; 455 struct nfs_lowner lock_owner;
458 struct nfs4_sequence_args seq_args;
459}; 456};
460 457
461struct nfs_lockt_res { 458struct nfs_lockt_res {
462 struct file_lock * denied; /* LOCK, LOCKT failed */
463 struct nfs4_sequence_res seq_res; 459 struct nfs4_sequence_res seq_res;
460 struct file_lock * denied; /* LOCK, LOCKT failed */
464}; 461};
465 462
466struct nfs_release_lockowner_args { 463struct nfs_release_lockowner_args {
@@ -468,22 +465,23 @@ struct nfs_release_lockowner_args {
468}; 465};
469 466
470struct nfs4_delegreturnargs { 467struct nfs4_delegreturnargs {
468 struct nfs4_sequence_args seq_args;
471 const struct nfs_fh *fhandle; 469 const struct nfs_fh *fhandle;
472 const nfs4_stateid *stateid; 470 const nfs4_stateid *stateid;
473 const u32 * bitmask; 471 const u32 * bitmask;
474 struct nfs4_sequence_args seq_args;
475}; 472};
476 473
477struct nfs4_delegreturnres { 474struct nfs4_delegreturnres {
475 struct nfs4_sequence_res seq_res;
478 struct nfs_fattr * fattr; 476 struct nfs_fattr * fattr;
479 const struct nfs_server *server; 477 const struct nfs_server *server;
480 struct nfs4_sequence_res seq_res;
481}; 478};
482 479
483/* 480/*
484 * Arguments to the read call. 481 * Arguments to the read call.
485 */ 482 */
486struct nfs_readargs { 483struct nfs_readargs {
484 struct nfs4_sequence_args seq_args;
487 struct nfs_fh * fh; 485 struct nfs_fh * fh;
488 struct nfs_open_context *context; 486 struct nfs_open_context *context;
489 struct nfs_lock_context *lock_context; 487 struct nfs_lock_context *lock_context;
@@ -491,20 +489,20 @@ struct nfs_readargs {
491 __u32 count; 489 __u32 count;
492 unsigned int pgbase; 490 unsigned int pgbase;
493 struct page ** pages; 491 struct page ** pages;
494 struct nfs4_sequence_args seq_args;
495}; 492};
496 493
497struct nfs_readres { 494struct nfs_readres {
495 struct nfs4_sequence_res seq_res;
498 struct nfs_fattr * fattr; 496 struct nfs_fattr * fattr;
499 __u32 count; 497 __u32 count;
500 int eof; 498 int eof;
501 struct nfs4_sequence_res seq_res;
502}; 499};
503 500
504/* 501/*
505 * Arguments to the write call. 502 * Arguments to the write call.
506 */ 503 */
507struct nfs_writeargs { 504struct nfs_writeargs {
505 struct nfs4_sequence_args seq_args;
508 struct nfs_fh * fh; 506 struct nfs_fh * fh;
509 struct nfs_open_context *context; 507 struct nfs_open_context *context;
510 struct nfs_lock_context *lock_context; 508 struct nfs_lock_context *lock_context;
@@ -514,7 +512,6 @@ struct nfs_writeargs {
514 unsigned int pgbase; 512 unsigned int pgbase;
515 struct page ** pages; 513 struct page ** pages;
516 const u32 * bitmask; 514 const u32 * bitmask;
517 struct nfs4_sequence_args seq_args;
518}; 515};
519 516
520struct nfs_write_verifier { 517struct nfs_write_verifier {
@@ -527,65 +524,65 @@ struct nfs_writeverf {
527}; 524};
528 525
529struct nfs_writeres { 526struct nfs_writeres {
527 struct nfs4_sequence_res seq_res;
530 struct nfs_fattr * fattr; 528 struct nfs_fattr * fattr;
531 struct nfs_writeverf * verf; 529 struct nfs_writeverf * verf;
532 __u32 count; 530 __u32 count;
533 const struct nfs_server *server; 531 const struct nfs_server *server;
534 struct nfs4_sequence_res seq_res;
535}; 532};
536 533
537/* 534/*
538 * Arguments to the commit call. 535 * Arguments to the commit call.
539 */ 536 */
540struct nfs_commitargs { 537struct nfs_commitargs {
538 struct nfs4_sequence_args seq_args;
541 struct nfs_fh *fh; 539 struct nfs_fh *fh;
542 __u64 offset; 540 __u64 offset;
543 __u32 count; 541 __u32 count;
544 const u32 *bitmask; 542 const u32 *bitmask;
545 struct nfs4_sequence_args seq_args;
546}; 543};
547 544
548struct nfs_commitres { 545struct nfs_commitres {
546 struct nfs4_sequence_res seq_res;
549 struct nfs_fattr *fattr; 547 struct nfs_fattr *fattr;
550 struct nfs_writeverf *verf; 548 struct nfs_writeverf *verf;
551 const struct nfs_server *server; 549 const struct nfs_server *server;
552 struct nfs4_sequence_res seq_res;
553}; 550};
554 551
555/* 552/*
556 * Common arguments to the unlink call 553 * Common arguments to the unlink call
557 */ 554 */
558struct nfs_removeargs { 555struct nfs_removeargs {
556 struct nfs4_sequence_args seq_args;
559 const struct nfs_fh *fh; 557 const struct nfs_fh *fh;
560 struct qstr name; 558 struct qstr name;
561 struct nfs4_sequence_args seq_args;
562}; 559};
563 560
564struct nfs_removeres { 561struct nfs_removeres {
562 struct nfs4_sequence_res seq_res;
565 const struct nfs_server *server; 563 const struct nfs_server *server;
566 struct nfs_fattr *dir_attr; 564 struct nfs_fattr *dir_attr;
567 struct nfs4_change_info cinfo; 565 struct nfs4_change_info cinfo;
568 struct nfs4_sequence_res seq_res;
569}; 566};
570 567
571/* 568/*
572 * Common arguments to the rename call 569 * Common arguments to the rename call
573 */ 570 */
574struct nfs_renameargs { 571struct nfs_renameargs {
572 struct nfs4_sequence_args seq_args;
575 const struct nfs_fh *old_dir; 573 const struct nfs_fh *old_dir;
576 const struct nfs_fh *new_dir; 574 const struct nfs_fh *new_dir;
577 const struct qstr *old_name; 575 const struct qstr *old_name;
578 const struct qstr *new_name; 576 const struct qstr *new_name;
579 struct nfs4_sequence_args seq_args;
580}; 577};
581 578
582struct nfs_renameres { 579struct nfs_renameres {
580 struct nfs4_sequence_res seq_res;
583 const struct nfs_server *server; 581 const struct nfs_server *server;
584 struct nfs4_change_info old_cinfo; 582 struct nfs4_change_info old_cinfo;
585 struct nfs_fattr *old_fattr; 583 struct nfs_fattr *old_fattr;
586 struct nfs4_change_info new_cinfo; 584 struct nfs4_change_info new_cinfo;
587 struct nfs_fattr *new_fattr; 585 struct nfs_fattr *new_fattr;
588 struct nfs4_sequence_res seq_res;
589}; 586};
590 587
591/* 588/*
@@ -626,20 +623,20 @@ struct nfs_createargs {
626}; 623};
627 624
628struct nfs_setattrargs { 625struct nfs_setattrargs {
626 struct nfs4_sequence_args seq_args;
629 struct nfs_fh * fh; 627 struct nfs_fh * fh;
630 nfs4_stateid stateid; 628 nfs4_stateid stateid;
631 struct iattr * iap; 629 struct iattr * iap;
632 const struct nfs_server * server; /* Needed for name mapping */ 630 const struct nfs_server * server; /* Needed for name mapping */
633 const u32 * bitmask; 631 const u32 * bitmask;
634 struct nfs4_sequence_args seq_args;
635}; 632};
636 633
637struct nfs_setaclargs { 634struct nfs_setaclargs {
635 struct nfs4_sequence_args seq_args;
638 struct nfs_fh * fh; 636 struct nfs_fh * fh;
639 size_t acl_len; 637 size_t acl_len;
640 unsigned int acl_pgbase; 638 unsigned int acl_pgbase;
641 struct page ** acl_pages; 639 struct page ** acl_pages;
642 struct nfs4_sequence_args seq_args;
643}; 640};
644 641
645struct nfs_setaclres { 642struct nfs_setaclres {
@@ -647,27 +644,27 @@ struct nfs_setaclres {
647}; 644};
648 645
649struct nfs_getaclargs { 646struct nfs_getaclargs {
647 struct nfs4_sequence_args seq_args;
650 struct nfs_fh * fh; 648 struct nfs_fh * fh;
651 size_t acl_len; 649 size_t acl_len;
652 unsigned int acl_pgbase; 650 unsigned int acl_pgbase;
653 struct page ** acl_pages; 651 struct page ** acl_pages;
654 struct nfs4_sequence_args seq_args;
655}; 652};
656 653
657/* getxattr ACL interface flags */ 654/* getxattr ACL interface flags */
658#define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */ 655#define NFS4_ACL_TRUNC 0x0001 /* ACL was truncated */
659struct nfs_getaclres { 656struct nfs_getaclres {
657 struct nfs4_sequence_res seq_res;
660 size_t acl_len; 658 size_t acl_len;
661 size_t acl_data_offset; 659 size_t acl_data_offset;
662 int acl_flags; 660 int acl_flags;
663 struct page * acl_scratch; 661 struct page * acl_scratch;
664 struct nfs4_sequence_res seq_res;
665}; 662};
666 663
667struct nfs_setattrres { 664struct nfs_setattrres {
665 struct nfs4_sequence_res seq_res;
668 struct nfs_fattr * fattr; 666 struct nfs_fattr * fattr;
669 const struct nfs_server * server; 667 const struct nfs_server * server;
670 struct nfs4_sequence_res seq_res;
671}; 668};
672 669
673struct nfs_linkargs { 670struct nfs_linkargs {
@@ -832,21 +829,22 @@ struct nfs3_getaclres {
832typedef u64 clientid4; 829typedef u64 clientid4;
833 830
834struct nfs4_accessargs { 831struct nfs4_accessargs {
832 struct nfs4_sequence_args seq_args;
835 const struct nfs_fh * fh; 833 const struct nfs_fh * fh;
836 const u32 * bitmask; 834 const u32 * bitmask;
837 u32 access; 835 u32 access;
838 struct nfs4_sequence_args seq_args;
839}; 836};
840 837
841struct nfs4_accessres { 838struct nfs4_accessres {
839 struct nfs4_sequence_res seq_res;
842 const struct nfs_server * server; 840 const struct nfs_server * server;
843 struct nfs_fattr * fattr; 841 struct nfs_fattr * fattr;
844 u32 supported; 842 u32 supported;
845 u32 access; 843 u32 access;
846 struct nfs4_sequence_res seq_res;
847}; 844};
848 845
849struct nfs4_create_arg { 846struct nfs4_create_arg {
847 struct nfs4_sequence_args seq_args;
850 u32 ftype; 848 u32 ftype;
851 union { 849 union {
852 struct { 850 struct {
@@ -863,88 +861,88 @@ struct nfs4_create_arg {
863 const struct iattr * attrs; 861 const struct iattr * attrs;
864 const struct nfs_fh * dir_fh; 862 const struct nfs_fh * dir_fh;
865 const u32 * bitmask; 863 const u32 * bitmask;
866 struct nfs4_sequence_args seq_args;
867}; 864};
868 865
869struct nfs4_create_res { 866struct nfs4_create_res {
867 struct nfs4_sequence_res seq_res;
870 const struct nfs_server * server; 868 const struct nfs_server * server;
871 struct nfs_fh * fh; 869 struct nfs_fh * fh;
872 struct nfs_fattr * fattr; 870 struct nfs_fattr * fattr;
873 struct nfs4_change_info dir_cinfo; 871 struct nfs4_change_info dir_cinfo;
874 struct nfs4_sequence_res seq_res;
875}; 872};
876 873
877struct nfs4_fsinfo_arg { 874struct nfs4_fsinfo_arg {
875 struct nfs4_sequence_args seq_args;
878 const struct nfs_fh * fh; 876 const struct nfs_fh * fh;
879 const u32 * bitmask; 877 const u32 * bitmask;
880 struct nfs4_sequence_args seq_args;
881}; 878};
882 879
883struct nfs4_fsinfo_res { 880struct nfs4_fsinfo_res {
884 struct nfs_fsinfo *fsinfo;
885 struct nfs4_sequence_res seq_res; 881 struct nfs4_sequence_res seq_res;
882 struct nfs_fsinfo *fsinfo;
886}; 883};
887 884
888struct nfs4_getattr_arg { 885struct nfs4_getattr_arg {
886 struct nfs4_sequence_args seq_args;
889 const struct nfs_fh * fh; 887 const struct nfs_fh * fh;
890 const u32 * bitmask; 888 const u32 * bitmask;
891 struct nfs4_sequence_args seq_args;
892}; 889};
893 890
894struct nfs4_getattr_res { 891struct nfs4_getattr_res {
892 struct nfs4_sequence_res seq_res;
895 const struct nfs_server * server; 893 const struct nfs_server * server;
896 struct nfs_fattr * fattr; 894 struct nfs_fattr * fattr;
897 struct nfs4_sequence_res seq_res;
898}; 895};
899 896
900struct nfs4_link_arg { 897struct nfs4_link_arg {
898 struct nfs4_sequence_args seq_args;
901 const struct nfs_fh * fh; 899 const struct nfs_fh * fh;
902 const struct nfs_fh * dir_fh; 900 const struct nfs_fh * dir_fh;
903 const struct qstr * name; 901 const struct qstr * name;
904 const u32 * bitmask; 902 const u32 * bitmask;
905 struct nfs4_sequence_args seq_args;
906}; 903};
907 904
908struct nfs4_link_res { 905struct nfs4_link_res {
906 struct nfs4_sequence_res seq_res;
909 const struct nfs_server * server; 907 const struct nfs_server * server;
910 struct nfs_fattr * fattr; 908 struct nfs_fattr * fattr;
911 struct nfs4_change_info cinfo; 909 struct nfs4_change_info cinfo;
912 struct nfs_fattr * dir_attr; 910 struct nfs_fattr * dir_attr;
913 struct nfs4_sequence_res seq_res;
914}; 911};
915 912
916 913
917struct nfs4_lookup_arg { 914struct nfs4_lookup_arg {
915 struct nfs4_sequence_args seq_args;
918 const struct nfs_fh * dir_fh; 916 const struct nfs_fh * dir_fh;
919 const struct qstr * name; 917 const struct qstr * name;
920 const u32 * bitmask; 918 const u32 * bitmask;
921 struct nfs4_sequence_args seq_args;
922}; 919};
923 920
924struct nfs4_lookup_res { 921struct nfs4_lookup_res {
922 struct nfs4_sequence_res seq_res;
925 const struct nfs_server * server; 923 const struct nfs_server * server;
926 struct nfs_fattr * fattr; 924 struct nfs_fattr * fattr;
927 struct nfs_fh * fh; 925 struct nfs_fh * fh;
928 struct nfs4_sequence_res seq_res;
929}; 926};
930 927
931struct nfs4_lookup_root_arg { 928struct nfs4_lookup_root_arg {
932 const u32 * bitmask;
933 struct nfs4_sequence_args seq_args; 929 struct nfs4_sequence_args seq_args;
930 const u32 * bitmask;
934}; 931};
935 932
936struct nfs4_pathconf_arg { 933struct nfs4_pathconf_arg {
934 struct nfs4_sequence_args seq_args;
937 const struct nfs_fh * fh; 935 const struct nfs_fh * fh;
938 const u32 * bitmask; 936 const u32 * bitmask;
939 struct nfs4_sequence_args seq_args;
940}; 937};
941 938
942struct nfs4_pathconf_res { 939struct nfs4_pathconf_res {
943 struct nfs_pathconf *pathconf;
944 struct nfs4_sequence_res seq_res; 940 struct nfs4_sequence_res seq_res;
941 struct nfs_pathconf *pathconf;
945}; 942};
946 943
947struct nfs4_readdir_arg { 944struct nfs4_readdir_arg {
945 struct nfs4_sequence_args seq_args;
948 const struct nfs_fh * fh; 946 const struct nfs_fh * fh;
949 u64 cookie; 947 u64 cookie;
950 nfs4_verifier verifier; 948 nfs4_verifier verifier;
@@ -953,21 +951,20 @@ struct nfs4_readdir_arg {
953 unsigned int pgbase; /* zero-copy data */ 951 unsigned int pgbase; /* zero-copy data */
954 const u32 * bitmask; 952 const u32 * bitmask;
955 int plus; 953 int plus;
956 struct nfs4_sequence_args seq_args;
957}; 954};
958 955
959struct nfs4_readdir_res { 956struct nfs4_readdir_res {
957 struct nfs4_sequence_res seq_res;
960 nfs4_verifier verifier; 958 nfs4_verifier verifier;
961 unsigned int pgbase; 959 unsigned int pgbase;
962 struct nfs4_sequence_res seq_res;
963}; 960};
964 961
965struct nfs4_readlink { 962struct nfs4_readlink {
963 struct nfs4_sequence_args seq_args;
966 const struct nfs_fh * fh; 964 const struct nfs_fh * fh;
967 unsigned int pgbase; 965 unsigned int pgbase;
968 unsigned int pglen; /* zero-copy data */ 966 unsigned int pglen; /* zero-copy data */
969 struct page ** pages; /* zero-copy data */ 967 struct page ** pages; /* zero-copy data */
970 struct nfs4_sequence_args seq_args;
971}; 968};
972 969
973struct nfs4_readlink_res { 970struct nfs4_readlink_res {
@@ -993,28 +990,28 @@ struct nfs4_setclientid_res {
993}; 990};
994 991
995struct nfs4_statfs_arg { 992struct nfs4_statfs_arg {
993 struct nfs4_sequence_args seq_args;
996 const struct nfs_fh * fh; 994 const struct nfs_fh * fh;
997 const u32 * bitmask; 995 const u32 * bitmask;
998 struct nfs4_sequence_args seq_args;
999}; 996};
1000 997
1001struct nfs4_statfs_res { 998struct nfs4_statfs_res {
1002 struct nfs_fsstat *fsstat;
1003 struct nfs4_sequence_res seq_res; 999 struct nfs4_sequence_res seq_res;
1000 struct nfs_fsstat *fsstat;
1004}; 1001};
1005 1002
1006struct nfs4_server_caps_arg { 1003struct nfs4_server_caps_arg {
1007 struct nfs_fh *fhandle;
1008 struct nfs4_sequence_args seq_args; 1004 struct nfs4_sequence_args seq_args;
1005 struct nfs_fh *fhandle;
1009}; 1006};
1010 1007
1011struct nfs4_server_caps_res { 1008struct nfs4_server_caps_res {
1009 struct nfs4_sequence_res seq_res;
1012 u32 attr_bitmask[3]; 1010 u32 attr_bitmask[3];
1013 u32 acl_bitmask; 1011 u32 acl_bitmask;
1014 u32 has_links; 1012 u32 has_links;
1015 u32 has_symlinks; 1013 u32 has_symlinks;
1016 u32 fh_expire_type; 1014 u32 fh_expire_type;
1017 struct nfs4_sequence_res seq_res;
1018}; 1015};
1019 1016
1020#define NFS4_PATHNAME_MAXCOMPONENTS 512 1017#define NFS4_PATHNAME_MAXCOMPONENTS 512
@@ -1040,16 +1037,16 @@ struct nfs4_fs_locations {
1040}; 1037};
1041 1038
1042struct nfs4_fs_locations_arg { 1039struct nfs4_fs_locations_arg {
1040 struct nfs4_sequence_args seq_args;
1043 const struct nfs_fh *dir_fh; 1041 const struct nfs_fh *dir_fh;
1044 const struct qstr *name; 1042 const struct qstr *name;
1045 struct page *page; 1043 struct page *page;
1046 const u32 *bitmask; 1044 const u32 *bitmask;
1047 struct nfs4_sequence_args seq_args;
1048}; 1045};
1049 1046
1050struct nfs4_fs_locations_res { 1047struct nfs4_fs_locations_res {
1051 struct nfs4_fs_locations *fs_locations;
1052 struct nfs4_sequence_res seq_res; 1048 struct nfs4_sequence_res seq_res;
1049 struct nfs4_fs_locations *fs_locations;
1053}; 1050};
1054 1051
1055struct nfs4_secinfo_oid { 1052struct nfs4_secinfo_oid {
@@ -1074,14 +1071,14 @@ struct nfs4_secinfo_flavors {
1074}; 1071};
1075 1072
1076struct nfs4_secinfo_arg { 1073struct nfs4_secinfo_arg {
1074 struct nfs4_sequence_args seq_args;
1077 const struct nfs_fh *dir_fh; 1075 const struct nfs_fh *dir_fh;
1078 const struct qstr *name; 1076 const struct qstr *name;
1079 struct nfs4_sequence_args seq_args;
1080}; 1077};
1081 1078
1082struct nfs4_secinfo_res { 1079struct nfs4_secinfo_res {
1083 struct nfs4_secinfo_flavors *flavors;
1084 struct nfs4_sequence_res seq_res; 1080 struct nfs4_sequence_res seq_res;
1081 struct nfs4_secinfo_flavors *flavors;
1085}; 1082};
1086 1083
1087#endif /* CONFIG_NFS_V4 */ 1084#endif /* CONFIG_NFS_V4 */
@@ -1161,9 +1158,9 @@ struct nfs41_create_session_res {
1161}; 1158};
1162 1159
1163struct nfs41_reclaim_complete_args { 1160struct nfs41_reclaim_complete_args {
1161 struct nfs4_sequence_args seq_args;
1164 /* In the future extend to include curr_fh for use with migration */ 1162 /* In the future extend to include curr_fh for use with migration */
1165 unsigned char one_fs:1; 1163 unsigned char one_fs:1;
1166 struct nfs4_sequence_args seq_args;
1167}; 1164};
1168 1165
1169struct nfs41_reclaim_complete_res { 1166struct nfs41_reclaim_complete_res {
@@ -1173,28 +1170,28 @@ struct nfs41_reclaim_complete_res {
1173#define SECINFO_STYLE_CURRENT_FH 0 1170#define SECINFO_STYLE_CURRENT_FH 0
1174#define SECINFO_STYLE_PARENT 1 1171#define SECINFO_STYLE_PARENT 1
1175struct nfs41_secinfo_no_name_args { 1172struct nfs41_secinfo_no_name_args {
1176 int style;
1177 struct nfs4_sequence_args seq_args; 1173 struct nfs4_sequence_args seq_args;
1174 int style;
1178}; 1175};
1179 1176
1180struct nfs41_test_stateid_args { 1177struct nfs41_test_stateid_args {
1181 nfs4_stateid *stateid;
1182 struct nfs4_sequence_args seq_args; 1178 struct nfs4_sequence_args seq_args;
1179 nfs4_stateid *stateid;
1183}; 1180};
1184 1181
1185struct nfs41_test_stateid_res { 1182struct nfs41_test_stateid_res {
1186 unsigned int status;
1187 struct nfs4_sequence_res seq_res; 1183 struct nfs4_sequence_res seq_res;
1184 unsigned int status;
1188}; 1185};
1189 1186
1190struct nfs41_free_stateid_args { 1187struct nfs41_free_stateid_args {
1191 nfs4_stateid *stateid;
1192 struct nfs4_sequence_args seq_args; 1188 struct nfs4_sequence_args seq_args;
1189 nfs4_stateid *stateid;
1193}; 1190};
1194 1191
1195struct nfs41_free_stateid_res { 1192struct nfs41_free_stateid_res {
1196 unsigned int status;
1197 struct nfs4_sequence_res seq_res; 1193 struct nfs4_sequence_res seq_res;
1194 unsigned int status;
1198}; 1195};
1199 1196
1200#else 1197#else
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index dc0c3cc3ada3..b64f8eb0b973 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -192,7 +192,6 @@ struct rpc_wait_queue {
192 pid_t owner; /* process id of last task serviced */ 192 pid_t owner; /* process id of last task serviced */
193 unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */ 193 unsigned char maxpriority; /* maximum priority (0 if queue is not a priority queue) */
194 unsigned char priority; /* current priority */ 194 unsigned char priority; /* current priority */
195 unsigned char count; /* # task groups remaining serviced so far */
196 unsigned char nr; /* # tasks remaining for cookie */ 195 unsigned char nr; /* # tasks remaining for cookie */
197 unsigned short qlen; /* total # tasks waiting in queue */ 196 unsigned short qlen; /* total # tasks waiting in queue */
198 struct rpc_timer timer_list; 197 struct rpc_timer timer_list;