summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorAlexey Obitotskiy <aleksey.obitotskiy@intel.com>2017-05-09 12:25:47 +0200
committerJes Sorensen <jsorensen@fb.com>2017-05-09 14:18:38 -0400
commit4b57ecf6cea134edff75a2f3a87ee48d52715c70 (patch)
treed2512f0cb65715f863ab3930c2e453859a9886e7 /mdadm.h
parentfbfdcb06dc5b1dcb227b0394f174faa2df734700 (diff)
downloadmdadm-4b57ecf6cea134edff75a2f3a87ee48d52715c70.tar.gz
Add sector size as spare selection criterion
Add sector size as new spare selection criterion. Assume that 0 means there is no requirement for the sector size in the array. Skip disks with unsuitable sector size when looking for a spare to move across containers. Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com> Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 8da7fd3..ec0a39e 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -363,6 +363,7 @@ struct createinfo {
struct spare_criteria {
unsigned long long min_size;
+ unsigned int sector_size;
};
enum mode {
@@ -947,6 +948,7 @@ extern struct superswitch {
/*
* Return spare criteria for array:
* - minimum disk size can be used in array;
+ * - sector size can be used in array.
* Return values: 0 - for success and -EINVAL on error.
*/
int (*get_spare_criteria)(struct supertype *st,
@@ -1189,6 +1191,7 @@ extern int get_dev_size(int fd, char *dname, unsigned long long *sizep);
extern int get_dev_sector_size(int fd, char *dname, unsigned int *sectsizep);
extern int must_be_container(int fd);
extern int dev_size_from_id(dev_t id, unsigned long long *size);
+extern int dev_sector_size_from_id(dev_t id, unsigned int *size);
void wait_for(char *dev, int fd);
/*