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

TOMOYO Linux Cross Reference
Linux/include/linux/dm-io.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/dm-io.h (Version linux-6.11.5) and /include/linux/dm-io.h (Version linux-6.7.12)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Copyright (C) 2003 Sistina Software              3  * Copyright (C) 2003 Sistina Software
  4  * Copyright (C) 2004 - 2008 Red Hat, Inc. All      4  * Copyright (C) 2004 - 2008 Red Hat, Inc. All rights reserved.
  5  *                                                  5  *
  6  * Device-Mapper low-level I/O.                     6  * Device-Mapper low-level I/O.
  7  *                                                  7  *
  8  * This file is released under the GPL.             8  * This file is released under the GPL.
  9  */                                                 9  */
 10                                                    10 
 11 #ifndef _LINUX_DM_IO_H                             11 #ifndef _LINUX_DM_IO_H
 12 #define _LINUX_DM_IO_H                             12 #define _LINUX_DM_IO_H
 13                                                    13 
 14 #ifdef __KERNEL__                                  14 #ifdef __KERNEL__
 15                                                    15 
 16 #include <linux/types.h>                           16 #include <linux/types.h>
 17 #include <linux/blk_types.h>                       17 #include <linux/blk_types.h>
 18                                                    18 
 19 struct dm_io_region {                              19 struct dm_io_region {
 20         struct block_device *bdev;                 20         struct block_device *bdev;
 21         sector_t sector;                           21         sector_t sector;
 22         sector_t count;         /* If this is      22         sector_t count;         /* If this is zero the region is ignored. */
 23 };                                                 23 };
 24                                                    24 
 25 struct page_list {                                 25 struct page_list {
 26         struct page_list *next;                    26         struct page_list *next;
 27         struct page *page;                         27         struct page *page;
 28 };                                                 28 };
 29                                                    29 
 30 typedef void (*io_notify_fn)(unsigned int long     30 typedef void (*io_notify_fn)(unsigned int long error, void *context);
 31                                                    31 
 32 enum dm_io_mem_type {                              32 enum dm_io_mem_type {
 33         DM_IO_PAGE_LIST,/* Page list */            33         DM_IO_PAGE_LIST,/* Page list */
 34         DM_IO_BIO,      /* Bio vector */           34         DM_IO_BIO,      /* Bio vector */
 35         DM_IO_VMA,      /* Virtual memory area     35         DM_IO_VMA,      /* Virtual memory area */
 36         DM_IO_KMEM,     /* Kernel memory */        36         DM_IO_KMEM,     /* Kernel memory */
 37 };                                                 37 };
 38                                                    38 
 39 struct dm_io_memory {                              39 struct dm_io_memory {
 40         enum dm_io_mem_type type;                  40         enum dm_io_mem_type type;
 41                                                    41 
 42         unsigned int offset;                       42         unsigned int offset;
 43                                                    43 
 44         union {                                    44         union {
 45                 struct page_list *pl;              45                 struct page_list *pl;
 46                 struct bio *bio;                   46                 struct bio *bio;
 47                 void *vma;                         47                 void *vma;
 48                 void *addr;                        48                 void *addr;
 49         } ptr;                                     49         } ptr;
 50 };                                                 50 };
 51                                                    51 
 52 struct dm_io_notify {                              52 struct dm_io_notify {
 53         io_notify_fn fn;        /* Callback fo     53         io_notify_fn fn;        /* Callback for asynchronous requests */
 54         void *context;          /* Passed to c     54         void *context;          /* Passed to callback */
 55 };                                                 55 };
 56                                                    56 
 57 /*                                                 57 /*
 58  * IO request structure                            58  * IO request structure
 59  */                                                59  */
 60 struct dm_io_client;                               60 struct dm_io_client;
 61 struct dm_io_request {                             61 struct dm_io_request {
 62         blk_opf_t           bi_opf;     /* Req     62         blk_opf_t           bi_opf;     /* Request type and flags */
 63         struct dm_io_memory mem;        /* Mem     63         struct dm_io_memory mem;        /* Memory to use for io */
 64         struct dm_io_notify notify;     /* Syn     64         struct dm_io_notify notify;     /* Synchronous if notify.fn is NULL */
 65         struct dm_io_client *client;    /* Cli     65         struct dm_io_client *client;    /* Client memory handler */
 66 };                                                 66 };
 67                                                    67 
 68 /*                                                 68 /*
 69  * For async io calls, users can alternatively     69  * For async io calls, users can alternatively use the dm_io() function below
 70  * and dm_io_client_create() to create private     70  * and dm_io_client_create() to create private mempools for the client.
 71  *                                                 71  *
 72  * Create/destroy may block.                       72  * Create/destroy may block.
 73  */                                                73  */
 74 struct dm_io_client *dm_io_client_create(void)     74 struct dm_io_client *dm_io_client_create(void);
 75 void dm_io_client_destroy(struct dm_io_client      75 void dm_io_client_destroy(struct dm_io_client *client);
 76                                                    76 
 77 /*                                                 77 /*
 78  * IO interface using private per-client pools     78  * IO interface using private per-client pools.
 79  * Each bit in the optional 'sync_error_bits'      79  * Each bit in the optional 'sync_error_bits' bitset indicates whether an
 80  * error occurred doing io to the correspondin     80  * error occurred doing io to the corresponding region.
 81  */                                                81  */
 82 int dm_io(struct dm_io_request *io_req, unsign     82 int dm_io(struct dm_io_request *io_req, unsigned int num_regions,
 83           struct dm_io_region *region, unsigne     83           struct dm_io_region *region, unsigned int long *sync_error_bits,
 84           unsigned short ioprio);                  84           unsigned short ioprio);
 85                                                    85 
 86 #endif  /* __KERNEL__ */                           86 #endif  /* __KERNEL__ */
 87 #endif  /* _LINUX_DM_IO_H */                       87 #endif  /* _LINUX_DM_IO_H */
 88                                                    88 

~ [ 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