diff options
| author | ahrens <none@none> | 2005-10-31 11:33:35 -0800 |
|---|---|---|
| committer | ahrens <none@none> | 2005-10-31 11:33:35 -0800 |
| commit | fa9e4066f08beec538e775443c5be79dd423fcab (patch) | |
| tree | 576d99665e57bb7cb70584431adb08c14d47e3ce /usr/src/uts/sparc | |
| parent | f1b64740276f67fc6914c1d855f2af601efe99ac (diff) | |
| download | illumos-joyent-fa9e4066f08beec538e775443c5be79dd423fcab.tar.gz | |
PSARC 2002/240 ZFS
6338653 Integrate ZFS
PSARC 2004/652 - DKIOCFLUSH
5096886 Write caching disks need mechanism to flush cache to physical media
Diffstat (limited to 'usr/src/uts/sparc')
| -rw-r--r-- | usr/src/uts/sparc/Makefile.sparc | 2 | ||||
| -rw-r--r-- | usr/src/uts/sparc/os/cpr_sparc.c | 20 | ||||
| -rw-r--r-- | usr/src/uts/sparc/os/minor_perm | 2 | ||||
| -rw-r--r-- | usr/src/uts/sparc/os/name_to_major | 1 | ||||
| -rw-r--r-- | usr/src/uts/sparc/v9/sys/prom_isa.h | 6 | ||||
| -rw-r--r-- | usr/src/uts/sparc/zfs/Makefile | 100 |
6 files changed, 117 insertions, 14 deletions
diff --git a/usr/src/uts/sparc/Makefile.sparc b/usr/src/uts/sparc/Makefile.sparc index eef8510dfc..ff057dd7c5 100644 --- a/usr/src/uts/sparc/Makefile.sparc +++ b/usr/src/uts/sparc/Makefile.sparc @@ -294,7 +294,7 @@ SCHED_KMODS += RT TS RT_DPTBL TS_DPTBL IA FSS FX FX_DPTBL # # File System Modules (/kernel/fs): # -FS_KMODS += devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs +FS_KMODS += devfs fdfs fifofs hsfs lofs namefs nfs pcfs tmpfs zfs FS_KMODS += specfs udfs ufs autofs cachefs procfs sockfs mntfs FS_KMODS += ctfs objfs diff --git a/usr/src/uts/sparc/os/cpr_sparc.c b/usr/src/uts/sparc/os/cpr_sparc.c index e9b802b5be..ebc452b8fe 100644 --- a/usr/src/uts/sparc/os/cpr_sparc.c +++ b/usr/src/uts/sparc/os/cpr_sparc.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -67,13 +67,13 @@ static cdef_t orig_def_info = { static char *cpr_next_component(char **); static char *cpr_get_prefix(char *); -static char *cpr_build_nodename(dnode_t); +static char *cpr_build_nodename(pnode_t); static void cpr_abbreviate_devpath(char *, char *); static int cpr_show_props = 0; static int -cpr_get_options_node(dnode_t *nodep) +cpr_get_options_node(pnode_t *nodep) { *nodep = prom_optionsnode(); if (*nodep == OBP_NONODE || *nodep == OBP_BADNODE) { @@ -93,7 +93,7 @@ static int cpr_get_bool_prop(char *name, int *result) { char value[PROP_BOOL_LEN]; - dnode_t node; + pnode_t node; int len, err; if (err = cpr_get_options_node(&node)) @@ -116,7 +116,7 @@ int cpr_update_nvram(cprop_t *props) { cprop_t *tail; - dnode_t node; + pnode_t node; int len, rc; if (rc = cpr_get_options_node(&node)) @@ -258,7 +258,7 @@ cpr_default_setup(int alloc) { cprop_t *orig, *new, *tail; int len, err = 0; - dnode_t node; + pnode_t node; char *fmt; if (alloc == 0) { @@ -348,7 +348,7 @@ cpr_spinning_bar(void) static void cpr_abbreviate_devpath(char *in_path, char *out_path) { - static dnode_t cur_node; + static pnode_t cur_node; char *position = in_path + 1; /* Skip the leading slash. */ char *cmpt; @@ -356,8 +356,8 @@ cpr_abbreviate_devpath(char *in_path, char *out_path) *out_path = '\0'; while ((cmpt = cpr_next_component(&position)) != NULL) { - dnode_t long_match = NULL; - dnode_t short_match = NULL; + pnode_t long_match = NULL; + pnode_t short_match = NULL; int short_hits = 0; char *name; char *prefix = cpr_get_prefix(cmpt); @@ -461,7 +461,7 @@ cpr_get_prefix(char *cmpt) * from the first two (binary) words of the "reg" property. */ static char * -cpr_build_nodename(dnode_t node) +cpr_build_nodename(pnode_t node) { static char name[OBP_MAXPATHLEN]; int reg[512]; diff --git a/usr/src/uts/sparc/os/minor_perm b/usr/src/uts/sparc/os/minor_perm index 587b0cfc4e..e46f3718ff 100644 --- a/usr/src/uts/sparc/os/minor_perm +++ b/usr/src/uts/sparc/os/minor_perm @@ -162,3 +162,5 @@ mdesc:* 0666 root sys dld:* 0666 root sys aggr:* 0666 root sys ntwdt:* 0644 root sys +zfs:* 0600 root sys +zfs:zfs 0666 root sys diff --git a/usr/src/uts/sparc/os/name_to_major b/usr/src/uts/sparc/os/name_to_major index 5ac6715971..277aeff8ef 100644 --- a/usr/src/uts/sparc/os/name_to_major +++ b/usr/src/uts/sparc/os/name_to_major @@ -200,3 +200,4 @@ mi2cv 249 todds1337 250 pic16f747 251 mdesc 252 +zfs 253 diff --git a/usr/src/uts/sparc/v9/sys/prom_isa.h b/usr/src/uts/sparc/v9/sys/prom_isa.h index 12a739987f..c2f3cb4c4f 100644 --- a/usr/src/uts/sparc/v9/sys/prom_isa.h +++ b/usr/src/uts/sparc/v9/sys/prom_isa.h @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -56,7 +56,7 @@ typedef unsigned long long cell_t; #define p1275_uint2cell(u) ((cell_t)((unsigned int)(u))) #define p1275_size2cell(u) ((cell_t)((size_t)(u))) #define p1275_phandle2cell(ph) ((cell_t)((unsigned int)((phandle_t)(ph)))) -#define p1275_dnode2cell(d) ((cell_t)((unsigned int)((dnode_t)(d)))) +#define p1275_dnode2cell(d) ((cell_t)((unsigned int)((pnode_t)(d)))) #define p1275_ihandle2cell(ih) ((cell_t)((unsigned int)((ihandle_t)(ih)))) #define p1275_ull2cell_high(ll) (0LL) #define p1275_ull2cell_low(ll) ((cell_t)(ll)) @@ -67,7 +67,7 @@ typedef unsigned long long cell_t; #define p1275_cell2uint(u) ((unsigned int)((cell_t)(u))) #define p1275_cell2size(u) ((size_t)((cell_t)(u))) #define p1275_cell2phandle(ph) ((phandle_t)((cell_t)(ph))) -#define p1275_cell2dnode(d) ((dnode_t)((cell_t)(d))) +#define p1275_cell2dnode(d) ((pnode_t)((cell_t)(d))) #define p1275_cell2ihandle(ih) ((ihandle_t)((cell_t)(ih))) #define p1275_cells2ull(h, l) ((unsigned long long)(cell_t)(l)) #define p1275_cell2uintptr(i) ((uintptr_t)((cell_t)(i))) diff --git a/usr/src/uts/sparc/zfs/Makefile b/usr/src/uts/sparc/zfs/Makefile new file mode 100644 index 0000000000..84eeec044a --- /dev/null +++ b/usr/src/uts/sparc/zfs/Makefile @@ -0,0 +1,100 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License, Version 1.0 only +# (the "License"). You may not use this file except in compliance +# with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +#ident "%Z%%M% %I% %E% SMI" +# +# This makefile drives the production of the zfs file system +# kernel module. + +# +# Path to the base of the uts directory tree (usually /usr/src/uts). +# +UTSBASE = ../.. + +ARCHDIR:sh = cd ..; basename `pwd` + +# +# Define the module and object file sets. +# +MODULE = zfs +OBJECTS = $(ZFS_OBJS:%=$(OBJS_DIR)/%) +LINTS = $(ZFS_OBJS:%.o=$(LINTS_DIR)/%.ln) +ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) +ROOTLINK = $(ROOT_FS_DIR)/$(MODULE) +CONF_SRCDIR = $(UTSBASE)/common/fs/zfs + +# +# Include common rules. +# +include ../Makefile.$(ARCHDIR) + +# +# Define targets +# +ALL_TARGET = $(BINARY) $(SRC_CONFILE) +LINT_TARGET = $(MODULE).lint +INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOTLINK) $(ROOT_CONFFILE) + +# +# Overrides and depends_on +# +MODSTUBS_DIR = $(OBJS_DIR) +LDFLAGS += -dy -Nfs/specfs -Ndrv/random + +INC_PATH += -I$(UTSBASE)/common/fs/zfs +INC_PATH += -I$(SRC)/common +INC_PATH += -I$(COMMONBASE)/zfs + +C99MODE= -xc99=%all +C99LMODE= -Xc99=%all + +# +# Default build targets. +# +.KEEP_STATE: + +def: $(DEF_DEPS) + +all: $(ALL_DEPS) + +clean: $(CLEAN_DEPS) + +clobber: $(CLOBBER_DEPS) + +lint: $(LINT_DEPS) + +modlintlib: $(MODLINTLIB_DEPS) + +clean.lint: $(CLEAN_LINT_DEPS) + +install: $(INSTALL_DEPS) + +$(ROOTLINK): $(ROOT_FS_DIR) $(ROOTMODULE) + -$(RM) $@; ln $(ROOTMODULE) $@ + +# +# Include common targets. +# +include ../Makefile.targ |
