~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/device-mapper/dm-io.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/device-mapper/dm-io.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/device-mapper/dm-io.rst (Version linux-5.1.21)


  1 =====                                             
  2 dm-io                                             
  3 =====                                             
  4                                                   
  5 Dm-io provides synchronous and asynchronous I/    
  6 types of I/O services available, and each type    
  7 version.                                          
  8                                                   
  9 The user must set up an io_region structure to    
 10 of the I/O. Each io_region indicates a block-d    
 11 sector and size of the region::                   
 12                                                   
 13    struct io_region {                             
 14       struct block_device *bdev;                  
 15       sector_t sector;                            
 16       sector_t count;                             
 17    };                                             
 18                                                   
 19 Dm-io can read from one io_region or write to     
 20 to multiple regions are specified by an array     
 21                                                   
 22 The first I/O service type takes a list of mem    
 23 the I/O, along with an offset into the first p    
 24                                                   
 25    struct page_list {                             
 26       struct page_list *next;                     
 27       struct page *page;                          
 28    };                                             
 29                                                   
 30    int dm_io_sync(unsigned int num_regions, st    
 31                   struct page_list *pl, unsign    
 32                   unsigned long *error_bits);     
 33    int dm_io_async(unsigned int num_regions, s    
 34                    struct page_list *pl, unsig    
 35                    io_notify_fn fn, void *cont    
 36                                                   
 37 The second I/O service type takes an array of     
 38 for the I/O. This service can be handy if the     
 39 but wants to direct different portions of the     
 40                                                   
 41    int dm_io_sync_bvec(unsigned int num_region    
 42                        int rw, struct bio_vec     
 43                        unsigned long *error_bi    
 44    int dm_io_async_bvec(unsigned int num_regio    
 45                         int rw, struct bio_vec    
 46                         io_notify_fn fn, void     
 47                                                   
 48 The third I/O service type takes a pointer to     
 49 data buffer for the I/O. This service can be h    
 50 I/O to a large region but doesn't want to allo    
 51 memory pages::                                    
 52                                                   
 53    int dm_io_sync_vm(unsigned int num_regions,    
 54                      void *data, unsigned long    
 55    int dm_io_async_vm(unsigned int num_regions    
 56                       void *data, io_notify_fn    
 57                                                   
 58 Callers of the asynchronous I/O services must     
 59 callback routine and a pointer to some context    
 60                                                   
 61    typedef void (*io_notify_fn)(unsigned long     
 62                                                   
 63 The "error" parameter in this callback, as wel    
 64 all of the synchronous versions, is a bitset (    
 65 In the case of an write-I/O to multiple region    
 66 indicate success or failure on each individual    
 67                                                   
 68 Before using any of the dm-io services, the us    
 69 and specify the number of pages they expect to    
 70 Dm-io will attempt to resize its mempool to ma    
 71 always available in order to avoid unnecessary    
 72                                                   
 73 When the user is finished using the dm-io serv    
 74 dm_io_put() and specify the same number of pag    
 75 dm_io_get() call.                                 
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php