Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2012 19:28:32 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239790 - in head/sys/geom: . bde part uncompress uzip
Message-ID:  <201208281928.q7SJSWeg018090@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Tue Aug 28 19:28:31 2012
New Revision: 239790
URL: http://svn.freebsd.org/changeset/base/239790

Log:
  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.

Modified:
  head/sys/geom/bde/g_bde.c
  head/sys/geom/geom.h
  head/sys/geom/geom_dev.c
  head/sys/geom/geom_disk.c
  head/sys/geom/geom_slice.c
  head/sys/geom/geom_subr.c
  head/sys/geom/part/g_part.c
  head/sys/geom/uncompress/g_uncompress.c
  head/sys/geom/uzip/g_uzip.c

Modified: head/sys/geom/bde/g_bde.c
==============================================================================
--- head/sys/geom/bde/g_bde.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/bde/g_bde.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -185,14 +185,6 @@ g_bde_create_geom(struct gctl_req *req, 
 		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;

Modified: head/sys/geom/geom.h
==============================================================================
--- head/sys/geom/geom.h	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/geom.h	Tue Aug 28 19:28:31 2012	(r239790)
@@ -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
 

Modified: head/sys/geom/geom_dev.c
==============================================================================
--- head/sys/geom/geom_dev.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/geom_dev.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -208,15 +208,11 @@ g_dev_taste(struct g_class *mp, struct g
 		}
 	}
 
-	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;

Modified: head/sys/geom/geom_disk.c
==============================================================================
--- head/sys/geom/geom_disk.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/geom_disk.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -162,10 +162,6 @@ g_disk_access(struct g_provider *pp, int
 		}
 		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)

Modified: head/sys/geom/geom_slice.c
==============================================================================
--- head/sys/geom/geom_slice.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/geom_slice.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -392,7 +392,6 @@ g_slice_config(struct g_geom *gp, u_int 
 	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)

Modified: head/sys/geom/geom_subr.c
==============================================================================
--- head/sys/geom/geom_subr.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/geom_subr.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -1261,7 +1261,6 @@ provider_flags_to_string(struct g_provid
 		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);

Modified: head/sys/geom/part/g_part.c
==============================================================================
--- head/sys/geom/part/g_part.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/part/g_part.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -423,7 +423,6 @@ g_part_new_provider(struct g_geom *gp, s
 	    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)

Modified: head/sys/geom/uncompress/g_uncompress.c
==============================================================================
--- head/sys/geom/uncompress/g_uncompress.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/uncompress/g_uncompress.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -594,7 +594,6 @@ g_uncompress_taste(struct g_class *mp, s
 	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;

Modified: head/sys/geom/uzip/g_uzip.c
==============================================================================
--- head/sys/geom/uzip/g_uzip.c	Tue Aug 28 19:23:04 2012	(r239789)
+++ head/sys/geom/uzip/g_uzip.c	Tue Aug 28 19:28:31 2012	(r239790)
@@ -467,7 +467,6 @@ g_uzip_taste(struct g_class *mp, struct 
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208281928.q7SJSWeg018090>