Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (33 commits) dm mpath: support discard dm stripe: support discards dm: split discard requests on target boundaries dm stripe: optimize sector division dm stripe: move sector translation to a function dm: error return error for discards dm delay: support discard dm: zero silently drop discards dm: use dm_target_offset macro dm: factor out max_io_len_target_boundary dm: use common __issue_target_request for flush and discard support dm: linear support discard dm crypt: simplify crypt_ctr dm crypt: simplify crypt_config destruction logic dm: allow autoloading of dm mod dm: rename map_info flush_request to target_request_nr dm ioctl: refactor dm_table_complete dm snapshot: implement merge dm: do not initialise full request queue when bio based dm ioctl: make bio or request based device type immutable ...
This commit is contained in:
@@ -22,7 +22,7 @@ typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
|
||||
union map_info {
|
||||
void *ptr;
|
||||
unsigned long long ll;
|
||||
unsigned flush_request;
|
||||
unsigned target_request_nr;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -174,12 +174,18 @@ struct dm_target {
|
||||
* A number of zero-length barrier requests that will be submitted
|
||||
* to the target for the purpose of flushing cache.
|
||||
*
|
||||
* The request number will be placed in union map_info->flush_request.
|
||||
* The request number will be placed in union map_info->target_request_nr.
|
||||
* It is a responsibility of the target driver to remap these requests
|
||||
* to the real underlying devices.
|
||||
*/
|
||||
unsigned num_flush_requests;
|
||||
|
||||
/*
|
||||
* The number of discard requests that will be submitted to the
|
||||
* target. map_info->request_nr is used just like num_flush_requests.
|
||||
*/
|
||||
unsigned num_discard_requests;
|
||||
|
||||
/* target specific data */
|
||||
void *private;
|
||||
|
||||
@@ -392,6 +398,12 @@ void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
|
||||
#define dm_array_too_big(fixed, obj, num) \
|
||||
((num) > (UINT_MAX - (fixed)) / (obj))
|
||||
|
||||
/*
|
||||
* Sector offset taken relative to the start of the target instead of
|
||||
* relative to the start of the device.
|
||||
*/
|
||||
#define dm_target_offset(ti, sector) ((sector) - (ti)->begin)
|
||||
|
||||
static inline sector_t to_sector(unsigned long n)
|
||||
{
|
||||
return (n >> SECTOR_SHIFT);
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#include <linux/types.h>
|
||||
|
||||
#define DM_DIR "mapper" /* Slashes not supported */
|
||||
#define DM_CONTROL_NODE "control"
|
||||
#define DM_MAX_TYPE_NAME 16
|
||||
#define DM_NAME_LEN 128
|
||||
#define DM_UUID_LEN 129
|
||||
@@ -266,9 +267,9 @@ enum {
|
||||
#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
|
||||
|
||||
#define DM_VERSION_MAJOR 4
|
||||
#define DM_VERSION_MINOR 17
|
||||
#define DM_VERSION_MINOR 18
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2010-03-05)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2010-06-29)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#define KVM_MINOR 232
|
||||
#define BTRFS_MINOR 234
|
||||
#define AUTOFS_MINOR 235
|
||||
#define MAPPER_CTRL_MINOR 236
|
||||
#define MISC_DYNAMIC_MINOR 255
|
||||
|
||||
struct device;
|
||||
|
Reference in New Issue
Block a user