dm raid: add raid4/5/6 journal mode support
Subsystems (2)
PATCH 2/2 dm raid: add raid4/5/6 journal mode support
From: Heinz Mauelshagen <[email protected]>
Upstream commit 7a771ceac771d009f7203c40b256b0608d7ea2f8 added journal support to close the raid4/5/6 "write hole".
Uitilizing prerequisite
"md: add raid4/5/6 journal mode API (for dm-raid use)", add support to switch the journal device cache mode between write-through (the current default) and write-back using the new r5c_journal_mode_set() API.
Mind in case of journal device failures the former 'only' causes the "write hole" to reoccur but the latter (i.e. "write-back") will cause data loss with dirty cache entries thus requiring resilient storage.
Signed-off-by Heinz Mauelshagen <[email protected]>
--- Documentation/device-mapper/dm-raid.txt | 12 +++- drivers/md/dm-raid.c | 104 ++++++++++++++++++++++++++++---- 2 files changed, 102 insertions(+), 14 deletions(-)
Documentation/device-mapper/dm-raid.txt +11 -1
@@ -170,6 +170,14 @@ The target is named "raid" and it accepts the following parameters: Takeover/reshape is not possible with a raid4/5/6 journal device; it has to be deconfigured before requesting these. + [journal_mode <mode>] + This option sets the caching mode an journaled raid4/5/6 raid sets + (see 'journal_dev <dev>' above) to 'writethrough' or 'writeback'. + In case 'writeback' is selected the journal device has to be + resilient and obviously may not suffer from the 'write hole' + problem itself (e.g. use raid1/raid10) to avoid a single + point of failure. + <#raid_devs>: The number of devices composing the array. Each device consists of two entries. The first is the device containing the metadata (if any); the second is the one containing the
@@ -254,7 +262,8 @@ recovery. Here is a fuller description of the individual fields: <data_offset> The current data offset to the start of the user data on each component device of a raid set (see the respective raid parameter to support out-of-place reshaping). - <journal_char> 'A' - active raid4/5/6 journal device. + <journal_char> 'A' - active write-through journal device. + 'a' - active write-back journal device. 'D' - dead journal device. '-' - no journal device.
@@ -334,3 +343,4 @@ Version History 1.10.1 Fix data corruption on reshape request 1.11.0 Fix table line argument order (wrong raid10_copies/raid10_format sequence) +1.11.1 Add support for raid4/5/6 journal mode
drivers/md/dm-raid.c +91 -13
223 lines not on this page · raw message
Signature · 1 line
2.9.3