FreeBSD Bugzilla – Attachment 200535 Details for
Bug 232676
gconcat fails to advertise delete capability
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix GEOM::candelete handling
diff (text/plain), 2.29 KB, created by
Mark Johnston
on 2018-12-26 18:40:50 UTC
(
hide
)
Description:
fix GEOM::candelete handling
Filename:
MIME Type:
Creator:
Mark Johnston
Created:
2018-12-26 18:40:50 UTC
Size:
2.29 KB
patch
obsolete
>commit 5dc548f8aaa6d61794052d99e3c3bd6264c09c61 >Author: Mark Johnston <markjdb@gmail.com> >Date: Wed Dec 26 13:39:12 2018 -0500 > > Fix GEOM::candelete attribute handling. > >diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c >index f9be59101592..df30c379ed92 100644 >--- a/sys/geom/concat/g_concat.c >+++ b/sys/geom/concat/g_concat.c >@@ -210,20 +210,16 @@ g_concat_candelete(struct bio *bp) > { > struct g_concat_softc *sc; > struct g_concat_disk *disk; >- int i, *val; >- >- val = (int *)bp->bio_data; >- *val = 0; >+ int i, val; > > sc = bp->bio_to->geom->softc; > for (i = 0; i < sc->sc_ndisks; i++) { > disk = &sc->sc_disks[i]; >- if (!disk->d_removed && disk->d_candelete) { >- *val = 1; >+ if (!disk->d_removed && disk->d_candelete) > break; >- } > } >- g_io_deliver(bp, 0); >+ val = i < sc->sc_ndisks; >+ g_handleattr(bp, "GEOM::candelete", &val, sizeof(val)); > } > > static void >diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c >index 125f81b98e6a..5ccb8362e19a 100644 >--- a/sys/geom/mirror/g_mirror.c >+++ b/sys/geom/mirror/g_mirror.c >@@ -1086,16 +1086,15 @@ g_mirror_candelete(struct bio *bp) > { > struct g_mirror_softc *sc; > struct g_mirror_disk *disk; >- int *val; >+ int val; > > sc = bp->bio_to->private; > LIST_FOREACH(disk, &sc->sc_disks, d_next) { > if (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE) > break; > } >- val = (int *)bp->bio_data; >- *val = (disk != NULL); >- g_io_deliver(bp, 0); >+ val = disk != NULL; >+ g_handleattr(bp, "GEOM::candelete", &val, sizeof(val)); > } > > static void >diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c >index 77b6bbf3ef17..bc8cd153456a 100644 >--- a/sys/geom/raid/g_raid.c >+++ b/sys/geom/raid/g_raid.c >@@ -1075,23 +1075,19 @@ g_raid_candelete(struct g_raid_softc *sc, struct bio *bp) > struct g_provider *pp; > struct g_raid_volume *vol; > struct g_raid_subdisk *sd; >- int *val; >- int i; >+ int i, val; > >- val = (int *)bp->bio_data; > pp = bp->bio_to; > vol = pp->private; >- *val = 0; > for (i = 0; i < vol->v_disks_count; i++) { > sd = &vol->v_subdisks[i]; > if (sd->sd_state == G_RAID_SUBDISK_S_NONE) > continue; >- if (sd->sd_disk->d_candelete) { >- *val = 1; >+ if (sd->sd_disk->d_candelete) > break; >- } > } >- g_io_deliver(bp, 0); >+ val = i < vol->v_disks_count; >+ g_handleattr(bp, "GEOM::candelete", &val, sizeof(val)); > } > > static void
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 232676
:
198680
|
198757
|
200534
| 200535