g_raid_md_if.m (219974) | g_raid_md_if.m (234940) |
---|---|
1#- 2# Copyright (c) 2010 Alexander Motin 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# --- 9 unchanged lines hidden (view full) --- 18# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25# | 1#- 2# Copyright (c) 2010 Alexander Motin 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# --- 9 unchanged lines hidden (view full) --- 18# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25# |
26# $FreeBSD: head/sys/geom/raid/g_raid_md_if.m 219974 2011-03-24 21:31:32Z mav $ | 26# $FreeBSD: head/sys/geom/raid/g_raid_md_if.m 234940 2012-05-03 05:32:56Z mav $ |
27 28#include <sys/param.h> 29#include <sys/lock.h> 30#include <sys/malloc.h> 31#include <sys/mutex.h> 32#include <sys/sbuf.h> 33#include <sys/bus.h> 34#include <machine/bus.h> --- 9 unchanged lines hidden (view full) --- 44#define G_RAID_MD_TASTE_FAIL -1 45#define G_RAID_MD_TASTE_EXISTING 0 46#define G_RAID_MD_TASTE_NEW 1 47}; 48 49# Default implementations of methods. 50CODE { 51 static int | 27 28#include <sys/param.h> 29#include <sys/lock.h> 30#include <sys/malloc.h> 31#include <sys/mutex.h> 32#include <sys/sbuf.h> 33#include <sys/bus.h> 34#include <machine/bus.h> --- 9 unchanged lines hidden (view full) --- 44#define G_RAID_MD_TASTE_FAIL -1 45#define G_RAID_MD_TASTE_EXISTING 0 46#define G_RAID_MD_TASTE_NEW 1 47}; 48 49# Default implementations of methods. 50CODE { 51 static int |
52 g_raid_md_create_default(struct g_raid_md_object *md) | 52 g_raid_md_create_default(struct g_raid_md_object *md, 53 struct g_class *mp, struct g_geom **gp) |
53 { 54 55 return (G_RAID_MD_TASTE_FAIL); 56 } 57 58 static int | 54 { 55 56 return (G_RAID_MD_TASTE_FAIL); 57 } 58 59 static int |
60 g_raid_md_create_req_default(struct g_raid_md_object *md, 61 struct g_class *mp, struct gctl_req *req, struct g_geom **gp) 62 { 63 64 return (G_RAID_MD_CREATE(md, mp, gp)); 65 } 66 67 static int |
|
59 g_raid_md_ctl_default(struct g_raid_md_object *md, 60 struct gctl_req *req) 61 { 62 63 return (-1); 64 } 65 66 static int --- 23 unchanged lines hidden (view full) --- 90 91# create() - create new node from scratch. 92METHOD int create { 93 struct g_raid_md_object *md; 94 struct g_class *mp; 95 struct g_geom **gp; 96} DEFAULT g_raid_md_create_default; 97 | 68 g_raid_md_ctl_default(struct g_raid_md_object *md, 69 struct gctl_req *req) 70 { 71 72 return (-1); 73 } 74 75 static int --- 23 unchanged lines hidden (view full) --- 99 100# create() - create new node from scratch. 101METHOD int create { 102 struct g_raid_md_object *md; 103 struct g_class *mp; 104 struct g_geom **gp; 105} DEFAULT g_raid_md_create_default; 106 |
107# create_req() - create new node from scratch, with request argument. 108METHOD int create_req { 109 struct g_raid_md_object *md; 110 struct g_class *mp; 111 struct gctl_req *req; 112 struct g_geom **gp; 113} DEFAULT g_raid_md_create_req_default; 114 |
|
98# taste() - taste disk and, if needed, create new node. 99METHOD int taste { 100 struct g_raid_md_object *md; 101 struct g_class *mp; 102 struct g_consumer *cp; 103 struct g_geom **gp; 104}; 105 --- 51 unchanged lines hidden --- | 115# taste() - taste disk and, if needed, create new node. 116METHOD int taste { 117 struct g_raid_md_object *md; 118 struct g_class *mp; 119 struct g_consumer *cp; 120 struct g_geom **gp; 121}; 122 --- 51 unchanged lines hidden --- |