projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
<linux/hdsmart.h> is not used by kernel code
[powerpc.git]
/
include
/
linux
/
device-mapper.h
diff --git
a/include/linux/device-mapper.h
b/include/linux/device-mapper.h
index
e3d1c33
..
e765e19
100644
(file)
--- a/
include/linux/device-mapper.h
+++ b/
include/linux/device-mapper.h
@@
-39,7
+39,8
@@
typedef void (*dm_dtr_fn) (struct dm_target *ti);
* The map function must return:
* < 0: error
* = 0: The target will handle the io by resubmitting it later
* The map function must return:
* < 0: error
* = 0: The target will handle the io by resubmitting it later
- * > 0: simple remap complete
+ * = 1: simple remap complete
+ * = 2: The target wants to push back the io
*/
typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio,
union map_info *map_context);
*/
typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio,
union map_info *map_context);
@@
-50,13
+51,16
@@
typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio,
* 0 : ended successfully
* 1 : for some reason the io has still not completed (eg,
* multipath target might want to requeue a failed io).
* 0 : ended successfully
* 1 : for some reason the io has still not completed (eg,
* multipath target might want to requeue a failed io).
+ * 2 : The target wants to push back the io
*/
typedef int (*dm_endio_fn) (struct dm_target *ti,
struct bio *bio, int error,
union map_info *map_context);
*/
typedef int (*dm_endio_fn) (struct dm_target *ti,
struct bio *bio, 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 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,
typedef void (*dm_resume_fn) (struct dm_target *ti);
typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
@@
-64,8
+68,17
@@
typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type,
typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
typedef int (*dm_message_fn) (struct dm_target *ti, unsigned argc, char **argv);
+typedef int (*dm_ioctl_fn) (struct dm_target *ti, struct inode *inode,
+ struct file *filp, unsigned int cmd,
+ unsigned long arg);
+
void dm_error(const char *message);
void dm_error(const char *message);
+/*
+ * Combine device limits.
+ */
+void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev);
+
/*
* Constructors should call these functions to ensure destination devices
* are opened/closed correctly.
/*
* Constructors should call these functions to ensure destination devices
* are opened/closed correctly.
@@
-86,11
+99,14
@@
struct target_type {
dm_dtr_fn dtr;
dm_map_fn map;
dm_endio_fn end_io;
dm_dtr_fn dtr;
dm_map_fn map;
dm_endio_fn end_io;
+ dm_flush_fn flush;
dm_presuspend_fn presuspend;
dm_postsuspend_fn postsuspend;
dm_presuspend_fn presuspend;
dm_postsuspend_fn postsuspend;
+ dm_preresume_fn preresume;
dm_resume_fn resume;
dm_status_fn status;
dm_message_fn message;
dm_resume_fn resume;
dm_status_fn status;
dm_message_fn message;
+ dm_ioctl_fn ioctl;
};
struct io_restrictions {
};
struct io_restrictions {
@@
-99,7
+115,9
@@
struct io_restrictions {
unsigned short max_hw_segments;
unsigned short hardsect_size;
unsigned int max_segment_size;
unsigned short max_hw_segments;
unsigned short hardsect_size;
unsigned int max_segment_size;
+ unsigned int max_hw_sectors;
unsigned long seg_boundary_mask;
unsigned long seg_boundary_mask;
+ unsigned long bounce_pfn;
unsigned char no_cluster; /* inverted so that 0 is default */
};
unsigned char no_cluster; /* inverted so that 0 is default */
};
@@
-159,7
+177,7
@@
void *dm_get_mdptr(struct mapped_device *md);
/*
* A device can still be used while suspended, but I/O is deferred.
*/
/*
* A device can still be used while suspended, but I/O is deferred.
*/
-int dm_suspend(struct mapped_device *md,
int with_lockf
s);
+int dm_suspend(struct mapped_device *md,
unsigned suspend_flag
s);
int dm_resume(struct mapped_device *md);
/*
int dm_resume(struct mapped_device *md);
/*
@@
-167,13
+185,17
@@
int dm_resume(struct mapped_device *md);
*/
uint32_t dm_get_event_nr(struct mapped_device *md);
int dm_wait_event(struct mapped_device *md, int event_nr);
*/
uint32_t dm_get_event_nr(struct mapped_device *md);
int dm_wait_event(struct mapped_device *md, int event_nr);
+uint32_t dm_next_uevent_seq(struct mapped_device *md);
+void dm_uevent_add(struct mapped_device *md, struct list_head *elist);
/*
* Info functions.
*/
const char *dm_device_name(struct mapped_device *md);
/*
* Info functions.
*/
const char *dm_device_name(struct mapped_device *md);
+int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
struct gendisk *dm_disk(struct mapped_device *md);
int dm_suspended(struct mapped_device *md);
struct gendisk *dm_disk(struct mapped_device *md);
int dm_suspended(struct mapped_device *md);
+int dm_noflush_suspending(struct dm_target *ti);
/*
* Geometry functions.
/*
* Geometry functions.