block: set default max_sectors to 16K
Ajay Gupta [Wed, 29 Apr 2015 22:45:15 +0000 (15:45 -0700)]
Needed for USB flash driver read/write performance

Bug 1637247

Change-Id: I75d3507a28d3ad8016424031e5c101265dfba306
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: http://git-master/r/743378
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

block/blk-settings.c
include/linux/blkdev.h

index ec00a0f..38131c4 100644 (file)
@@ -112,7 +112,7 @@ void blk_set_default_limits(struct queue_limits *lim)
        lim->max_integrity_segments = 0;
        lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
        lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
-       lim->max_sectors = lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;
+       lim->max_sectors = lim->max_hw_sectors = BLK_DEF_MAX_SECTORS;
        lim->max_write_same_sectors = 0;
        lim->max_discard_sectors = 0;
        lim->discard_granularity = 0;
index 494d228..ade11f3 100644 (file)
@@ -1094,7 +1094,7 @@ extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
 enum blk_default_limits {
        BLK_MAX_SEGMENTS        = 128,
        BLK_SAFE_MAX_SECTORS    = 255,
-       BLK_DEF_MAX_SECTORS     = 1024,
+       BLK_DEF_MAX_SECTORS     = 16384,
        BLK_MAX_SEGMENT_SIZE    = 65536,
        BLK_SEG_BOUNDARY_MASK   = 0xFFFFFFFFUL,
 };