Lines 973-979
static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone);
Link Here
|
973 |
|
973 |
|
974 |
/* |
974 |
/* |
975 |
* Generate a new unfragmented bio with the given size |
975 |
* Generate a new unfragmented bio with the given size |
976 |
* This should never violate the device limitations |
976 |
* This should never violate the device limitations (but only because |
|
|
977 |
* max_segment_size is being constrained to PAGE_SIZE). |
977 |
* |
978 |
* |
978 |
* This function may be called concurrently. If we allocate from the mempool |
979 |
* This function may be called concurrently. If we allocate from the mempool |
979 |
* concurrently, there is a possibility of deadlock. For example, if we have |
980 |
* concurrently, there is a possibility of deadlock. For example, if we have |
Lines 2057-2065
static int crypt_iterate_devices(struct dm_target *ti,
Link Here
|
2057 |
return fn(ti, cc->dev, cc->start, ti->len, data); |
2058 |
return fn(ti, cc->dev, cc->start, ti->len, data); |
2058 |
} |
2059 |
} |
2059 |
|
2060 |
|
|
|
2061 |
static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits) |
2062 |
{ |
2063 |
/* |
2064 |
* Unfortunate constraint that is required to avoid the potential |
2065 |
* for exceeding underlying device's max_segments limits -- due to |
2066 |
* crypt_alloc_buffer() possibly allocating pages for the encryption |
2067 |
* bio that are not as physically contiguous as the original bio. |
2068 |
*/ |
2069 |
limits->max_segment_size = PAGE_SIZE; |
2070 |
} |
2071 |
|
2060 |
static struct target_type crypt_target = { |
2072 |
static struct target_type crypt_target = { |
2061 |
.name = "crypt", |
2073 |
.name = "crypt", |
2062 |
.version = {1, 14, 0}, |
2074 |
.version = {1, 14, 1}, |
2063 |
.module = THIS_MODULE, |
2075 |
.module = THIS_MODULE, |
2064 |
.ctr = crypt_ctr, |
2076 |
.ctr = crypt_ctr, |
2065 |
.dtr = crypt_dtr, |
2077 |
.dtr = crypt_dtr, |
Lines 2071-2076
static struct target_type crypt_target = {
Link Here
|
2071 |
.message = crypt_message, |
2083 |
.message = crypt_message, |
2072 |
.merge = crypt_merge, |
2084 |
.merge = crypt_merge, |
2073 |
.iterate_devices = crypt_iterate_devices, |
2085 |
.iterate_devices = crypt_iterate_devices, |
|
|
2086 |
.io_hints = crypt_io_hints, |
2074 |
}; |
2087 |
}; |
2075 |
|
2088 |
|
2076 |
static int __init dm_crypt_init(void) |
2089 |
static int __init dm_crypt_init(void) |
2077 |
- |
|
|