Device-mapper updates for 3.6:
- Flip the thin target into new read-only or failed modes if errors are detected; - Handle chunk sizes that are not powers of two in the snapshot and thin targets; - Provide a way for userspace to avoid replacing an already-loaded multipath hardware handler while booting; - Reduce dm_thin_endio_hook slab size to avoid allocation failures; - Numerous small changes and cleanups to the code. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJQFoJTAAoJEK2W1qbAHj1nh2MP/2c461igABbx6kAJMhSCm+Zo xiZ97r3dFx4l4+myCfC5dQE+x07zFzPh1r/E1Dk5QXfEMRrpxzyysUGK4rtVwdPF t4V5jgu5mOO2E1Gk4cmPjYAG+n198P7b+eiMMP0hms8t4kbXaaRfCDklY7sxvOo2 eOdUp/tAPkQWnflHEj7yPHH2WZNrD4MW8OiGnFt22kFwe9RKcm2zPavO8XrnMnco FiRCahIW1LV+8kPtpNksy1DjTjafJ7S19lNFPC7ZChFN1MKxlIcTJ95XDKqbXAsc eU2hTc9yBZEp1Fy3dvqoZ3g1YZB7zg2yi6wmIRLuYVuu4W7BQczfCa3VN5+s3fs9 oX2gDnu5GPDcd/FAUeDQRZLScw8dHOIaubDeqMZ4GYA1ns1BliMotArlew13D9/S YFIrGaMmN2jcmlwNqfzjT4UJUbHnE8lr5FcLixopGmfWl1bc3FkQZ7eXnWBgGX6P X2SaAgvvEoyEjomDbM+TdnLglBb7GLCer9grOoqw+Y2z6k9RqQTISo6LOQ0Gh1U9 nr1rAaHehFuAOl1BI8BO2CdAtjdybNXrtanfoLaHorECGHkEwojNIfvhHu3Io/YL gbXlgY4v0j8Bb4xLJkdOsJxD2d5ACzTFPrY61/ApW5TOYn8rBYLSrmJRuIBAr8Cs Fqd0D/wywFhK9di+4Bxw =O9sO -----END PGP SIGNATURE----- Merge tag 'dm-3.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm Pull device-mapper updates from Alasdair G Kergon: - Flip the thin target into new read-only or failed modes if errors are detected; - Handle chunk sizes that are not powers of two in the snapshot and thin targets; - Provide a way for userspace to avoid replacing an already-loaded multipath hardware handler while booting; - Reduce dm_thin_endio_hook slab size to avoid allocation failures; - Numerous small changes and cleanups to the code. * tag 'dm-3.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: (63 commits) dm thin: commit before gathering status dm thin: add read only and fail io modes dm thin metadata: introduce dm_pool_abort_metadata dm thin metadata: introduce dm_pool_metadata_set_read_only dm persistent data: introduce dm_bm_set_read_only dm thin: reduce number of metadata commits dm thin metadata: add dm_thin_changed_this_transaction dm thin metadata: add format option to dm_pool_metadata_open dm thin metadata: tidy up open and format error paths dm thin metadata: only check incompat features on open dm thin metadata: remove duplicate pmd initialisation dm thin metadata: remove create parameter from __create_persistent_data_objects dm thin metadata: move __superblock_all_zeroes to __open_or_format_metadata dm thin metadata: remove nr_blocks arg from __create_persistent_data_objects dm thin metadata: split __open or format metadata dm thin metadata: use struct dm_pool_metadata members in __open_or_format_metadata dm thin metadata: zero unused superblock uuid dm thin metadata: lift __begin_transaction out of __write_initial_superblock dm thin metadata: move dm_commit_pool_metadata into __write_initial_superblock dm thin metadata: factor out __write_initial_superblock ...
This commit is contained in:
commit
7272c30b6f
33 changed files with 1382 additions and 1324 deletions
|
|
@ -66,14 +66,13 @@ typedef int (*dm_request_endio_fn) (struct dm_target *ti,
|
|||
struct request *clone, int error,
|
||||
union map_info *map_context);
|
||||
|
||||
typedef void (*dm_flush_fn) (struct dm_target *ti);
|
||||
typedef void (*dm_presuspend_fn) (struct dm_target *ti);
|
||||
typedef void (*dm_postsuspend_fn) (struct dm_target *ti);
|
||||
typedef int (*dm_preresume_fn) (struct dm_target *ti);
|
||||
typedef void (*dm_resume_fn) (struct dm_target *ti);
|
||||
|
||||
typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
|
||||
char *result, unsigned int maxlen);
|
||||
unsigned status_flags, char *result, unsigned maxlen);
|
||||
|
||||
typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
|
||||
|
||||
|
|
@ -139,7 +138,6 @@ struct target_type {
|
|||
dm_map_request_fn map_rq;
|
||||
dm_endio_fn end_io;
|
||||
dm_request_endio_fn rq_end_io;
|
||||
dm_flush_fn flush;
|
||||
dm_presuspend_fn presuspend;
|
||||
dm_postsuspend_fn postsuspend;
|
||||
dm_preresume_fn preresume;
|
||||
|
|
@ -188,8 +186,8 @@ struct dm_target {
|
|||
sector_t begin;
|
||||
sector_t len;
|
||||
|
||||
/* Always a power of 2 */
|
||||
sector_t split_io;
|
||||
/* If non-zero, maximum size of I/O submitted to a target. */
|
||||
uint32_t max_io_len;
|
||||
|
||||
/*
|
||||
* A number of zero-length barrier requests that will be submitted
|
||||
|
|
@ -213,16 +211,28 @@ struct dm_target {
|
|||
/* Used to provide an error string from the ctr */
|
||||
char *error;
|
||||
|
||||
/*
|
||||
* Set if this target needs to receive flushes regardless of
|
||||
* whether or not its underlying devices have support.
|
||||
*/
|
||||
bool flush_supported:1;
|
||||
|
||||
/*
|
||||
* Set if this target needs to receive discards regardless of
|
||||
* whether or not its underlying devices have support.
|
||||
*/
|
||||
unsigned discards_supported:1;
|
||||
bool discards_supported:1;
|
||||
|
||||
/*
|
||||
* Set if the target required discard request to be split
|
||||
* on max_io_len boundary.
|
||||
*/
|
||||
bool split_discard_requests:1;
|
||||
|
||||
/*
|
||||
* Set if this target does not return zeroes on discarded blocks.
|
||||
*/
|
||||
unsigned discard_zeroes_data_unsupported:1;
|
||||
bool discard_zeroes_data_unsupported:1;
|
||||
};
|
||||
|
||||
/* Each target can link one of these into the table */
|
||||
|
|
@ -359,6 +369,11 @@ void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callback
|
|||
*/
|
||||
int dm_table_complete(struct dm_table *t);
|
||||
|
||||
/*
|
||||
* Target may require that it is never sent I/O larger than len.
|
||||
*/
|
||||
int __must_check dm_set_target_max_io_len(struct dm_target *ti, sector_t len);
|
||||
|
||||
/*
|
||||
* Table reference counting.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -267,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 22
|
||||
#define DM_VERSION_MINOR 23
|
||||
#define DM_VERSION_PATCHLEVEL 0
|
||||
#define DM_VERSION_EXTRA "-ioctl (2011-10-19)"
|
||||
#define DM_VERSION_EXTRA "-ioctl (2012-07-25)"
|
||||
|
||||
/* Status bits */
|
||||
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
|
||||
|
|
@ -307,6 +307,8 @@ enum {
|
|||
|
||||
/*
|
||||
* Set this to suspend without flushing queued ios.
|
||||
* Also disables flushing uncommitted changes in the thin target before
|
||||
* generating statistics for DM_TABLE_STATUS and DM_DEV_WAIT.
|
||||
*/
|
||||
#define DM_NOFLUSH_FLAG (1 << 11) /* In */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue