Lines Matching defs:raid

20 #define DM_MSG_PREFIX "raid"
21 #define MAX_RAID_DEVICES 253 /* md-raid kernel limit */
24 * Minimum sectors of free reshape space per raid device
36 * The following flags are used by dm-raid to set up the array state.
112 * per raid level.
137 /* Valid options definitions per raid level... */
197 /* ...valid options definitions per raid level */
205 * the raid set all over again.
222 * raid set level, layout and chunk sectors backup/restore
285 /* Supported raid types and properties. */
362 /* Define correlation of raid456 journal cache modes and dm-raid target line parameters */
383 /* Return dm-raid raid4/5/6 journal mode string for @mode */
396 * Bool helpers to test for various raid levels of a raid set.
400 /* Return true, if raid set in @rs is raid0 */
406 /* Return true, if raid set in @rs is raid1 */
412 /* Return true, if raid set in @rs is raid10 */
418 /* Return true, if raid set in @rs is level 6 */
424 /* Return true, if raid set in @rs is level 4, 5 or 6 */
430 /* Return true, if raid set in @rs is reshapable */
438 /* Return true, if raid set in @rs is recovering */
444 /* Return true, if raid set in @rs is reshaping */
451 * bool helpers to test for various raid levels of a raid type @rt
454 /* Return true, if raid type in @rt is raid0 */
460 /* Return true, if raid type in @rt is raid1 */
466 /* Return true, if raid type in @rt is raid10 */
472 /* Return true, if raid type in @rt is raid4/5 */
478 /* Return true, if raid type in @rt is raid6 */
484 /* Return true, if raid type in @rt is raid4/5/6 */
489 /* END: raid level bools */
491 /* Return valid ctr flags for the raid level of @rs */
749 ti->error = "Cannot allocate raid context";
755 ti->error = "Cannot initialize raid context";
834 /* Put off the number of raid devices argument to get to dev pairs */
1196 rs->ti->error = "Not enough raid parameters given";
1225 rs->ti->error = "Wrong number of raid parameters given";
1308 rs->ti->error = "Bad numerical argument given in raid params";
1316 * devices on raid level takeover.
1392 /* Define the +/-# of disks to add to/remove from the given raid set */
1397 /* Ensure MAX_RAID_DEVICES and raid type minimal_devs! */
1536 /* Check, if any invalid ctr arguments have been passed in for the raid level */
1550 rs->ti->error = "Inappropriate raid level; cannot change stripe_cache size";
1593 * Retrieve rdev->sectors from any valid raid device of @rs
1694 * Other raid set types may skip recovery
1718 * Conversions of raid sets from one MD personality to another
1727 rs->ti->error = "Can't takeover degraded raid set";
1732 rs->ti->error = "Can't takeover reshaping raid set";
1765 /* Can takeover raid10_near with raid disks divisable by data copies! */
1936 __le32 num_devices; /* Number of devices in this raid set. (Max 64) */
1937 __le32 array_position; /* The position of this drive in the raid set */
1950 * This offset tracks the progress of the initial raid set
1956 * raid characteristics
1971 * This offset tracks the progress of a raid
2009 * Check for reshape constraints on raid set @rs:
2026 rs->ti->error = "Can't reshape degraded raid set";
2028 rs->ti->error = "Convert request on recovering raid set prohibited";
2030 rs->ti->error = "raid set already reshaping!";
2084 * Synchronize the superblock members with the raid set properties
2246 /* Superblock is authoritative wrt given raid set layout! */
2253 /* raid was reshaping and got interrupted */
2256 DMERR("Reshape requested but raid set is still reshaping");
2279 DMERR("Takeover raid sets from %s to %s not yet supported by metadata. (raid level change)",
2282 DMERR("Takeover raid sets not yet supported by metadata. (raid level change)");
2285 DMERR("Reshaping raid sets not yet supported by metadata. (raid layout change keeping level)");
2320 * 1) The raid set is brand new - in which case, all of the
2323 * 2) This is a new device being added to an old raid set
2328 * raid set during takeover to a higher raid level
2330 * to add capacity to grow the raid set.
2352 DMINFO("Superblocks created for new raid set");
2356 DMERR("New device injected into existing raid set without "
2362 " a raid set with %u other first-time devices",
2371 DMERR("'rebuild' specified while raid set is not in-sync (recovery_cp=%llu)",
2375 DMERR("'rebuild' specified while raid set is being reshaped (reshape_position=%llu)",
2416 rs->ti->error = "Cannot change device positions in raid set";
2420 DMINFO("raid device #%d now at position #%d", role, r->raid_disk);
2598 * We need free space at the beginning of each raid disk for forward
2709 * Setup @rs for takeover by a different raid level
2767 * raid disk have to be multiple of data copies to allow this conversion,
2800 rs->ti->error = "Called with bogus raid type";
2814 /* Get reshape sectors from data_offsets or raid set */
2833 * - change raid layout
2978 DMERR("Set dm-raid.devices_handle_discard_safely=Y to override.");
3012 { 0, as.argc, "Cannot understand number of raid parameters" },
3013 { 1, 254, "Cannot understand number of raid devices parameters" }
3032 /* number of raid device tupples <meta_dev data_dev> */
3040 ti->error = "Invalid number of supplied raid devices";
3068 /* Memorize just calculated, potentially larger sizes to grow the raid set in preresume */
3073 * Backup any new raid set level, layout, ...
3111 * to be reshaped or an existing, unchanged raid set to
3126 /* A recovering raid set may be resized */
3131 ti->error = "Can't resize a reshaping raid set";
3138 ti->error = "Can't takeover a reshaping raid set";
3155 * one, prohibit requesting recovery, allow the raid
3171 /* Only request grow on raid set size extensions, not on reshapes. */
3190 * raid set needs to run to provide the repective reshape
3212 * Set raid set to current size, i.e. size as of
3240 /* Start raid set read-only and assumed clean to change in raid_resume() */
3253 ti->error = "Failed to run raid array";
3260 ti->error = "Failed to start raid array";
3300 /* Disable/enable discard support on raid set. */
3339 * data images thus erroring the raid set.
3404 * 'D' = Dead/Failed raid set component or raid4/5/6 journal device
3405 * 'a' = Alive but not in-sync raid set component _or_ alive raid4/5/6 'write_back' journal device
3406 * 'A' = Alive and in-sync raid set component _or_ alive raid4/5/6 'write_through' journal device
3425 /* Helper to return resync/reshape progress for @rs and runtime flags for raid set in sync / resynching */
3464 * If "resync/reshape" is occurring, the raid set
3472 * If "check" or "repair" is occurring, the raid set has
3487 * We are idle and the raid set may be doing an initial
3489 * If all the devices are In_sync, then it is the raid set
3539 /* Get sensible max sectors even if raid set not yet started */
3555 * - Initializing the raid set
3556 * - Rebuilding a subset of devices of the raid set
3561 * changing the raid layout or the number of
3562 * disks of a raid set
3571 * See Documentation/admin-guide/device-mapper/dm-raid.rst for
3581 * performing a "check" of the raid set.
3592 * We keep data_offset equal on all raid disks of the set,
3593 * so retrieving it from the first raid disk is sufficient.
3605 /* Report the table line string you would use to construct this raid set */
3617 /* Calculate raid parameter count based on ^ rebuild/writemostly argument counts and ctr flags set. */
3964 * Reshape changes raid algorithm of @rs to new one within personality
3966 * disks from a raid set thus growing/shrinking it or resizes the set
4040 /* We are extending the raid set size, adjust mddev/md_rdev sizes and set capacity. */
4068 /* Check for any reshape request unless new raid set */
4100 /* Only reduce raid set size before running a disk removing reshape. */
4116 .name = "raid",
4132 module_dm(raid);