Deleted Added
full compact
g_zero.c (155174) g_zero.c (207877)
1/*-
2 * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/geom/zero/g_zero.c 155174 2006-02-01 12:06:01Z pjd $");
28__FBSDID("$FreeBSD: head/sys/geom/zero/g_zero.c 207877 2010-05-10 19:08:53Z jh $");
29
30#include <sys/param.h>
31#include <sys/bio.h>
32#include <sys/kernel.h>
33#include <sys/limits.h>
34#include <sys/malloc.h>
35#include <sys/queue.h>
36#include <sys/sysctl.h>

--- 62 unchanged lines hidden (view full) ---

99 if (gp == NULL)
100 return (0);
101 pp = LIST_FIRST(&gp->provider);
102 if (pp == NULL)
103 return (0);
104 if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)
105 return (EBUSY);
106 g_wither_geom(gp, ENXIO);
29
30#include <sys/param.h>
31#include <sys/bio.h>
32#include <sys/kernel.h>
33#include <sys/limits.h>
34#include <sys/malloc.h>
35#include <sys/queue.h>
36#include <sys/sysctl.h>

--- 62 unchanged lines hidden (view full) ---

99 if (gp == NULL)
100 return (0);
101 pp = LIST_FIRST(&gp->provider);
102 if (pp == NULL)
103 return (0);
104 if (pp->acr > 0 || pp->acw > 0 || pp->ace > 0)
105 return (EBUSY);
106 g_wither_geom(gp, ENXIO);
107 return (EBUSY);
107 return (0);
108}
109
110static struct g_class g_zero_class = {
111 .name = G_ZERO_CLASS_NAME,
112 .version = G_VERSION,
113 .init = g_zero_init,
114 .destroy_geom = g_zero_destroy_geom
115};
116
117DECLARE_GEOM_CLASS(g_zero_class, g_zero);
108}
109
110static struct g_class g_zero_class = {
111 .name = G_ZERO_CLASS_NAME,
112 .version = G_VERSION,
113 .init = g_zero_init,
114 .destroy_geom = g_zero_destroy_geom
115};
116
117DECLARE_GEOM_CLASS(g_zero_class, g_zero);