Remove unneeded G_PF_CANDELETE flag.

This flag is only used by GEOM so it can be propagated to the character
device's SI_CANDELETE. Unfortunately, SI_CANDELETE seems to do nothing.
This commit is contained in:
ed 2012-08-28 19:28:31 +00:00
parent 6e82ac32c7
commit 099a431e7f
9 changed files with 0 additions and 24 deletions

View File

@ -185,14 +185,6 @@ g_bde_create_geom(struct gctl_req *req, struct g_class *mp, struct g_provider *p
kproc_create(g_bde_worker, gp, &sc->thread, 0, 0,
"g_bde %s", gp->name);
pp = g_new_providerf(gp, gp->name);
#if 0
/*
* XXX: Disable this for now. Appearantly UFS no longer
* XXX: issues BIO_DELETE requests correctly, with the obvious
* XXX: outcome that userdata is trashed.
*/
pp->flags |= G_PF_CANDELETE;
#endif
pp->stripesize = kp->zone_cont;
pp->stripeoffset = 0;
pp->mediasize = sc->mediasize;

View File

@ -203,7 +203,6 @@ struct g_provider {
struct devstat *stat;
u_int nstart, nend;
u_int flags;
#define G_PF_CANDELETE 0x1
#define G_PF_WITHER 0x2
#define G_PF_ORPHAN 0x4

View File

@ -208,15 +208,11 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
}
}
if (pp->flags & G_PF_CANDELETE)
dev->si_flags |= SI_CANDELETE;
dev->si_iosize_max = MAXPHYS;
gp->softc = dev;
dev->si_drv1 = gp;
dev->si_drv2 = cp;
if (adev != NULL) {
if (pp->flags & G_PF_CANDELETE)
adev->si_flags |= SI_CANDELETE;
adev->si_iosize_max = MAXPHYS;
adev->si_drv1 = gp;
adev->si_drv2 = cp;

View File

@ -162,10 +162,6 @@ g_disk_access(struct g_provider *pp, int r, int w, int e)
}
pp->mediasize = dp->d_mediasize;
pp->sectorsize = dp->d_sectorsize;
if (dp->d_flags & DISKFLAG_CANDELETE)
pp->flags |= G_PF_CANDELETE;
else
pp->flags &= ~G_PF_CANDELETE;
pp->stripeoffset = dp->d_stripeoffset;
pp->stripesize = dp->d_stripesize;
dp->d_flags |= DISKFLAG_OPEN;
@ -487,8 +483,6 @@ g_disk_create(void *arg, int flag)
pp = g_new_providerf(gp, "%s", gp->name);
pp->mediasize = dp->d_mediasize;
pp->sectorsize = dp->d_sectorsize;
if (dp->d_flags & DISKFLAG_CANDELETE)
pp->flags |= G_PF_CANDELETE;
pp->stripeoffset = dp->d_stripeoffset;
pp->stripesize = dp->d_stripesize;
if (bootverbose)

View File

@ -392,7 +392,6 @@ g_slice_config(struct g_geom *gp, u_int idx, int how, off_t offset, off_t length
sbuf_finish(sb);
pp = g_new_providerf(gp, sbuf_data(sb));
pp2 = LIST_FIRST(&gp->consumer)->provider;
pp->flags = pp2->flags & G_PF_CANDELETE;
pp->stripesize = pp2->stripesize;
pp->stripeoffset = pp2->stripeoffset + offset;
if (pp->stripesize > 0)

View File

@ -1261,7 +1261,6 @@ provider_flags_to_string(struct g_provider *pp, char *str, size_t size)
strlcpy(str, "NONE", size);
return (str);
}
ADDFLAG(pp, G_PF_CANDELETE, "G_PF_CANDELETE");
ADDFLAG(pp, G_PF_WITHER, "G_PF_WITHER");
ADDFLAG(pp, G_PF_ORPHAN, "G_PF_ORPHAN");
return (str);

View File

@ -423,7 +423,6 @@ g_part_new_provider(struct g_geom *gp, struct g_part_table *table,
pp->sectorsize;
entry->gpe_pp->mediasize -= entry->gpe_offset - offset;
entry->gpe_pp->sectorsize = pp->sectorsize;
entry->gpe_pp->flags = pp->flags & G_PF_CANDELETE;
entry->gpe_pp->stripesize = pp->stripesize;
entry->gpe_pp->stripeoffset = pp->stripeoffset + entry->gpe_offset;
if (pp->stripesize > 0)

View File

@ -594,7 +594,6 @@ g_uncompress_taste(struct g_class *mp, struct g_provider *pp, int flags)
pp2 = g_new_providerf(gp, "%s", gp->name);
pp2->sectorsize = 512;
pp2->mediasize = (off_t)sc->nblocks * sc->blksz;
pp2->flags = pp->flags & G_PF_CANDELETE;
if (pp->stripesize > 0) {
pp2->stripesize = pp->stripesize;
pp2->stripeoffset = pp->stripeoffset;

View File

@ -467,7 +467,6 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp, int flags)
pp2 = g_new_providerf(gp, "%s", gp->name);
pp2->sectorsize = 512;
pp2->mediasize = (off_t)sc->nblocks * sc->blksz;
pp2->flags = pp->flags & G_PF_CANDELETE;
pp2->stripesize = pp->stripesize;
pp2->stripeoffset = pp->stripeoffset;
g_error_provider(pp2, 0);