linux/block/blk-settings.c
<<
>>
Prefs
   1/*
   2 * Functions related to setting various queue properties from drivers
   3 */
   4#include <linux/kernel.h>
   5#include <linux/module.h>
   6#include <linux/init.h>
   7#include <linux/bio.h>
   8#include <linux/blkdev.h>
   9#include <linux/bootmem.h>      /* for max_pfn/max_low_pfn */
  10#include <linux/gcd.h>
  11#include <linux/lcm.h>
  12#include <linux/jiffies.h>
  13#include <linux/gfp.h>
  14
  15#include "blk.h"
  16
  17unsigned long blk_max_low_pfn;
  18EXPORT_SYMBOL(blk_max_low_pfn);
  19
  20unsigned long blk_max_pfn;
  21
  22/**
  23 * blk_queue_prep_rq - set a prepare_request function for queue
  24 * @q:          queue
  25 * @pfn:        prepare_request function
  26 *
  27 * It's possible for a queue to register a prepare_request callback which
  28 * is invoked before the request is handed to the request_fn. The goal of
  29 * the function is to prepare a request for I/O, it can be used to build a
  30 * cdb from the request data for instance.
  31 *
  32 */
  33void blk_queue_prep_rq(struct request_queue *q, prep_rq_fn *pfn)
  34{
  35        q->prep_rq_fn = pfn;
  36}
  37EXPORT_SYMBOL(blk_queue_prep_rq);
  38
  39/**
  40 * blk_queue_unprep_rq - set an unprepare_request function for queue
  41 * @q:          queue
  42 * @ufn:        unprepare_request function
  43 *
  44 * It's possible for a queue to register an unprepare_request callback
  45 * which is invoked before the request is finally completed. The goal
  46 * of the function is to deallocate any data that was allocated in the
  47 * prepare_request callback.
  48 *
  49 */
  50void blk_queue_unprep_rq(struct request_queue *q, unprep_rq_fn *ufn)
  51{
  52        q->unprep_rq_fn = ufn;
  53}
  54EXPORT_SYMBOL(blk_queue_unprep_rq);
  55
  56/**
  57 * blk_queue_merge_bvec - set a merge_bvec function for queue
  58 * @q:          queue
  59 * @mbfn:       merge_bvec_fn
  60 *
  61 * Usually queues have static limitations on the max sectors or segments that
  62 * we can put in a request. Stacking drivers may have some settings that
  63 * are dynamic, and thus we have to query the queue whether it is ok to
  64 * add a new bio_vec to a bio at a given offset or not. If the block device
  65 * has such limitations, it needs to register a merge_bvec_fn to control
  66 * the size of bio's sent to it. Note that a block device *must* allow a
  67 * single page to be added to an empty bio. The block device driver may want
  68 * to use the bio_split() function to deal with these bio's. By default
  69 * no merge_bvec_fn is defined for a queue, and only the fixed limits are
  70 * honored.
  71 */
  72void blk_queue_merge_bvec(struct request_queue *q, merge_bvec_fn *mbfn)
  73{
  74        q->merge_bvec_fn = mbfn;
  75}
  76EXPORT_SYMBOL(blk_queue_merge_bvec);
  77
  78void blk_queue_softirq_done(struct request_queue *q, softirq_done_fn *fn)
  79{
  80        q->softirq_done_fn = fn;
  81}
  82EXPORT_SYMBOL(blk_queue_softirq_done);
  83
  84void blk_queue_rq_timeout(struct request_queue *q, unsigned int timeout)
  85{
  86        q->rq_timeout = timeout;
  87}
  88EXPORT_SYMBOL_GPL(blk_queue_rq_timeout);
  89
  90void blk_queue_rq_timed_out(struct request_queue *q, rq_timed_out_fn *fn)
  91{
  92        q->rq_timed_out_fn = fn;
  93}
  94EXPORT_SYMBOL_GPL(blk_queue_rq_timed_out);
  95
  96void blk_queue_lld_busy(struct request_queue *q, lld_busy_fn *fn)
  97{
  98        q->lld_busy_fn = fn;
  99}
 100EXPORT_SYMBOL_GPL(blk_queue_lld_busy);
 101
 102/**
 103 * blk_set_default_limits - reset limits to default values
 104 * @lim:  the queue_limits structure to reset
 105 *
 106 * Description:
 107 *   Returns a queue_limit struct to its default state.
 108 */
 109void blk_set_default_limits(struct queue_limits *lim)
 110{
 111        lim->max_segments = BLK_MAX_SEGMENTS;
 112        lim->max_integrity_segments = 0;
 113        lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
 114        lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
 115        lim->max_sectors = lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;
 116        lim->max_write_same_sectors = 0;
 117        lim->max_discard_sectors = 0;
 118        lim->discard_granularity = 0;
 119        lim->discard_alignment = 0;
 120        lim->discard_misaligned = 0;
 121        lim->discard_zeroes_data = 0;
 122        lim->logical_block_size = lim->physical_block_size = lim->io_min = 512;
 123        lim->bounce_pfn = (unsigned long)(BLK_BOUNCE_ANY >> PAGE_SHIFT);
 124        lim->alignment_offset = 0;
 125        lim->io_opt = 0;
 126        lim->misaligned = 0;
 127        lim->cluster = 1;
 128}
 129EXPORT_SYMBOL(blk_set_default_limits);
 130
 131/**
 132 * blk_set_stacking_limits - set default limits for stacking devices
 133 * @lim:  the queue_limits structure to reset
 134 *
 135 * Description:
 136 *   Returns a queue_limit struct to its default state. Should be used
 137 *   by stacking drivers like DM that have no internal limits.
 138 */
 139void blk_set_stacking_limits(struct queue_limits *lim)
 140{
 141        blk_set_default_limits(lim);
 142
 143        /* Inherit limits from component devices */
 144        lim->discard_zeroes_data = 1;
 145        lim->max_segments = USHRT_MAX;
 146        lim->max_hw_sectors = UINT_MAX;
 147        lim->max_sectors = UINT_MAX;
 148        lim->max_write_same_sectors = UINT_MAX;
 149}
 150EXPORT_SYMBOL(blk_set_stacking_limits);
 151
 152/**
 153 * blk_queue_make_request - define an alternate make_request function for a device
 154 * @q:  the request queue for the device to be affected
 155 * @mfn: the alternate make_request function
 156 *
 157 * Description:
 158 *    The normal way for &struct bios to be passed to a device
 159 *    driver is for them to be collected into requests on a request
 160 *    queue, and then to allow the device driver to select requests
 161 *    off that queue when it is ready.  This works well for many block
 162 *    devices. However some block devices (typically virtual devices
 163 *    such as md or lvm) do not benefit from the processing on the
 164 *    request queue, and are served best by having the requests passed
 165 *    directly to them.  This can be achieved by providing a function
 166 *    to blk_queue_make_request().
 167 *
 168 * Caveat:
 169 *    The driver that does this *must* be able to deal appropriately
 170 *    with buffers in "highmemory". This can be accomplished by either calling
 171 *    __bio_kmap_atomic() to get a temporary kernel mapping, or by calling
 172 *    blk_queue_bounce() to create a buffer in normal memory.
 173 **/
 174void blk_queue_make_request(struct request_queue *q, make_request_fn *mfn)
 175{
 176        /*
 177         * set defaults
 178         */
 179        q->nr_requests = BLKDEV_MAX_RQ;
 180
 181        q->make_request_fn = mfn;
 182        blk_queue_dma_alignment(q, 511);
 183        blk_queue_congestion_threshold(q);
 184        q->nr_batching = BLK_BATCH_REQ;
 185
 186        blk_set_default_limits(&q->limits);
 187
 188        /*
 189         * by default assume old behaviour and bounce for any highmem page
 190         */
 191        blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
 192}
 193EXPORT_SYMBOL(blk_queue_make_request);
 194
 195/**
 196 * blk_queue_bounce_limit - set bounce buffer limit for queue
 197 * @q: the request queue for the device
 198 * @dma_mask: the maximum address the device can handle
 199 *
 200 * Description:
 201 *    Different hardware can have different requirements as to what pages
 202 *    it can do I/O directly to. A low level driver can call
 203 *    blk_queue_bounce_limit to have lower memory pages allocated as bounce
 204 *    buffers for doing I/O to pages residing above @dma_mask.
 205 **/
 206void blk_queue_bounce_limit(struct request_queue *q, u64 dma_mask)
 207{
 208        unsigned long b_pfn = dma_mask >> PAGE_SHIFT;
 209        int dma = 0;
 210
 211        q->bounce_gfp = GFP_NOIO;
 212#if Br=4g)( 213        /*
 214         * Assume anything <= 4GB can be handled by IOMMU.  Actually
 215         * some IOMMUs can handle everything, but I don't know of a
 216         * way to test this here.
 217         */
 218        if (b_pfn < (min_t(u64, 0xffffffffUL, BLK_BOUNCE_HIGH) >> PAGE_SHIFT))
 219                dma = 1;
 220        q->limits.bounce_pfn = max(max_low_pfn, b_pfn);
 221#else
 222        if (b_pfn < blk_max_low_pfn)
 223                dma = 1;
 224        q->limits.bounce_pfn = b_pfn;
 225#endif
 226        if (dma) {
 227                init_emergency_isa_pool();
 228                q->bounce_gfp = GFP_NOIO | GFP_DMA;
 229                q->limits.bounce_pfn = b_pfn;
 230        }
 231}
 232EXPORT_SYMBOL(blk_queue_bounce_limit);
 233
 234/**
 235 * blk_limits_max_hw_sectors - set hard and soft limit of max sectors for request
 236 * @limits: the queue limits
 237 * @max_hw_sectors:  max hardware sectors in the usual 512b unit
 238 *
 239 * Description:
 240 *    Enables a low level driver to set a hard upper limit,
 241 *    max_hw_sectors, on the size of requests.  max_hw_sectors is set by
 242 *    the device driver based upon the combined capabilities of I/O
 243 *    controller and storage device.
 244 *
 245 *    max_sectors is a soft limit imposed by the block layer for
 246 *    filesystem type requests.  This value can be overridden on a
 247 *    per-device basis in /sys/block/<device>/queue/max_sectors_kb.
 248 *    The soft limit can not exceed max_hw_sectors.
 249 **/
 250void blk_limits_max_hw_sectors(struct queue_limits *limits, unsigned int max_hw_sectors)
 251{
 252        if ((max_hw_sectors << 9) < PAGE_CACHE_SIZE) {
 253                max_hw_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
 254                printk(KERN_INFO "%s: set to minimum %d\n",
 255                       __func__, max_hw_sectors);
 256        }
 257
 258        limits->max_hw_sectors = max_hw_sectors;
 259        limits->max_sectors = min_t(unsigned int, max_hw_sectors,
 260                                    BLK_DEF_MAX_SECTORS);
 261}
 262EXPORT_SYMBOL(blk_limits_max_hw_sectors);
 263
 264/**
 265 * blk_queue_max_hw_sectors - set max sectors for a request for this queue
 266 * @q:  the request queue for the device
 267 * @max_hw_sectors:  max hardware sectors in the usual 512b unit
 268 *
 269 * Description:
 270 *    See description for blk_limits_max_hw_sectors().
 271 **/
 272void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int max_hw_sectors)
 273{
 274        blk_limits_max_hw_sectors(&q->limits, max_hw_sectors);
 275}
 276EXPORT_SYMBOL(blk_queue_max_hw_sectors);
 277
 278/**
 279 * blk_queue_max_discard_sectors - set max sectors for a single discard
 280 * @q:  the request queue for the device
 281 * @max_discard_sectors: maximum number of sectors to discard
 282 **/
 283void blk_queue_max_discard_sectors(struct request_queue *q,
 284                unsigned int max_discard_sectors)
 285{
 286        q->limits.max_discard_sectors = max_discard_sectors;
 287}
 288EXPORT_SYMBOL(blk_queue_max_discard_sectors);
 289
 290/**
 291 * blk_queue_max_write_same_sectors - set max sectors for a single write same
 292 * @q:  the request queue for the device
 293 * @max_write_same_sectors: maximum number of sectors to write per command
 294 **/
 295void blk_queue_max_write_same_sectors(struct request_queue *q,
 296                                      unsigned int max_write_same_sectors)
 297{
 298        q->limits.max_write_same_sectors = max_write_same_sectors;
 299}
 300EXPORT_SYMBOL(blk_queue_max_write_same_sectors);
 301
 302/**
 303 * blk_queue_max_segments - set max hw segments for a request for this queue
 304 * @q:  the request queue for the device
 305 * @max_segments:  max number of segments
 306 *
 307 * Description:
 308 *    Enables a low level driver to set an upper limit on the number of
 309 *    hw data segments in a request.
 310 **/
 311void blk_queue_max_segments(struct request_queue *q, unsigned short max_segments>)
 312{
 313        if (!max_segments> {
 314                max_segments = 1;
 315                printk(KERN_INFO "%s: set to minimum %d\n",
 316                       __func__, max_segments>;
 317        }
 318
 319        q->limits.max_segments = max_segments;
 320}
 321EXPORT_SYMBOL(blk_queue_max_segments>;
 322
 323/**
 324 * blk_queue_max_segment_size - set max segment size for blk_rq_map_sg
 325 * @q:  the request queue for the device
 326 * @max_size:  max size of segment in bytes
 327 *
 328 * Description:
 329 *    Enables a low level driver to set an upper limit on the size of a
 330 *    coalesced segment
 331 **/
 332void blk_queue_max_segment_size(struct request_queue *q, unsigned int max_size>)
 333{
 334        if (max_size < PAGE_CACHE_SIZE) {
 335                max_size = PAGE_CACHE_SIZE;
 336                printk(KERN_INFO "%s: set to minimum %d\n",
 337                       __func__, max_size>;
 338        }
 339
 340        q->limits.max_segment_size = max_size;
 341}
 342EXPORT_SYMBOL(blk_queue_max_segment_size>;
 343
 344/**
 345 * blk_queue_logical_block_size - set logical block size for the queue
 346 * @q:  the request queue for the device
 347 * @size:  the logical block size, in bytes
 348 *
 349 * Description:
 350 *   This should be set to the lowest possible block size that the
 351 *   storage device can address.  The default of 512 covers most
 352 *   hardware.
 353 **/
 354void blk_queue_logical_block_size(struct request_queue *q, unsigned short size>)
 355{
 356        q->limits.logical_block_size = size;
 357
 358        if (q->limits.physical_block_size < size>)
 359                q->limits.physical_block_size = size;
 360
 361        if (q->limits.io_min < q->limits.physical_block_size>)
 362                q->limits.io_min = q->limits.physical_block_size;
 363}
 364EXPORT_SYMBOL(blk_queue_logical_block_size>;
 365
 366/**
 367 * blk_queue_physical_block_size - set physical block size for the queue
 368 * @q:  the request queue for the device
 369 * @size:  the physical block size, in bytes
 370 *
 371 * Description:
 372 *   This should be set to the lowest possible sector size that the
 373 *   hardware can operate on without reverting to read-modify-write
 374 *   operations.
 375 */
 376void blk_queue_physical_block_size(struct request_queue *q, unsigned int size>)
 377{
 378        q->limits.physical_block_size = size;
 379
 380        if (q->limits.physical_block_size < q->limits.logical_block_size>)
 381                q->limits.physical_block_size = q->limits.logical_block_size;
 382
 383        if (q->limits.io_min < q->limits.physical_block_size>)
 384                q->limits.io_min = q->limits.physical_block_size;
 385}
 386EXPORT_SYMBOL(blk_queue_physical_block_size>;
 387
 388/**
 389 * blk_queue_alignment_offset - set physical block alignment offset
 390 * @q:  the request queue for the device
 391 * @offset: alignment offset in bytes
 392 *
 393 * Description:
 394 *   Some devices are naturally misaligned to compensate for things like
 395 *   the legacy DOS partition table 63-sector offset.  Low-level drivers
 396 *   should call this function for devices whose first sector is not
 397 *   naturally aligned.
 398 */
 399void blk_queue_alignment_offset(struct request_queue *q, unsigned int offset>)
 400{
 401        q->limits.alignment_offset =
 402                offset & (q->limits.physical_block_size - 1>;
 403        q->limits.misaligned = 0;
 404}
 405EXPORT_SYMBOL(blk_queue_alignment_offset>;
 406
 407/**
 408 * blk_limits_io_min - set minimum request size for a device
 409 * @limits: the queue limits
 410 * @min:  smallest I/O size in bytes
 411 *
 412 * Description:
 413 *   Some devices have an internal block size bigger than the reported
 414 *   hardware sector size.  This function can be used to signal the
 415 *   smallest I/O the device can perform without incurring a performance
 416 *   penalty.
 417 */
 418void blk_limits_io_min(struct queue_limits *limits, unsigned int min>)
 419{
 420        limits->io_min = min;
 421
 422        if (limits->io_min < limits->logical_block_size>)
 423                limits->io_min = limits->logical_block_size;
 424
 425        if (limits->io_min < limits->physical_block_size>)
 426                limits->io_min = limits->physical_block_size;
 427}
 428EXPORT_SYMBOL(blk_limits_io_min>;
 429
 430/**
 431 * blk_queue_io_min - set minimum request size for the queue
 432 * @q:  the request queue for the device
 433 * @min:  smallest I/O size in bytes
 434 *
 435 * Description:
 436 *   Storage devices may report a granularity or preferred minimum I/O
 437 *   size which is the smallest request the device can perform without
 438 *   incurring a performance penalty.  For disk drives this is often the
 439 *   physical block size.  For RAID arrays it is often the stripe chunk
 440 *   size.  A properly aligned multiple of minimum_io_size is the
 441 *   preferred request size for workloads where a high number of I/O
 442 *   operations is desired.
 443 */
 444void blk_queue_io_min(struct request_queue *q, unsigned int min>)
 445{
 446        blk_limits_io_min(&q->limits, min>;
 447}
 448EXPORT_SYMBOL(blk_queue_io_min>;
 449
 450/**
 451 * blk_limits_io_opt - set optimal request size for a device
 452 * @limits: the queue limits
 453 * @opt:  smallest I/O size in bytes
 454 *
 455 * Description:
 456 *   Storage devices may report an optimal I/O size, which is the
 457 *   device's preferred unit for sustained I/O.  This is rarely reported
 458 *   for disk drives.  For RAID arrays it is usually the stripe width or
 459 *   the internal track size.  A properly aligned multiple of
 460 *   optimal_io_size is the preferred request size for workloads where
 461 *   sustained throughput is desired.
 462 */
 463void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt>)
 464{
 465        limits->io_opt = opt;
 466}
 467EXPORT_SYMBOL(blk_limits_io_opt>;
 3646lock/blk-settings.c#L319" id="L319" c4L394"> 39etting"block/blk-settode=lf">opt;
io_opt =  467 386EXPORT_SYMBOmXPORT_Sits_ia> * @q:  the request queue for thelock/blk-4ettings.c#L372" id="L3724 clas4="line" name="L372"> 372 433 * @min:  smallest I/O size in bywest poss4ble sector size that the4/span4
 *
 *
 375 *   Storage devices may report atings.c#L476" id="L376" class="lin4" nam4="L376"> 376void  457 *   device's preferred unit s="sref">4lk_queue_physical_block_4ize 458 *   for disk drives.  For RAID aline" nam4="L378"> 378        4a hre47d
 459 *   the internal track size.  A f="+code=4imits" class="sref">limi4s47pan>
 460 *   optimal_io_size is the prefeine" name4"L380"> 380        i4 ( 461 *   sustained throughput is desi href="+c4de=limits" class="sref">4imits48 href="block/blk-settings.c#L441"="L462"> 462 */
li48"line" name="L372"> 372blkine" name4"L383"> 383        i4 ( 3646lock/blke" cla" namef">q, unsigned int min>)
 445{
4imits48ref="+code=max_size" class="sref">max_4t;li4its.queue_limits *min>;
 44{
 39etting"block/line" nam4="L386"> 386EXPORT_SYMB4L(blk_queue_physical_block_size>;
 3646lock/blke" cla" namef">qsid="L319" c4L394"> 39etting"block/line" nam4"L388"> 388/**
 389 * blk_queue_alignment_offset - 4et physic4l block alignment offset4/span4
 *   should call this function f4 device
 *   should call this function f4 ;
 438(bottom)mment"> *   should call this function f4 ne" name43" id="L393" class="line4 name4"L393"> 393blklock/blk-4ettings.c#L394" id="L3944 clas49ueue_limits" class="sref">que" id=""L4climits" ="L4"> 3646lock/blke" cla"L4climits" f">q, unsigned int min>)
 3646locktline" /a>, unsigned int min>)
 3646lock/blk-settings.c#L465" id="L465" class="isaligned4to compensate for things4like<49"+code=limits" class="sref">limits-le 63-sec4or offset.  Low-level dr4vers<49_opt =  3646lock/blk"L4climits" f">q<"+code=min" class="se="L4"> 3646locktlinef="block/blk-settings.c#L447" id="L447" class="line" "+code=min" class="sb="L4"> 3646lock/blk-f="block/blk-settings.c#L447" id="L447" class="line" 0sid="L319" c4L394"> 39etting"block/r devices4whose first sector is no4EXPORT_SYMBO href="bl4ck/blk-settings.c#L398" 4d="L349ass="sref">blk_limits_io_opt>;
 3646lock/blke" cla"L4climits" f">qsid="L319" c4L394"> 39etting"block/rings.c#L499" id="L399" class="lin4" nam49hrits->blk4queue_alignment_offset(str492" name="L467"> 467 401        5a hre50a>_ss="cos="linL4cllina7" cla="+cod ="L457" class="line" name="L457<5l1ne" nam5=
 *   should call this function f5set &5mp; ( ona7" cl)mment"> *   should call this function f5s3t &5mttings.c#L394" id="L3945s50454" id="L454" class="line" namnL4rtnam ona7" clmment"> *   should call this function f5s4t &5mo compensate for things5+code50L455"> 455 * Description:
 456 *   Storage devices may report 5ine" name5"L407"> 407 *   sustained throughput is des5tings.c#L508" id="L408" class="lin5" nam5="L408"> 408 ona7" clL414" c5"> at> 351 *   sustained throughput is des5t8ngs.c#L509" id="L399" class="lin5opt *   sustained throughput is des5t9ngs.c#L50ueue_alignment_offset, un(top) and e="15"t3van c="L397"35nL4cl9" iass="line" nt *   sustained throughput is des5tes on(bottom)>a7" clLme="L35nL4cl9" iass="linewillt *   sustained throughput is des5t1ne" nam52" id="L4code=request_qu5ue" c5as412"> 412be=r97"35valu s andnensucoL460"> i
 */
 413 */
_ss="cosd="L3"> at> 35me="L3mment"> */
 392 */
 392ass=t7"35bottom3a7" cl. If noc5"> at> 351pan smment"> */
 417 392 */
 418void lassmment"> */
fi="comment"> */
 420        5a hre51"L410" class="line" name="L41+code=blk_limits_io_opt" class="sref">bl5>5o_min 445/blk"L4climits" ="L4"> 3646lock/blk"L4climits" f">q<>limits, unsigned int opt>)
 3646locktline" /a>, unsigned int opt>)
 3646lock/blk-   422        i5 (. 3646lock415" c_es href="+code=op4L4rt="L4"> 3646lock4L4rtblk-settings.c#L465" id="L465" class=5/a>-><5 href="+code=io_min" cla5s="sr5f">io_e=limits" class="sref">limits5its-&5t;io_min 4454 3646lockt 44bottom="L4"> 3646lock/ottommmne" name="L447"> 44L390" cla="L4"> 3646lockL390" clammne" name="L447"> 44r"line" name="L406r   425        i5 (limits5/a>-><5 href="+code=io_min" cla5s="sr52_opt =  3646locktlinef="block/blk-setting
 466min_not_zeroa>}
 3646locktlinef="block/blk-setting
 44b="L4"> 3646lock/blk-f="block/blk-setting
 39etting"block5its-&5t;q-> 3646locktlinef="block/blk-setting
 466min_not_zeroa>}
 3646locktlinef="block/blk-setting
 44b="L4"> 3646lock/blk-f="block/blk-setting
 39etting"block5iings.c#L5="L428"> 428q-> 3646locktlinef="block/blk-setting
 466mina>}
 3646locktlinef="block/blk-setting
. 3646lock/blk-f="block/blk-setting
 39etting"block5iine" nam5"L430"> 430q-> 3646locktlinef="block/blk-settingbounce_pf="L449"> 449
ounce_pf=line" name="L466"> 466min_not_zeroa>}
 3646locktlinef="block/blk-settingbounce_pf="L449"> 449
ounce_pf=line" name="L447"> 44b="L4"> 3646lock/blk-f="block/blk-settingbounce_pf="L449"> 449
ounce_pf=linesid="L319" c4L394"> 39etting"block5tings.c#L531" id="L431" class="lin5" nam53ef="+code=q" class="sref">q-><5 request 5ize for the queue5 3646locktlinef="block/blk-settingseg_
oundary_mask="L4"> 3646lock41g_
oundary_maskline" name="L466"> 466min_not_zeroa>}
 3646locktlinef="block/blk-settingseg_
oundary_mask="L4"> 3646lock41g_
oundary_maskline  
q-> 3646lock/blk-f="block/blk-settingseg_
oundary_mask="L4"> 3646lock41g_
oundary_masklinesid="L319" c4L394"> 39etting"block5tts-&5
 39etting"block5tne" name55" id="L435" class="line5 name53ts. 3646locktlinef="block/blk-setting
 466min_not_zeroa>}
 3646locktlinef="block/blk-setting
 44b="L4"> 3646lock/blk-f="block/blk-setting
 39etting"block5ta>-><5ettings.c#L436" id="L4365 clas53_opt =  3646locktlinef="block/blk-setting
 466min_not_zeroa>}
 3646locktlinef="block/blk-setting
-&5ty or preferred minimum 5/Oio_min =  3646lock/blk-f="block/blk-setting
 39etting"block5tings.c#L5 device can perform with5ut/**
 3646locktlinef="block/blk-setting
 427 466min_not_zeroa>}
 3646locktlinef="block/blk-setting
 427io_min =  44b="L4"> 3646lock/blk-f="block/blk-setting
 427 39etting"block5ltiple of5minimum_io_size is the
54ef="+code=q" class="sref">q-><5orkloads 5here a high number of I/5 3646locktlinef="block/blk-setting" name="L404"> 404}
 466b="L4"> 3646lock/blk-f="block/blk-setting
 name="L404"> 404}
 39etting"block5ldeviceq-><5tings.c#L544" id="L444" class="lin5" nam54a href="+code=misaligned" clL390" cla="L4"> 3646lockL390" clammneode=physical_block_s="sref">od="L406" class="line" name="L406_s="sref">od="L406" class="ls.c#L468" id="L468" c="L4"> 3646lock/blk- > href="+code=op4L4rt="L4"> 3646lock4L4rtblk-sid="L319" c4L394"> 39etting"block5lne" name5in(struct limits5line" nam5="L446"> 446        5a hre54_opt =  467
bl5blk_limit5_io_min(& 417 at> 351ass=t7"35#L43topna */
 448 418void bl5L( 3646locktlinef="block/blk-settingass="line" name="L402"> 402                 3646lockL390" clammne) e=limits" class="sref">limits5ine" name5"L450"> 450/**
io_min =  4454 3646lockt 466maxe="L427"> 427 3646locktlinef="block/blk-setting7" class="line" name="L427"> 427}
 3646locktlinef="block/blk-settingysical_block_size" class="sref"settings.c#L465" id="L465" class=5l request5size for a device5. 3646locktlinef="block/blk-settingass="line" name="L402"> 402                 39etting"block5n>
q-> 3646lock/ottommmne" name="L466"> 466maxe="L427"> 427 3646lock/blk-f="block/blk-setting7" class="line" name="L427"> 427}
 3646lock/blk-f="block/blk-settingysical_block_size" class="sref"sa+> href="+code=opL390" cla="L4"> 3646lockL390" clammneid="L319" c4L394"> 39etting"block5nings.c#L5
 39etting"block5ings.c#L455" id="L455" class="line5 name55ts. 467bl5lock/blk-5ettings.c#L456" id="L4565 clas555s. 427 3646lockt 44bottom="L4"> 3646lock/ottommmne)f="+code=physical_blockmina>}
 3646lockt 44bottom="L4"> 3646lock/ottommmne)f+cod) e=limits" class="sref">limits5n optimal5I/O size, which is the
55sref">io_min =  3646locktlinef="block/blk-setting" name="L404"> 404}
 39etting"block5nine" nam5ned I/O.  This is rarely5repor557ref">io_min =  39etting"block5n(.EXPORT_SYMB5properly 5ligned multiple ofio_min<_SYMBOL" class="sref">EXPORT_SYMB5rred requ5st size for workloads wh5req-><5red.
 3646locktlinef="block/blk-setting class="line" name="L424"> 424
 466maxe="L427"> 427 3646locktlinef="block/blk-setting class="line" name="L424"> 424
q-> 3646lock/blk-f="block/blk-setting class="line" name="L423"> 423                 39etting"block5_limits_i5_opt(struct  39etting"block5line" nam5="L465"> 465        5a hre56ts. 3646locktlinef="block/blk-setting="L403" class="line" name="L403"> 403         466maxe="L427"> 427 3646locktlinef="block/blk-setting7" class="line" name="L427"> 427}
 39etting"block5lock/blk-5f="+code=io_opt" class="5ref">565s. 3646lock/blk-f="block/blk-setting6" class="line" name="L426"> 426                 39etting"block5_ optimal5="L467"> 467/**
q-> 3646locktlinef="block/blk-settings.c#L421" id="L421" class="line" name="L421"> 421 427 3646locktlinef="block/blk-settings.c#L421" id="L421" class="line > href="+code=opb="L4"> 3646lock/blk-f="block/blk-settingysical_block_size" class="sref"sid="L319" c4L394"> 39etting"block5_(opt;
 3646locktlinef="block/blk-settings.c#L466" id="L466" class="line" name="L466"> 466lcm="L4"> 3646locklcms.c#L468" id="L468" e="L4"> 3646locktlinef="block/blk-settings.c#L466" id="L466" class="line > href="+code=opb="L4"> 3646lock/blk-f="block/blk-settingysi#L466" id="L466" class="linesid="L319" c4L394"> 39etting"block5_roperly 5">io_opt = /**
 3646locktlinef="block/blk-settingclu 4>r="L4"> 3646lockclu 4>rmin 466b="L4"> 3646lock/blk-f="block/blk-settingclu 4>r="L4"> 3646lockclu 4>rmin 39etting"block5lock/blk-5ettings.c#L372" id="L3725 clas57a href="+code=alignment_offse="L4"> 3646locktlinef="block/blk-settingdiscard_zeroes_data="L4"> 3646lockdiscard_zeroes_datamin 466b="L4"> 3646lock/blk-f="block/blk-settingdiscard_zeroes_data="L4"> 3646lockdiscard_zeroes_datamin 39etting"block5lings.c#L5ble sector size that the5/span57ef="+code=q" class="sref">q-><5out rever5ing to read-modify-write5/span57a href="+code=e="L467"> 467 7"35>      id="L440" c?p*+code=blk_limits_io_opt" class="sref">bl5oine" nam5settings.c#L375" id="L375" cla57ts. 3646locktlinef="block/blk-setting="L403" class="line" name="L403"> 403         3646locktlinef="block/blk-setting class="line" name="L424"> 424
limits5tings.c#L576" id="L376" class="lin5" nam575s. 3646locktlinef="block/blk-setting="L403" class="line" name="L403"> 403         466e="L4"> 3646locktlinef="block/blk-setting class="line" name="L424"> 424
 39etting"block5l optimal5lk_queue_physical_block_5izeio_min =  3646locktlinef="block/blk-setting" name="L404"> 404}
 39etting"block5line" nam5="L378"> 378        5a hre577ref">io_min =  39etting"block5f="+code=5imits" class="sref">limi5s57a href="+code_SYMBOL" class="sref">EXPORT_SYMB5ine" name5"L380"> 380        i5 (/**
5imits580 href="+code=e="L467"> 467 7"35c#L440" id="L440" c?p*+code=blk_limits_io_opt" class="sref">bl5t;li581s. 3646locktlinef="block/blk-setting=physical_block_size" class="sref"+code=physical_blocke="L4"> 3646locktlinef="block/blk-setting="L403" class="line" name="L403"> 403        limits5ine" name5"L383"> 383        i5 (q-> 3646locktlinef="block/blk-settings.c#L421" id="L421" class="line" name="L421"> 421e="L4"> 3646locktlinef="block/blk-setting="L403" class="line" name="L403"> 403         39etting"block5 href="+c5de=limits" class="sref">5imits58sref">io_min =  3646locktlinef="block/blk-setting" name="L404"> 404}
 39etting"block5t;li58ts. 39etting"block5line" nam5="L386"> 386EXPORT_SYMB5L(/**
 388 467 457 7"35c#L440" id="L440" c?p*+code=blk_limits_io_opt" class="sref">bl5t="+code=589" id="L389" class="lin5" nam58a href="+code<  3646locktlinef="block/blk-settings.c#L466" id="L466" class="line"f"+code=physical_blocke="L4"> 3646locktlinef="block/blk-setting="L403" class="line" name="L403"> 403        limits5ine" name5l block alignment offset5/span589ref">io_min =  3646locktlinef="block/blk-settings.c#L466" id="L466" class="line" n-settings.c#L405" id="L405" class=5 device
io_min =  4454="L4"> 3646locktlinef="block/blk-setting" name="L404"> 404}
 39etting"block5 ;
 39etting"block5 ne" name53" id="L393" class="line5 name592 href="+code_SYMBOL" class="sref">EXPORT_SYMB5lock/blk-5ettings.c#L394" id="L3945 clas59434" d="L319" c4L394"> 39etting"block5isaligned5to compensate for things5like<594 href="+code=e="L467"> 467 w461"7L390" class="line*+code=blk_limits_io_opt" class="sref">bl5le 63-sec5or offset.  Low-level dr5vers<59_opt =  3646locktlinef="block/blk-settingass="line" name="L402"> 402                 466lcm="L4"> 3646locklcms.c#L468" id="L468" e="L4"> 3646locktlinef="block/blk-settingass="line" name="L402"> 402                 44L390" cla="L4"> 3646lockL390" clammnesettings.c#L465" id="L465" class=5r devices5whose first sector is no5io_min =  427 3646locktlinef="block/blk-setting7" class="line" name="L427"> 427}
 3646locktlinef="block/blk-settingysical_block_size" class="sref"s"+codid="L319" c4L394"> 39etting"block5 ine" nam5ck/blk-settings.c#L398" 5d="L359ent">/**
 467L390" class="line"L4on>L5>      id="L44
oundarye*+code=blk_limits_io_opt" class="sref">bl5lne" name5queue_alignment_offset(str599 href="+code<  3646locktlinef="block/blk-settingass="line" name="L402"> 402                 3646locktlinef="block/blk-setting class="line" name="L424"> 424
limits6line" nam6="L401"> 401        6a hre600ref">io_min =  4454="L4"> 3646locktlinef="block/blk-setting" name="L404"> 404}
 39etting"block6l1ne" nam6=
 39etting"block6set &6mp; (EXPORT_SYMB6s3t &6mttings.c#L394" id="L3946s60434" d="L319" c4L394"> 39etting"block6s4t &6mo compensate for things6+code604 href="+code=e="L467"> 467 392andn name="L437"*+code=blk_limits_io_opt" class="sref">bl6L( 3646lock/blk-f="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"s"e=limits" class="sref">limits6l6/a>(io_min =  3646lockL390" clammneode=physical_block_s="sref">oddiscard_L390" cla="L4"> 3646lock_s="sref">oddiscard_L390" clas.c#L468" id="L468" c="L4"> 3646lock/blk- > href="+code=op4L4rt="L4"> 3646lock4L4rtblk-sid="L319" c4L394"> 39etting"block6tings.c#L608" id="L408" class="lin6" nam60ent">/**
 3646locktlinef="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"r!de0r="+co="+co/**
io_min =  3646locktlinef="block/blk-settingdiscard_L390" cla="L4"> 3646lockdiscard_L390" clas.c#r!de=physical_blockL390" cla="L4"> 3646lockL390" clammne) e=limits" class="sref">limits6tesio_min =  3646lockt 466e="L4"> 3646locktlinef="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"r+> href="+code=ope="L4"> 3646locktlinef="block/blk-settingdiscard_L390" cla="L4"> 3646lockdiscard_L390" clas.c#o/**
. 3646lock/ottommmne" name="L466"> 466b="L4"> 3646lock/blk-f="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"a+> href="+code=opL390" cla="L4"> 3646lockL390" clammneid="L319" c4L394"> 39etting"block6lock/blk-6ettings.c#L413" id="L4136 clas61ef="+code=q" class="sref">q-><6l3t &6ze bigger than the repor6edio_min =  467bl6l4t &6an be used to signal the6/span61ts. 427 3646lockt 44bottom="L4"> 3646lock/ottommmne)f="+code=physical_blockmina>}
 3646lockt 44bottom="L4"> 3646lock/ottommmne)f+codsettings.c#L465" id="L465" class=6l(. 3646locktlinef="block/blk-settingdiscard_" name="L404"> 404}
 39etting"block6lne" name6tings.c#L417" id="L417" 6lass=61sref">io_min = EXPORT_SYMB6lings.c#L618" id="L418" class="lin6" nam61ent">/**
 4454="L4"> 3646locktlinef="block/blk-setting"axddiscard_hr5" c="+code=opt" cla
 466min_not_zeroa>}
 3646locktlinef="block/blk-setting
 39etting"block6line" nam6="L420"> 420        6a hre619ref">io_min =  445b="L4"> 3646lock/blk-f="block/blk-setting
 39etting"block6>620ref">io_min =  4454="L4"> 3646locktlinef="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"a name="L421"> 421 427 3646locktlinef="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref" d="L319" c4L394"> 39etting"block6ine" name6"L422"> 422        i6 (. 445b="L4"> 3646lock/blk-f="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"sid="L319" c4L394"> 39etting"block6&ock/blk-6 href="+code=io_min" cla6s="sr62ef">q-> 3646locktlinef="block/blk-settingdiscard_L390" cla="L4"> 3646lockdiscard_L390" clas.c#r name="L466"> 466lcm="L4"> 3646locklcms.c#L468" id="L468" e="L4"> 3646locktlinef="block/blk-settingdiscard_L390" cla="L4"> 3646lockdiscard_L390" clas.c#" name="L447"> 44L390" cla="L4"> 3646lockL390" clammnes ="+co/**
io_min =  3646locktlinef="block/blk-settingdiscard_ name="L437="L4"> 3646lockdiscard_ name="L437ref"r+codid="L319" c4L394"> 39etting"block6ine" name6"L425"> 425        i6 (.EXPORT_SYMB6/a>-><6 href="+code=io_min" cla6s="sr62_optEXPORT_SYMB6/ne" name6t; 39etting"block6iings.c#L6="L428"> 428EXPORT_SYMB6/8ngs.c#L6ref="+code=blk_limits_io6min" 628s>;
 3646lock/blk"L4climits" f">qdid="L319" c4L394"> 39etting"block6iine" nam6"L430"> 430/**
 412ass="cos="linL4cllinass="comment"> *   should call this function f6 device
 *   should call this function f6tts-&6
 onf="blo8"> 438(bottom)mment"> *   should call this function f6tne" name65" id="L435" class="line6 name63 ona7" clmment"> *   should call this function f6ta>-><6ettings.c#L436" id="L4366 clas63pan>
 *   should call this function f6tne" name6ty or preferred minimum 6/O 417 *   Storage devices may report 6tings.c#L6 device can perform with6ut 418void f="blo8"> 43.c Returnsmment"> *   Storage devices may report 6t8ngs.c#L6disk drives this is ofte6 the<63="block/blk-settings.c#L409" iiii0 <"> 392didn#L458t chang3.c Returns -1 *   Storage devices may report 6tine" nam6it is often the stripe c6unk */
bl6orkloads 6here a high number of I/6 445/devl"L4climits" ="L4"> 3646lock/devl"L4climits" s.c#L>limits, unsigned int opt>)
 3646locktline" /a>, unsigned int  43="L4"> 3646lock/b"blo8"> 43t>)
 3646lock/devref" d="L319" c4L394"> 39etting"block6ldeviceq-> 3646lock415" c_es href="+code=op4L4rt="L4"> 3646lock4L4rtblk-settings.c#L465" id="L465" class=6tings.c#L644" id="L444" class="lin6" nam64ref="+code=max_size" class="sref">max_6lne" name6in(struct min>)
min>;
 466bdevlgecode=min" class="sref"bdevlgecode=mis.c#L468" id="L468" cdev="L4"> 3646lock/devref"did="L319" c4L394"> 39etting"block6line" nam6="L446"> 446        6a hre64_optEXPORT_SYMB6blk_limit6_io_min(&q-> 3646lock4L4rtblk- + name="L466"> 466geco4L4rt_hr5"="L4"> 3646lockgeco4L4rt_hr5"s.c#L468" id="L468" cdev="L4"> 3646lock/devref"did="L319" c4L394"> 39etting"block6lings.c#L6="L448"> 448/**
 3646lock/blk"L4climits" f">q;  3646locktline" "+code=min" class="sbref">min>;
 3646lock4L4rtblk-sid="L319" c4L394"> 39etting"block6ine" name6"L450"> 450_SYMBOL" class="sref">EXPORT_SYMB6tings.c#L651" id="L451" class="lin6" nam650ref"=alignment_offss_io_opt>;
 3646lock/devl"L4climits" s.c#sid="L319" c4L394"> 39etting"block6l request6size for a device6 39etting"block6ldeviceass="cos="linL4cllinass="comment"> *   should call this function f6ings.c#L465" id="L455" class="line6 name65 *   should call this function f6iine" nam6ettings.c#L456" id="L4566 clas65pan>
 469" id="L448"> 438(bottom)mment"> *   should call this function f6n optimal6I/O size, which is the
65ine" name="L417"> 417 ona7" clmment"> *   should call this function f6nine" nam6ned I/O.  This is rarely6repor65"L418"> 418void  *   should call this function f6n( *   Storage devices may report 6properly 6ligned multiple ofs="cos="lia topnlevel gendiscnand2">fottom3levelmment"> *   Storage devices may report 6rred requ6st size for workloads wh6re 43.mment"> *   Storage devices may report 6r request6>
 412bl6tings.c#L663" id="L463" class="lin6" nam66ef">qvoid  href="+code=opdiscl"L4climits" ="L4"> 3646lockdislk"L4climits" f">q<>limits, unsigned gendisc="L4"> 3646lockgendisc href="block/blk-settdisc="L4"> 3646lockdisc hre" /a>, unsigned int  43="L4"> 3646lock/b"blo8"> 43t>)
 3646lock/devref" d="L319" c4L394"> 39etting"block6_limits_i6_opt(struct io_min =  3646lock415" c_es href="+code=op name="L402"> 402       465        6a hre66tsmax_6lock/blk-6f="+code=io_opt" class="6ref">665s., unsigned int min>)
 3646locktline" name="L466"> 466disc="L4"> 3646lockdisc href="block/blk-settingde=min" class="sref">)
 39etting"block6_ optimal6="L467"> 467/**
 3646lock/devl"L4climits" s.c#L"+code=min" class="se="L4"> 3646locktlinef="block/blk-setting .c#L447" id="L447" class="line"  href="+code=op/dev="L4"> 3646lock/devref" > href="+code=op name="L402"> 402      limits6_(opt;
 3646lockt 3646lockBDEVNAME_SIZEmmne]" name="L447"> 44bottom="L4"> 3646lock/ottommmne[  3646lockBDEVNAME_SIZEmmne]id="L319" c4L394"> 39etting"block6_roperly 6">io_opt = /**
io_min =  445dislke="L="L4"> 3646lockdislke="Ls.c#L468" id="L468" disc="L4"> 3646lockdisc hre" 0 > href="+code=ope 3646lockt 39etting"block6lock/blk-6ettings.c#L372" id="L3726 clas67ts. 3646lock/deve="Ls.c#L468" id="L468" cdev="L4"> 3646lock/devref"" name="L447"> 44bottom="L4"> 3646lock/ottommmne)id="L319" c4L394"> 39etting"block6lings.c#L6ble sector size that the6/span67ef="+code=q" class="sref">q-><6out rever6ing to read-modify-write6/span67sref">io_min =  3646lockprintcs.c#L468" id="L468" KERN_NOTICE="L4"> 3646lockKERN_NOTICEs  412a>-">&quobl=#37;s: Warn9" :ian> 438=#37;se"L4" name="L4\n&quoblcode=bl d="L319" c4L394"> 39etting"block6oine" nam6settings.c#L375" id="L376" cla67ts. 3646lockt 44bottom="L4"> 3646lock/ottommmne)id="L319" c4L394"> 39etting"block6lock/blk-676" id="L376" class="lin6" nam675 href="+code_SYMBOL" class="sref">EXPORT_SYMB6l optimal6lk_queue_physical_block_6izeEXPORT_SYMB6l( 378        6a hre677ref"=alignment_offss_io_opt>;
 3646lockdislk"L4climits" f">q)id="L319" c4L394"> 39etting"block6l(limi6s67a hred="L319" c4L394"> 39etting"block6lroperly 6"L380"> 380        i6 (6imits68411" id="L411" class="line" na/blkss="srdma_pad - linepad maskli+cod ="L457" class="line" name="L457<6 ock/blk-6"+code=limits" class="sr6f">li68s412"> 412mina="li7"35a7" clmment"> *   should call this function f6ine" name6"L383"> 383        i6 (6imits68454" id="L454" class="line" nli+cod ="L457" class="line" name="L457<6 ine" nam6"+code=limits" class="sr6f">li68 *   Storage devices may report 6line" nam6="L386"> 386
 *   should call this function f6L( 417mina/a3/a>ryiofsamment"> *   should call this function f6L( 388 418void  *   Storage devices may report 6l(bl6ine" name6l block alignment offset6/span689ref"void  href="+code=op/blkss="srdma_pad="L4"> 3646lock/blkss="srdma_padf">q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 445mask="L4"> 3646lockmasklinesk_limits_io_opt" class="sref">bl6 device
limits6 ;
min>;
 3646lockdma_pad_maskline" name="L466"> 466mask="L4"> 3646lockmasklineid="L319" c4L394"> 39etting"block6 ne" name63" id="L393" class="line6 name692 hre_SYMBOL" class="sref">EXPORT_SYMB6lock/blk-6ettings.c#L394" id="L3946 clas69434" =alignment_offss_io_opt>;
 3646lock/blkss="srdma_padf">q)id="L319" c4L394"> 39etting"block6isaligned6to compensate for things6like<69ef="+code=limits" class="sref">limits6le 63-sec6or offset.  Low-level dr6vers<69pan>
 417 418void mina="li7"35a7" clmment"> *   should call this function f6rings.c#L699" id="L399" class="lin6" nam69="block/blk-settings.c#L409" immask:+cpad maskli+cod ="L457" class="line" name="L457<6lne" name6queue_alignment_offset(str69"L410" class="line" name="L41li+cod ="L457" class="line" name="L457<7line" nam7="L401"> 401        7a hre70411" id="L411" class="line" naUpdatscdmacpad mask.mment"> *   Storage devices may report 7l1ne" nam7=
 412 *   Storage devices may report 7l2ne" nam7=" id="L393" class="line7ass="70a/a3/a>ryiofsamment"> *   should call this function f7s3t &7mttings.c#L394" id="L3947s70454" id="L454" class="line" nascattlinss/a3suchilass=me="ncludes37"35pad buffer.mment"> *   Storage devices may report 7s4t &7mo compensate for things7+code70bl7L( 3646lock/blkss="srupdatsrdma_padf">q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 445mask="L4"> 3646lockmasklinesk_limits_io_opt" class="sref">bl7l6/a>(limits7tings.c#L708" id="L408" class="lin7" nam70XPORTass="sre<  3646lockmaskline ="ble=alignment_offsref">min>;
 3646lockdma_pad_masklinesk_limits_io_opt" class="sref">bl7l8ngs.c#L709" id="L399" class="lin7.min>;
 3646lockdma_pad_maskline" name="L466"> 466mask="L4"> 3646lockmasklineid="L319" c4L394"> 39etting"block7t9ngs.c#L70ueue_alignment_offset_SYMBOL" class="sref">EXPORT_SYMB7tes>;
 3646lock/blkss="srupdatsrdma_padf">q)id="L319" c4L394"> 39etting"block7t1ne" nam72" id="L4code=request_qu7ue" c71ts 39etting"block7lock/blk-7ettings.c#L413" id="L4137 clas71 *   Storage devices may report 7l4t &7an be used to signal the7/span71mina="li7"35a7" clmment"> *   should call this function f7l(
 *   should call this function f7l6/a>( 417}
 *   should call this function f7lings.c#L718" id="L418" class="lin7" nam71"L418"> 418void  7"35bufferein byteomment"> *   should call this function f7l8ngs.c#L7_min(struct  *   should call this function f7l9ngs.c#L7="L420"> 420        7a hre71"L410" class="line" name="L410Som35a7" cls haveiexcesscDMA problemsnand2can#L458t simply discard (ormment"> *   should call this function f7>72411" id="L411" class="line" nazeroefill)me="LunwantL4 piece "> 7"35transfer.  They haveito haveiamment"> *   should call this function f7ine" name7"L422"> 422        i7 ( 412 memoryito transfer=me="nto.  The usl cas>a="li7"is="Lcode=blk_limits_io_opt" class="sref">bl7&ock/blk-7 href="+code=io_min" cla7s="sr72 7"35c4cll1"7bl7&3t &7t; *   should call this function f7ine" name7"L425"> 425        i7 ( *   should call this function f7i(asoilass=t"35bufe"L4alwayL4appendL4ocent"> *   should call this function f7i6/a>( 417lyito t="Lncattliss/a.mment"> *   Storage devices may report 7iings.c#L7="L428"> 428 418void  *   should call this function f7/8ngs.c#L7ref="+code=blk_limits_io7min" 72="block/blk-settings.c#L409" iNotb:fT"is=rout"ne adju 4s 
ooms="liappendingmment"> *   should call this function f7/9ngs.c#L7"L430"> 430 you a hla/blkss="sr
 *   should call this function f7tings.c#L731" id="L431" class="lin7" nam73411" id="L411" class="line"4107"is=rout"ne, you mu 43linet"35>s="cito one fewereth"L4your5a7" clmment"> *   should call this function f7 request 7ize for the queue7 412a7"3rl won#L458t b35>ooms="li7"35arain buffer.mment"> *   should call this function f7 ock/blk-7pan>
bl7tts-&7
 445/blkss="srdma_drain="L4"> 3646lock/blkss="srdma_drainf">q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
bl7tne" name75" id="L435" class="line7 name73ts. =  445dma_drain_needed_fn="L4"> 3646lockdma_drain_needed_fn href="block/blk-settdma_drain_needed="L4"> 3646lockdma_drain_neededmmne"k_limits_io_opt" class="sref">bl7t()
 3646lock/ufmmne" unse="L4 e" name="L445"> 445name="L424"> 424bl7t6/a>(limits7tings.c#L7 device can perform with7ut)
min>;
bl7t8ngs.c#L7disk drives this is ofte7 the<738s.lineid="L319" c4L394"> 39etting"block7tine" nam7it is often the stripe c7unkio_min<=e="L467"> 467ooms="liappendingi7"35arain c+code=blk_limits_io_opt" class="sref">bl7ltiple of7minimum_io_size is the
74_min =  3646lock/blkss="sr
min>;
 44ss="sr
)
min>;
 39etting"block7orkloads 7here a high number of I/7min>;
 3646lockdma_drain_neededmmne" name="L466"> 466dma_drain_needed="L4"> 3646lockdma_drain_neededmmneid="L319" c4L394"> 39etting"block7oock/blk-7"block/blk-settings.c#L473" id74ef">q->=alignment_offsref">min>;
 3646lockdma_drain_buffermmne" name="L466"> 466buf="L4"> 3646lock/ufmmneid="L319" c4L394"> 39etting"block7ots-&744" id="L444" class="lin7" nam743f">q->=alignment_offsref">min>;
 424 466name="L424"> 424 39etting"block7one" name7in(struct limits7line" nam7="L446"> 446        7a hre745s.(&EXPORT_SYMB7lings.c#L7="L448"> 448>_GP>;
 3646lock/blkss="srdma_drainf">qdid="L319" c4L394"> 39etting"block7o8ngs.c#L7ref="+code=blk_queue_io_7in" c74a hred="L319" c4L394"> 39etting"block7ine" name7"L450"> 450 *   should call this function f7l request7size for a device7 412mina="li7"35a7" clmment"> *   should call this function f7ldevicebl7ings.c#L475" id="L455" class="line7 name75 3646lock/blkss="srsegmtin_
oundaryf">q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 445mask="L4"> 3646lockmasklinesk_limits_io_opt" class="sref">bl7iine" nam7ettings.c#L456" id="L4567 clas75pan>
e=limits" class="sref">limits7n optimal7I/O size, which is the
75q" class="sre<  3646lockmaskline =lble=alignment_offsPAGE_CACHE_SIZE="L4"> 3646lockPAGE_CACHE_SIZEline +cod e=limits" class="sref">limits7nine" nam7ned I/O.  This is rarely7repor757ref">io_min =  3646lockmaskline  name="L466"> 466PAGE_CACHE_SIZE="L4"> 3646lockPAGE_CACHE_SIZEline +coid="L319" c4L394"> 39etting"block7n(. 3646lockprintcs.c#L468" id="L468" KERN_INFO="L4"> 3646lockKERN_INFOs  412a>-">&quobl=#37;s: lineto m class==#37;lx\n&quoblcode=bl d="L319" c4L394"> 39etting"block7properly 7ligned multiple ofio_min =  3646lock__func__mmne" name="L447"> 44mask="L4"> 3646lockmasklinesid="L319" c4L394"> 39etting"block7rred requ7st size for workloads wh7re = EXPORT_SYMB7r request7>
 39etting"block7tings.c#L763" id="L463" class="lin7" nam76ef">q->=alignment_offsref">min>;
 466neg_
oundary_mask="L4"> 3646lockneg_
oundary_maskline" name="L466"> 466mask="L4"> 3646lockmasklineid="L319" c4L394"> 39etting"block7_limits_i7_opt(struct EXPORT_SYMB7rngs.c#L47="L465"> 465        7a hre76ts>;
 3646lock/blkss="srsegmtin_
oundaryf">qsid="L319" c4L394"> 39etting"block7rine" nam7f="+code=io_opt" class="7ref">76_optEXPORT_SYMB7_ optimal7="L467"> 467 417 418void  392- linedmaclengthnand2memoryiL390" clamm+cod ="L457" class="line" name="L457<7L(opt;
mina="li7"35a7" clmment"> *   should call this function f7_roperly 7">io_opt =  392maskli+cod ="L457" class="line" name="L457<7pan class7"coass="line" name="L3867> 38677411" id="L411" class="line" nli+cod ="L457" class="line" name="L457<7p request7ettings.c#L372" id="L3727 clas77s412"> 412 *   Storage devices may report 7lings.c#L7ble sector size that the7/span77minired2memoryiLnd5>engthna> 392="lidirecnedmactransacs="cs.mment"> *   should call this function f7out rever7ing to read-modify-write7/span77454" id="L454" class="line" naode7"is="L 59linwhen buildingidirecneio5>min.mment"> *   should call this function f7ongs.c#L47settings.c#L375" id="L377" cla77 *   should call this function f7oine" nam776" id="L376" class="lin7" nam77pan>
bl7l optimal7lk_queue_physical_block_7ize 3646lock/blkss="srdma_L390" claf">q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 445mask="L4"> 3646lockmasklinesk_limits_io_opt" class="sref">bl7l( 378        7a hre777ref"e=limits" class="sref">limits7l(limi7s778f">q->=alignment_offsref">min>;
 3646lockdma_L390" claf">q" name="L466"> 466mask="L4"> 3646lockmasklineid="L319" c4L394"> 39etting"block7lroperly 7"L380"> 380        i7 (_SYMBOL" class="sref">EXPORT_SYMB7 href="+c7de=limits" class="sref">7imits780ref"=alignment_offss_io_opt>;
 3646lock/blkss="srdma_L390" claf">qsid="L319" c4L394"> 39etting"block7 ock/blk-7"+code=limits" class="sr7f">li78ts 39etting"block7ine" name7"L383"> 383        i7 (7imits78454" id="L454" class="line" nn/blkss="srupdatsrdma_"> 392- updatscdmaclengthnand2memoryiL390" clamm+cod ="L457" class="line" name="L457<7 ine" nam7"+code=limits" class="sr7f">li78mina="li7"35a7" clmment"> *   should call this function f7line" nam7="L386"> 386
 392maskli+cod ="L457" class="line" name="L457<7L( 417 388 418void  *   Storage devices may report 7l(minired2memoryiLnd5>engthna> 392="lidirecnedmactransacs="cs.mment"> *   should call this function f7ine" name7l block alignment offset7/span78"L410" class="line" name="L410441I> 7"35>min 392"L largereth"L47"35curr"> 392 *   should call this function f7 device
3a"> 392"L updatsdito t="Lnew value, o7"3rwis>aiamm+cod ="L457" class="line" name="L457<7 ;
 412one.  The dn  39 "> 7"is="L to allow multiple objecnLcode=blk_limits_io_opt" class="sref">bl7 ne" name73" id="L393" class="line7 name79mspecns="code=blk_limits_io_opt" class="sref">bl7 ut rever7ettings.c#L394" id="L3947 clas79454" id="L454" class="line" naode"> 392.mment"> *   should call this function f7isaligned7to compensate for things7like<79 *   should call this function f7le 63-sec7or offset.  Low-level dr7vers<79pan>
bl7r devices7whose first sector is no7 392 3646lock/blkss="srupdatsrdma_"> 392q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 445mask="L4"> 3646lockmasklinesk_limits_io_opt" class="sref">bl7 ine" nam7ck/blk-settings.c#L398" 7d="L3797ref"e=limits" class="sref">limits7rings.c#L799" id="L399" class="lin7" nam798f">q->=alignment_offsBUG_ON="L4"> 3646lockBUG_ONs.c#L468" id="L468" mask="L4"> 3646lockmaskline ="ble=alignment_offsPAGE_SIZE="L4"> 3646lockPAGE_SIZElinesid="L319" c4L394"> 39etting"block7lne" name7queue_alignment_offset(str79ent">/**
 401        8a hre80_min =  3646lockmaskline ="ble=alignment_offsref">min>;
 3646lockdma_L390" claf">qsk_limits_io_opt" class="sref">bl8l1ne" nam8=
min>;
 3646lockdma_L390" claf">q" name="L466"> 466mask="L4"> 3646lockmasklineid="L319" c4L394"> 39etting"block8l2ne" nam8=" id="L393" class="line8ass="802 hre_SYMBOL" class="sref">EXPORT_SYMB8s3t &8mttings.c#L394" id="L3948s80434" =alignment_offss_io_opt>;
 392 3646lock/blkss="srupdatsrdma_"> 392qsid="L319" c4L394"> 39etting"block8s4t &8mo compensate for things8+code80ef="+code=limits" class="sref">limits8L( 417 418void mina="li7"35a7" clmment"> *   should call this function f8l8ngs.c#L809" id="L399" class="lin8 *   should call this function f8l9ngs.c#L80ueue_alignment_offsetcapabil437 "> @q.c I> it supportLcode=blk_limits_io_opt" class="sref">bl8t1ne" nam82" id="L4code=request_qu8ue" c81s412"> 412 *   should call this function f8lock/blk-8ettings.c#L413" id="L4138 clas81 *   should call this function f8l3t &8ze bigger than the repor8edbl8l4t &8an be used to signal the8/span81 3646lock/blkss="srflushf">q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 445flush="L4"> 3646lockflushf">qsk_limits_io_opt" class="sref">bl8l(
e=limits" class="sref">limits8l6/a>(q-> 3646lockWARN_ON_ONCEs.c#L468" id="L468" flush="L4"> 3646lockflushf">q "+cod ~L468" id="L468" REQ_FLUSH="L4"> 3646lockREQ_FLUSHf">q |ef">q-> 3646lockREQ_FUAmm>qssid="L319" c4L394"> 39etting"block8lings.c#L818" id="L418" class="lin8" nam81ent">/**
q-><  3646lockWARN_ON_ONCEs.c#L!L468" id="L468" flush="L4"> 3646lockflushf">q "+cod 468" id="L468" REQ_FLUSH="L4"> 3646lockREQ_FLUSHf">qs ="+co"+cod L468" id="L468" flush="L4"> 3646lockflushf">q "+cod 468" id="L468" REQ_FUA="L4"> 3646lockREQ_FUAmm>qsssk_limits_io_opt" class="sref">bl8l9ngs.c#L8="L420"> 420        8a hre819ref">io_min =  3646lockflushf">q "+cod= ~468" id="L468" REQ_FUA="L4"> 3646lockREQ_FUAmm>qid="L319" c4L394"> 39etting"block8>82411" d="L319" c4L394"> 39etting"block8&1ne" nam8"L422"> 422        i8 (min>;
q" name="L466"> 466flush="L4"> 3646lockflushf">q "+cod L468" id="L468" REQ_FLUSH="L4"> 3646lockREQ_FLUSHf">q |ef">q-> 3646lockREQ_FUAmm>qsid="L319" c4L394"> 39etting"block8&ock/blk-8 href="+code=io_min" cla8s="sr822 hre_SYMBOL" class="sref">EXPORT_SYMB8&3t &8t;>_GP>;
 3646lock/blkss="srflushf">qsid="L319" c4L394"> 39etting"block8&4t &8"L425"> 425        i8 (limits8i(q<>limits, unsigned ref="+code=min" class="sref">min>)
min>;
 block/blk-settrs="sablin" class="sref"ss="sablif">qsk_limits_io_opt" class="sref">bl8i6/a>(limits8iings.c#L8="L428"> 428min>;
q" n! block/blk-settrs="sablin" class="sref"ss="sablif">qid="L319" c4L394"> 39etting"block8&8ngs.c#L8ref="+code=blk_limits_io8min" 82="blo_SYMBOL" class="sref">EXPORT_SYMB8&9ngs.c#L8"L430"> 430>_GP>;
qsid="L319" c4L394"> 39etting"block8tings.c#L831" id="L431" class="lin8" nam83411" d="L319" c4L394"> 39etting"block8 request 8ize for the queue8 445__inia="L4"> 3646lock__inias block/blk-sett/blketting"b_inia="L4"> 3646lock/blketting"b_inias.c#Lvoidsk_limits_io_opt" class="sref">bl8 ock/blk-8pan>
limits8tts-&8
q->=alignment_offs/blk
 3646lock/blk
q" name="L466"> 466maa low_pfn="L4"> 3646lock
q"+coid="L319" c4L394"> 39etting"block8tne" name85" id="L435" class="line8 name83ts. 3646lock/blk
q" name="L466"> 466maa pfn="L4"> 3646lock
q"+coid="L319" c4L394"> 39etting"block8t((EXPORT_SYMB8tings.c#L8 device can perform with8ut 3646locksubsyb_iniaa hls.c#L468" id="L468" clasetting"b_inia="L4"> 3646lock/blketting"b_inias.c#sid="L319" c4L394"> 39etting"block8t8ngs.c#L8disk drives this is ofte8 the<838s


The original LXR software byi7"35="L319" chttp://sourceforge.net/projecnL/lxr">LXR ss="un437rene" 7"is=experi"linal ="coion by5="L319" cmailto:lxr@ thux.no">lxr@ thux.norene.
lxr. thux.no kindly ho/aedLby5="L319" chttp://www.redpill- thpro.no">Redpill Lthpro ASrene" provider "> Lthux consultingiLnd5operas="cs ser" cls since 1995.