Whamcloud - gitweb
LU-13437 lmv: check stripe FID sanity
[fs/lustre-release.git] / lustre / kernel_patches / patches / blkdev_tunables-3.9-sles12sp3.patch
1 Index: linux-4.4.59-1/block/blk-settings.c
2 ===================================================================
3 --- linux-4.4.59-1.orig/block/blk-settings.c
4 +++ linux-4.4.59-1/block/blk-settings.c
5 @@ -20,6 +20,12 @@ EXPORT_SYMBOL(blk_max_low_pfn);
6  
7  unsigned long blk_max_pfn;
8  
9 +int default_max_sectors = BLK_DEF_MAX_SECTORS;
10 +module_param(default_max_sectors, int, 0);
11 +
12 +int default_max_segments = BLK_MAX_SEGMENTS;
13 +module_param(default_max_segments, int, 0);
14 +
15  /**
16   * blk_queue_prep_rq - set a prepare_request function for queue
17   * @q:         queue
18 @@ -87,7 +93,7 @@ EXPORT_SYMBOL_GPL(blk_queue_lld_busy);
19   */
20  void blk_set_default_limits(struct queue_limits *lim)
21  {
22 -       lim->max_segments = BLK_MAX_SEGMENTS;
23 +       lim->max_segments = default_max_segments;
24         lim->max_integrity_segments = 0;
25         lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
26         lim->virt_boundary_mask = 0;
27 @@ -251,7 +257,7 @@ void blk_queue_max_hw_sectors(struct req
28  
29         limits->max_hw_sectors = max_hw_sectors;
30         max_sectors = min_not_zero(max_hw_sectors, limits->max_dev_sectors);
31 -       max_sectors = min_t(unsigned int, max_sectors, BLK_DEF_MAX_SECTORS);
32 +       max_sectors = min_t(unsigned int, max_sectors, default_max_sectors);
33         limits->max_sectors = max_sectors;
34         q->backing_dev_info->io_pages = max_sectors >> (PAGE_SHIFT - 9);
35  }
36 Index: linux-4.4.59-1/drivers/scsi/Kconfig
37 ===================================================================
38 --- linux-4.4.59-1.orig/drivers/scsi/Kconfig
39 +++ linux-4.4.59-1/drivers/scsi/Kconfig
40 @@ -236,6 +236,24 @@ config SCSI_LOGGING
41           there should be no noticeable performance impact as long as you have
42           logging turned off.
43  
44 +config SCSI_MAX_SG_SEGMENTS
45 +       int "Maximum SCSI scatter gather segment size"
46 +       range 32 256 
47 +       default "128"
48 +       depends on SCSI
49 +       help
50 +         Control the maximum limit for scatter gather buffers for the
51 +         SCSI device.
52 +
53 +config SCSI_MAX_SG_SEGMENTS
54 +       int "Maximum SCSI scatter gather segment size"
55 +       range 32 256 
56 +       default "128"
57 +       depends on SCSI
58 +       help
59 +         Control the maximum limit for scatter gather buffers for the
60 +         SCSI device.
61 +
62  config SCSI_SCAN_ASYNC
63         bool "Asynchronous SCSI scanning"
64         depends on SCSI
65 Index: linux-4.4.59-1/drivers/message/fusion/Kconfig
66 ===================================================================
67 --- linux-4.4.59-1.orig/drivers/message/fusion/Kconfig
68 +++ linux-4.4.59-1/drivers/message/fusion/Kconfig
69 @@ -61,9 +61,9 @@ config FUSION_SAS
70           LSISAS1078
71  
72  config FUSION_MAX_SGE
73 -       int "Maximum number of scatter gather entries (16 - 128)"
74 -       default "128"
75 -       range 16 128
76 +       int "Maximum number of scatter gather entries (16 - 256)"
77 +       default "256"
78 +       range 16 256
79         help
80           This option allows you to specify the maximum number of scatter-
81           gather entries per I/O. The driver default is 128, which matches
82 Index: linux-4.4.59-1/drivers/message/fusion/mptbase.h
83 ===================================================================
84 --- linux-4.4.59-1.orig/drivers/message/fusion/mptbase.h
85 +++ linux-4.4.59-1/drivers/message/fusion/mptbase.h
86 @@ -166,10 +166,10 @@
87   * Set the MAX_SGE value based on user input.
88   */
89  #ifdef CONFIG_FUSION_MAX_SGE
90 -#if CONFIG_FUSION_MAX_SGE  < 16
91 +#if CONFIG_FUSION_MAX_SGE < 16
92  #define MPT_SCSI_SG_DEPTH      16
93 -#elif CONFIG_FUSION_MAX_SGE  > 128
94 -#define MPT_SCSI_SG_DEPTH      128
95 +#elif CONFIG_FUSION_MAX_SGE > 256
96 +#define MPT_SCSI_SG_DEPTH      256
97  #else
98  #define MPT_SCSI_SG_DEPTH      CONFIG_FUSION_MAX_SGE
99  #endif