direct.c (71e8cc00c63e8518ce86b4079355fc9086a4869d) | direct.c (3e9e0ca3f19e911ce13c2e6c9858fcb41a37496c) |
---|---|
1/* 2 * linux/fs/nfs/direct.c 3 * 4 * Copyright (C) 2003 by Chuck Lever <cel@netapp.com> 5 * 6 * High-performance uncached I/O for the Linux NFS client 7 * 8 * There are important applications whose performance or correctness --- 278 unchanged lines hidden (view full) --- 287 } 288 } 289out_put: 290 if (put_dreq(dreq)) 291 nfs_direct_complete(dreq); 292 hdr->release(hdr); 293} 294 | 1/* 2 * linux/fs/nfs/direct.c 3 * 4 * Copyright (C) 2003 by Chuck Lever <cel@netapp.com> 5 * 6 * High-performance uncached I/O for the Linux NFS client 7 * 8 * There are important applications whose performance or correctness --- 278 unchanged lines hidden (view full) --- 287 } 288 } 289out_put: 290 if (put_dreq(dreq)) 291 nfs_direct_complete(dreq); 292 hdr->release(hdr); 293} 294 |
295static void nfs_sync_pgio_error(struct list_head *head) | 295static void nfs_read_sync_pgio_error(struct list_head *head) |
296{ 297 struct nfs_page *req; 298 299 while (!list_empty(head)) { 300 req = nfs_list_entry(head->next); 301 nfs_list_remove_request(req); 302 nfs_release_request(req); 303 } 304} 305 306static void nfs_direct_pgio_init(struct nfs_pgio_header *hdr) 307{ 308 get_dreq(hdr->dreq); 309} 310 311static const struct nfs_pgio_completion_ops nfs_direct_read_completion_ops = { | 296{ 297 struct nfs_page *req; 298 299 while (!list_empty(head)) { 300 req = nfs_list_entry(head->next); 301 nfs_list_remove_request(req); 302 nfs_release_request(req); 303 } 304} 305 306static void nfs_direct_pgio_init(struct nfs_pgio_header *hdr) 307{ 308 get_dreq(hdr->dreq); 309} 310 311static const struct nfs_pgio_completion_ops nfs_direct_read_completion_ops = { |
312 .error_cleanup = nfs_sync_pgio_error, | 312 .error_cleanup = nfs_read_sync_pgio_error, |
313 .init_hdr = nfs_direct_pgio_init, 314 .completion = nfs_direct_read_completion, 315}; 316 317/* 318 * For each rsize'd chunk of the user's buffer, dispatch an NFS READ 319 * operation. If nfs_readdata_alloc() or get_user_pages() fails, 320 * bail and stop sending more reads. Read length accounting is --- 449 unchanged lines hidden (view full) --- 770 } 771 772out_put: 773 if (put_dreq(dreq)) 774 nfs_direct_write_complete(dreq, hdr->inode); 775 hdr->release(hdr); 776} 777 | 313 .init_hdr = nfs_direct_pgio_init, 314 .completion = nfs_direct_read_completion, 315}; 316 317/* 318 * For each rsize'd chunk of the user's buffer, dispatch an NFS READ 319 * operation. If nfs_readdata_alloc() or get_user_pages() fails, 320 * bail and stop sending more reads. Read length accounting is --- 449 unchanged lines hidden (view full) --- 770 } 771 772out_put: 773 if (put_dreq(dreq)) 774 nfs_direct_write_complete(dreq, hdr->inode); 775 hdr->release(hdr); 776} 777 |
778static void nfs_write_sync_pgio_error(struct list_head *head) 779{ 780 struct nfs_page *req; 781 782 while (!list_empty(head)) { 783 req = nfs_list_entry(head->next); 784 nfs_list_remove_request(req); 785 nfs_release_request(req); 786 nfs_unlock_request(req); 787 } 788} 789 |
|
778static const struct nfs_pgio_completion_ops nfs_direct_write_completion_ops = { | 790static const struct nfs_pgio_completion_ops nfs_direct_write_completion_ops = { |
779 .error_cleanup = nfs_sync_pgio_error, | 791 .error_cleanup = nfs_write_sync_pgio_error, |
780 .init_hdr = nfs_direct_pgio_init, 781 .completion = nfs_direct_write_completion, 782}; 783 784static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq, 785 const struct iovec *iov, 786 unsigned long nr_segs, 787 loff_t pos) --- 215 unchanged lines hidden --- | 792 .init_hdr = nfs_direct_pgio_init, 793 .completion = nfs_direct_write_completion, 794}; 795 796static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq, 797 const struct iovec *iov, 798 unsigned long nr_segs, 799 loff_t pos) --- 215 unchanged lines hidden --- |