Source
x
{"raid4", "raid4 (dedicated first parity disk)", 1, 2, 5, ALGORITHM_PARITY_0}, /* raid4 layout = raid5_0 */
/*
* Copyright (C) 2010-2011 Neil Brown
* Copyright (C) 2010-2018 Red Hat, Inc. All rights reserved.
*
* This file is released under the GPL.
*/
/* md-raid kernel limit */
/*
* Minimum sectors of free reshape space per raid device
*/
/*
* Minimum journal space 4 MiB in sectors.
*/
static bool devices_handle_discard_safely = false;
/*
* The following flags are used by dm-raid.c to set up the array state.
* They must be cleared before md_run is called.
*/
/* rdev flag */
struct raid_dev {
/*
* Two DM devices, one to hold metadata and one to hold the
* actual data/parity. The reason for this is to not confuse
* ti->len and give more flexibility in altering size and
* characteristics.
*
* While it is possible for this device to be associated
* with a different physical device than the data_dev, it
* is intended for it to be the same.
* |--------- Physical Device ---------|
* |- meta_dev -|------ data_dev ------|
*/
struct dm_dev *meta_dev;
struct dm_dev *data_dev;
struct md_rdev rdev;
};
/*
* Bits for establishing rs->ctr_flags
*
* 1 = no flag value
* 2 = flag with value
*/
/* 1 */ /* Not with raid0! */
/* 1 */ /* Not with raid0! */
/* 2 */ /* Not with raid0! */
/* 2 */ /* Not with raid0! */
/* 2 */ /* Not with raid0! */
/* 2 */ /* Not with raid0! */
/* 2 */ /* Only with raid1! */
/* 2 */ /* Only with raid1! */
/* 2 */ /* Only with raid4/5/6! */
/* 2 */ /* Not with raid0! */
/* 2 */ /* Only with raid10 */
/* 2 */ /* Only with raid10 */
/* New for v1.9.0 */
/* 2 */ /* Only with reshapable raid1/4/5/6/10! */
/* 2 */ /* Only with reshapable raid4/5/6/10! */
/* 2 */ /* Only with raid10! */
/* New for v1.10.0 */
/* 2 */ /* Only with raid4/5/6 (journal device)! */
/* New for v1.11.1 */
/* 2 */ /* Only with raid4/5/6 (journal mode)! */
/*
* Flags for rs->ctr_flags field.
*/