linux/drivers/md/raid0.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
   raid0.c : Multiple Devices driver for Linux
	     Copyright (C) 1994-96 Marc ZYNGIER
	     <[email protected]> or
	     <[email protected]>
	     Copyright (C) 1999, 2000 Ingo Molnar, Red Hat

   RAID-0 management functions.

*/

#include <linux/blkdev.h>
#include <linux/seq_file.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <trace/events/block.h>
#include "md.h"
#include "raid0.h"
#include "raid5.h"

static int default_layout =;
module_param(default_layout, int, 0644);

#define UNSUPPORTED_MDDEV_FLAGS

/*
 * inform the user of the raid configuration
*/
static void dump_zones(struct mddev *mddev)
{}

static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
{}

/* Find the zone which holds a particular offset
 * Update *sectorp to be an offset in that zone
 */
static struct strip_zone *find_zone(struct r0conf *conf,
				    sector_t *sectorp)
{}

/*
 * remaps the bio to the target device. we separate two flows.
 * power 2 flow and a general flow for the sake of performance
*/
static struct md_rdev *map_sector(struct mddev *mddev, struct strip_zone *zone,
				sector_t sector, sector_t *sector_offset)
{}

static sector_t raid0_size(struct mddev *mddev, sector_t sectors, int raid_disks)
{}

static void raid0_free(struct mddev *mddev, void *priv)
{}

static int raid0_set_limits(struct mddev *mddev)
{}

static int raid0_run(struct mddev *mddev)
{}

/*
 * Convert disk_index to the disk order in which it is read/written.
 *  For example, if we have 4 disks, they are numbered 0,1,2,3. If we
 *  write the disks starting at disk 3, then the read/write order would
 *  be disk 3, then 0, then 1, and then disk 2 and we want map_disk_shift()
 *  to map the disks as follows 0,1,2,3 => 1,2,3,0. So disk 0 would map
 *  to 1, 1 to 2, 2 to 3, and 3 to 0. That way we can compare disks in
 *  that 'output' space to understand the read/write disk ordering.
 */
static int map_disk_shift(int disk_index, int num_disks, int disk_shift)
{}

static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
{}

static void raid0_map_submit_bio(struct mddev *mddev, struct bio *bio)
{}

static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
{}

static void raid0_status(struct seq_file *seq, struct mddev *mddev)
{}

static void raid0_error(struct mddev *mddev, struct md_rdev *rdev)
{}

static void *raid0_takeover_raid45(struct mddev *mddev)
{}

static void *raid0_takeover_raid10(struct mddev *mddev)
{}

static void *raid0_takeover_raid1(struct mddev *mddev)
{}

static void *raid0_takeover(struct mddev *mddev)
{}

static void raid0_quiesce(struct mddev *mddev, int quiesce)
{}

static struct md_personality raid0_personality=;

static int __init raid0_init (void)
{}

static void raid0_exit (void)
{}

module_init();
module_exit(raid0_exit);
MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_ALIAS(); /* RAID0 */
MODULE_ALIAS();
MODULE_ALIAS();