From 10b9d77bf1ccf2f3affafa6261692cb92cf7e992 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Sun, 27 Feb 2011 19:41:40 +0000 Subject: Finally... Import the latest open-source ZFS version - (SPA) 28. Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month --- cddl/compat/opensolaris/misc/fsshare.c | 14 ++++++++------ cddl/compat/opensolaris/misc/zmount.c | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'cddl/compat/opensolaris/misc') diff --git a/cddl/compat/opensolaris/misc/fsshare.c b/cddl/compat/opensolaris/misc/fsshare.c index 10ed591d5bca..e8faa928d6fb 100644 --- a/cddl/compat/opensolaris/misc/fsshare.c +++ b/cddl/compat/opensolaris/misc/fsshare.c @@ -28,15 +28,17 @@ __FBSDID("$FreeBSD$"); #include -#include -#include -#include -#include + +#include #include +#include +#include #include -#include #include /* _PATH_MOUNTDPID */ -#include +#include +#include +#include +#include #define FILE_HEADER "# !!! DO NOT EDIT THIS FILE MANUALLY !!!\n\n" #define OPTSSIZE 1024 diff --git a/cddl/compat/opensolaris/misc/zmount.c b/cddl/compat/opensolaris/misc/zmount.c index 493a4fc4ef12..b4f99e3be9fd 100644 --- a/cddl/compat/opensolaris/misc/zmount.c +++ b/cddl/compat/opensolaris/misc/zmount.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static void build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val, @@ -78,7 +79,7 @@ zmount(const char *spec, const char *dir, int mflag, char *fstype, assert(spec != NULL); assert(dir != NULL); - assert(mflag == 0); + assert(mflag == 0 || mflag == MS_RDONLY); assert(fstype != NULL); assert(strcmp(fstype, MNTTYPE_ZFS) == 0); assert(dataptr == NULL); @@ -91,6 +92,8 @@ zmount(const char *spec, const char *dir, int mflag, char *fstype, iov = NULL; iovlen = 0; + if (mflag & MS_RDONLY) + build_iovec(&iov, &iovlen, "ro", NULL, 0); build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1); build_iovec(&iov, &iovlen, "fspath", __DECONST(char *, dir), (size_t)-1); -- cgit v1.2.3