View | Details | Raw Unified | Return to bug 232676 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/geom/concat/g_concat.c (-8 / +4 lines)
Lines 210-229 g_concat_candelete(struct bio *bp) Link Here
210
{
210
{
211
	struct g_concat_softc *sc;
211
	struct g_concat_softc *sc;
212
	struct g_concat_disk *disk;
212
	struct g_concat_disk *disk;
213
	int i, *val;
213
	int i, val;
214
215
	val = (int *)bp->bio_data;
216
	*val = 0;
217
214
218
	sc = bp->bio_to->geom->softc;
215
	sc = bp->bio_to->geom->softc;
219
	for (i = 0; i < sc->sc_ndisks; i++) {
216
	for (i = 0; i < sc->sc_ndisks; i++) {
220
		disk = &sc->sc_disks[i];
217
		disk = &sc->sc_disks[i];
221
		if (!disk->d_removed && disk->d_candelete) {
218
		if (!disk->d_removed && disk->d_candelete)
222
			*val = 1;
223
			break;
219
			break;
224
		}
225
	}
220
	}
226
	g_io_deliver(bp, 0);
221
	val = i < sc->sc_ndisks;
222
	g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
227
}
223
}
228
224
229
static void
225
static void
(-)b/sys/geom/mirror/g_mirror.c (-4 / +3 lines)
Lines 1086-1101 g_mirror_candelete(struct bio *bp) Link Here
1086
{
1086
{
1087
	struct g_mirror_softc *sc;
1087
	struct g_mirror_softc *sc;
1088
	struct g_mirror_disk *disk;
1088
	struct g_mirror_disk *disk;
1089
	int *val;
1089
	int val;
1090
1090
1091
	sc = bp->bio_to->private;
1091
	sc = bp->bio_to->private;
1092
	LIST_FOREACH(disk, &sc->sc_disks, d_next) {
1092
	LIST_FOREACH(disk, &sc->sc_disks, d_next) {
1093
		if (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE)
1093
		if (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE)
1094
			break;
1094
			break;
1095
	}
1095
	}
1096
	val = (int *)bp->bio_data;
1096
	val = disk != NULL;
1097
	*val = (disk != NULL);
1097
	g_handleattr(bp, "GEOM::candelete", &val, sizeof(val));
1098
	g_io_deliver(bp, 0);
1099
}
1098
}
1100
1099
1101
static void
1100
static void
(-)b/sys/geom/raid/g_raid.c (-8 / +4 lines)
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

Return to bug 232676