BLK_MAKE_REQUEST - Online Linux Manual Page
Section : 9
Updated : June 2018
Source : Kernel Hackers Manual 2.6.
Note : Block Devices
                 
NAMEblk_make_request − given a bio, allocate a corresponding struct request. 
SYNOPSISstruct request * blk_make_request(struct request_queue * q, struct bio * bio, gfp_t gfp_mask); 
ARGUMENTSq target request queue bio The bio describing the memory mappings that will be submitted for IO. It may be a chained−bio properly constructed by block/bio layer. gfp_mask gfp flags to be used for memory allocation 
DESCRIPTIONblk_make_request is the parallel of generic_make_request for BLOCK_PC type commands. Where the struct request needs to be farther initialized by the caller. It is passed a struct bio, which describes the memory info of the I/O transfer. The caller of blk_make_request must make sure that bi_io_vec are set to describe the memory buffers. That bio_data_dir will return the needed direction of the request. (And all bio´s in the passed bio−chain are properly set accordingly) If called under none−sleepable conditions, mapped bio buffers must not need bouncing, by calling the appropriate masked or flagged allocator, suitable for the target device. Otherwise the call to blk_queue_bounce will BUG. 
WARNINGWhen allocating/cloning a bio−chain, careful consideration should be given to how you allocate bios. In particular, you cannot use __GFP_WAIT for anything but the first bio in the chain. Otherwise you risk waiting for IO completion of a bio that hasn´t been submitted yet, thus resulting in a deadlock. Alternatively bios should be allocated using bio_kmalloc instead of bio_alloc, as that avoids the mempool deadlock. If possible a big IO should be split into smaller parts when allocation fails. Partial allocation should not be an error, or you risk a live−lock. 
COPYRIGHT
 0  
   Johanes Gumabo   
 Data Size    :    6,000 byte 
man-blk_make_request.9Build    :     2025-03-22, 13:26     :     
Visitor Screen    :      x   
Visitor Counter  (  page  /  site  )     :     38  /  4,059,245  
Visitor ID    :        :     
Visitor IP    :     216.73.216.159     :     
Visitor Provider    :     AMAZON-02     :     
Provider Position  (  lat  x  lon  )     :     39.962500   x   -83.006100     :      x   
Provider Accuracy Radius  (  km  )     :     20     :     
Provider City    :     Columbus     :     
Provider Province    :     Ohio  ,     :     ,  
Provider Country    :     United States     :     
Provider Continent    :     North America     :     
Visitor Recorder    :    Version    :     
Visitor Recorder    :    Library    :     
Online Linux Manual Page    :    Version    :     Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 25.03.22  
Online Linux Manual Page    :    Library    :     lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40  
Online Linux Manual Page    :    Library    :     lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40  
Data Base    :    Version    :     Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38  
Data Base    :    Library    :     lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36  
  
 
    
  If error, please print screen and send to johanes_gumabo@yahoo.co.id
 Under development. Support me via PayPal.