-/* $OpenBSD: softraid.c,v 1.353 2015/05/20 15:21:57 pelikan Exp $ */
+/* $OpenBSD: softraid.c,v 1.354 2015/05/29 13:48:45 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
sr_meta_read(struct sr_discipline *sd)
{
struct sr_softc *sc = sd->sd_sc;
- struct sr_chunk_head *cl = &sd->sd_vol.sv_chunk_list;
+ struct sr_chunk_head *cl = &sd->sd_vol.sv_chunk_list;
struct sr_metadata *sm;
struct sr_chunk *ch_entry;
struct sr_meta_chunk *cp;
sr_meta_native_attach(struct sr_discipline *sd, int force)
{
struct sr_softc *sc = sd->sd_sc;
- struct sr_chunk_head *cl = &sd->sd_vol.sv_chunk_list;
+ struct sr_chunk_head *cl = &sd->sd_vol.sv_chunk_list;
struct sr_metadata *md = NULL;
struct sr_chunk *ch_entry, *ch_next;
struct sr_uuid uuid;
}
if (sd->sd_capabilities & SR_CAP_SYSTEM_DISK) {
-
/* Initialise volume state. */
sd->sd_set_vol_state(sd);
if (sd->sd_vol_status == BIOC_SVOFFLINE) {
sizeof(sd->sd_meta->ssd_devname));
sr_info(sc, "%s volume attached as %s",
- sd->sd_name, sd->sd_meta->ssd_devname);
+ sd->sd_name, sd->sd_meta->ssd_devname);
/* Update device name on any roaming chunks. */
sr_roam_chunks(sd);
if (states[BIOC_SDONLINE] == nd)
new_state = BIOC_SVONLINE;
- else
+ else
new_state = BIOC_SVOFFLINE;
DNPRINTF(SR_D_STATE, "%s: %s: sr_set_vol_state %d -> %d\n",
-/* $OpenBSD: softraid_raid5.c,v 1.18 2015/04/11 16:23:34 jsing Exp $ */
+/* $OpenBSD: softraid_raid5.c,v 1.19 2015/05/29 13:48:45 krw Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Regenerate a block on a RAID 5 volume by xoring the data and parity
* from all of the remaining online chunks. This requires the parity
* to already be correct.
- */
+ */
DNPRINTF(SR_D_DIS, "%s: %s sr_raid5_regenerate chunk %d offline, "
"regenerating block %llu\n",
-/* $OpenBSD: softraid_raid6.c,v 1.64 2015/03/14 03:38:46 jsg Exp $ */
+/* $OpenBSD: softraid_raid6.c,v 1.65 2015/05/29 13:48:45 krw Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
void
sr_raid6_xorq(void *q, void *d, int len, int gn)
{
- uint32_t *qbuf = q, *data = d, x;
- uint8_t *gn_map = gf_map[gn];
+ uint32_t *qbuf = q, *data = d, x;
+ uint8_t *gn_map = gf_map[gn];
len >>= 2;
while (len--) {
x = *data++;
*qbuf++ ^= (((uint32_t)gn_map[x & 0xff]) |
- ((uint32_t)gn_map[(x >> 8) & 0xff] << 8) |
+ ((uint32_t)gn_map[(x >> 8) & 0xff] << 8) |
((uint32_t)gn_map[(x >> 16) & 0xff] << 16) |
((uint32_t)gn_map[(x >> 24) & 0xff] << 24));
}