diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2011-09-28 06:18:45 -0400 |
---|---|---|
committer | Boaz Harrosh <bharrosh@panasas.com> | 2011-10-14 12:54:41 -0400 |
commit | 5a51c0c7e9a913649aa65d8233470682bcbb7694 (patch) | |
tree | 4ed43b3a2f9fade227e098771a5bed66f6a71dc4 /include/scsi/osd_ore.h | |
parent | 3bd9856857339d7ee8c4ad50030583f1b9415c39 (diff) |
ore/exofs: Define new ore_verify_layout
All users of the ore will need to check if current code
supports the given layout. For example RAID5/6 is not
currently supported.
So move all the checks from exofs/super.c to a new
ore_verify_layout() to be used by ore users.
Note that any new layout should be passed through the
ore_verify_layout() because the ore engine will prepare
and verify some internal members of ore_layout, and
assumes it's called.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'include/scsi/osd_ore.h')
-rw-r--r-- | include/scsi/osd_ore.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/osd_ore.h b/include/scsi/osd_ore.h index 492b70d43bb6..716dbeae8cd2 100644 --- a/include/scsi/osd_ore.h +++ b/include/scsi/osd_ore.h | |||
@@ -42,6 +42,13 @@ struct ore_layout { | |||
42 | unsigned group_width; | 42 | unsigned group_width; |
43 | u64 group_depth; | 43 | u64 group_depth; |
44 | unsigned group_count; | 44 | unsigned group_count; |
45 | |||
46 | /* Cached often needed calculations filled in by | ||
47 | * ore_verify_layout | ||
48 | */ | ||
49 | unsigned long max_io_length; /* Max length that should be passed to | ||
50 | * ore_get_rw_state | ||
51 | */ | ||
45 | }; | 52 | }; |
46 | 53 | ||
47 | struct ore_dev { | 54 | struct ore_dev { |
@@ -138,6 +145,7 @@ static inline unsigned ore_io_state_size(unsigned numdevs) | |||
138 | } | 145 | } |
139 | 146 | ||
140 | /* ore.c */ | 147 | /* ore.c */ |
148 | int ore_verify_layout(unsigned total_comps, struct ore_layout *layout); | ||
141 | int ore_get_rw_state(struct ore_layout *layout, struct ore_components *comps, | 149 | int ore_get_rw_state(struct ore_layout *layout, struct ore_components *comps, |
142 | bool is_reading, u64 offset, u64 length, | 150 | bool is_reading, u64 offset, u64 length, |
143 | struct ore_io_state **ios); | 151 | struct ore_io_state **ios); |