Lines 1075-1097
g_raid_candelete(struct g_raid_softc *sc, struct bio *bp)
Link Here
|
1075 |
struct g_provider *pp; |
1075 |
struct g_provider *pp; |
1076 |
struct g_raid_volume *vol; |
1076 |
struct g_raid_volume *vol; |
1077 |
struct g_raid_subdisk *sd; |
1077 |
struct g_raid_subdisk *sd; |
1078 |
int *val; |
1078 |
int i, *val; |
1079 |
int i; |
|
|
1080 |
|
1079 |
|
1081 |
val = (int *)bp->bio_data; |
|
|
1082 |
pp = bp->bio_to; |
1080 |
pp = bp->bio_to; |
1083 |
vol = pp->private; |
1081 |
vol = pp->private; |
1084 |
*val = 0; |
|
|
1085 |
for (i = 0; i < vol->v_disks_count; i++) { |
1082 |
for (i = 0; i < vol->v_disks_count; i++) { |
1086 |
sd = &vol->v_subdisks[i]; |
1083 |
sd = &vol->v_subdisks[i]; |
1087 |
if (sd->sd_state == G_RAID_SUBDISK_S_NONE) |
1084 |
if (sd->sd_state == G_RAID_SUBDISK_S_NONE) |
1088 |
continue; |
1085 |
continue; |
1089 |
if (sd->sd_disk->d_candelete) { |
1086 |
if (sd->sd_disk->d_candelete) |
1090 |
*val = 1; |
|
|
1091 |
break; |
1087 |
break; |
1092 |
} |
|
|
1093 |
} |
1088 |
} |
1094 |
g_io_deliver(bp, 0); |
1089 |
val = i < vol->v_disks_count; |
|
|
1090 |
g_handleattr(bp, "GEOM::candelete", &val, sizeof(val)); |
1095 |
} |
1091 |
} |
1096 |
|
1092 |
|
1097 |
static void |
1093 |
static void |