diff options
Diffstat (limited to 'fs/cifs/cifsfs.c')
| -rw-r--r-- | fs/cifs/cifsfs.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index d9f652a522a6..a8323f1dc1c4 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
| @@ -77,7 +77,11 @@ unsigned int cifs_max_pending = CIFS_MAX_REQ; | |||
| 77 | module_param(cifs_max_pending, int, 0); | 77 | module_param(cifs_max_pending, int, 0); |
| 78 | MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " | 78 | MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " |
| 79 | "Default: 50 Range: 2 to 256"); | 79 | "Default: 50 Range: 2 to 256"); |
| 80 | 80 | unsigned short echo_retries = 5; | |
| 81 | module_param(echo_retries, ushort, 0644); | ||
| 82 | MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and " | ||
| 83 | "reconnecting server. Default: 5. 0 means " | ||
| 84 | "never reconnect."); | ||
| 81 | extern mempool_t *cifs_sm_req_poolp; | 85 | extern mempool_t *cifs_sm_req_poolp; |
| 82 | extern mempool_t *cifs_req_poolp; | 86 | extern mempool_t *cifs_req_poolp; |
| 83 | extern mempool_t *cifs_mid_poolp; | 87 | extern mempool_t *cifs_mid_poolp; |
| @@ -729,6 +733,25 @@ const struct file_operations cifs_file_ops = { | |||
| 729 | .setlease = cifs_setlease, | 733 | .setlease = cifs_setlease, |
| 730 | }; | 734 | }; |
| 731 | 735 | ||
| 736 | const struct file_operations cifs_file_strict_ops = { | ||
| 737 | .read = do_sync_read, | ||
| 738 | .write = do_sync_write, | ||
| 739 | .aio_read = cifs_strict_readv, | ||
| 740 | .aio_write = cifs_file_aio_write, | ||
| 741 | .open = cifs_open, | ||
| 742 | .release = cifs_close, | ||
| 743 | .lock = cifs_lock, | ||
| 744 | .fsync = cifs_strict_fsync, | ||
| 745 | .flush = cifs_flush, | ||
| 746 | .mmap = cifs_file_strict_mmap, | ||
| 747 | .splice_read = generic_file_splice_read, | ||
| 748 | .llseek = cifs_llseek, | ||
| 749 | #ifdef CONFIG_CIFS_POSIX | ||
| 750 | .unlocked_ioctl = cifs_ioctl, | ||
| 751 | #endif /* CONFIG_CIFS_POSIX */ | ||
| 752 | .setlease = cifs_setlease, | ||
| 753 | }; | ||
| 754 | |||
| 732 | const struct file_operations cifs_file_direct_ops = { | 755 | const struct file_operations cifs_file_direct_ops = { |
| 733 | /* no aio, no readv - | 756 | /* no aio, no readv - |
| 734 | BB reevaluate whether they can be done with directio, no cache */ | 757 | BB reevaluate whether they can be done with directio, no cache */ |
| @@ -747,6 +770,7 @@ const struct file_operations cifs_file_direct_ops = { | |||
| 747 | .llseek = cifs_llseek, | 770 | .llseek = cifs_llseek, |
| 748 | .setlease = cifs_setlease, | 771 | .setlease = cifs_setlease, |
| 749 | }; | 772 | }; |
| 773 | |||
| 750 | const struct file_operations cifs_file_nobrl_ops = { | 774 | const struct file_operations cifs_file_nobrl_ops = { |
| 751 | .read = do_sync_read, | 775 | .read = do_sync_read, |
| 752 | .write = do_sync_write, | 776 | .write = do_sync_write, |
| @@ -765,6 +789,24 @@ const struct file_operations cifs_file_nobrl_ops = { | |||
| 765 | .setlease = cifs_setlease, | 789 | .setlease = cifs_setlease, |
| 766 | }; | 790 | }; |
| 767 | 791 | ||
| 792 | const struct file_operations cifs_file_strict_nobrl_ops = { | ||
| 793 | .read = do_sync_read, | ||
| 794 | .write = do_sync_write, | ||
| 795 | .aio_read = cifs_strict_readv, | ||
| 796 | .aio_write = cifs_file_aio_write, | ||
| 797 | .open = cifs_open, | ||
| 798 | .release = cifs_close, | ||
| 799 | .fsync = cifs_strict_fsync, | ||
| 800 | .flush = cifs_flush, | ||
| 801 | .mmap = cifs_file_strict_mmap, | ||
| 802 | .splice_read = generic_file_splice_read, | ||
| 803 | .llseek = cifs_llseek, | ||
| 804 | #ifdef CONFIG_CIFS_POSIX | ||
| 805 | .unlocked_ioctl = cifs_ioctl, | ||
| 806 | #endif /* CONFIG_CIFS_POSIX */ | ||
| 807 | .setlease = cifs_setlease, | ||
| 808 | }; | ||
| 809 | |||
| 768 | const struct file_operations cifs_file_direct_nobrl_ops = { | 810 | const struct file_operations cifs_file_direct_nobrl_ops = { |
| 769 | /* no mmap, no aio, no readv - | 811 | /* no mmap, no aio, no readv - |
| 770 | BB reevaluate whether they can be done with directio, no cache */ | 812 | BB reevaluate whether they can be done with directio, no cache */ |
