-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
macOS: change update_pages OsX traditionally used uio_copy to re-issue the write in update_pages() to mapped memory. Based on Linux, it is now changed to using dmu_read() from ARC, to save the uio allocation, and clean up zfs_write(). macOS: enhance getxattr/setxattr code to use txg macOS: xattr writes to use txg, and correct xattr=sa macOS: rollback to notify finder of change macOS: setattr(uid/gid) incorrect macOS: replace obj-C function with C macOS: move AT_ to ATTR_ Appears Linux already defines them in headers, but doesn't use them. Since we just match to XNU values, it doesn't matter what they are called. macOS: zfs_writes were truncated macOS: zed changes macOS: const required after C++ fix commit macOS: Add primitive auto unmount of idle snapshots. macOS: uio changes after uio PR macOS: rebase master fixes macOS: Add all tunables from upstream macOS: compile fixes after vdev_disk_t change macOS: remove semaphore.h macOS: ASM changes after revert macOS: correct cv_wait_sig() return values macOS: Ensure to use -O2 on dsl_scan.c macOS: Disambiguate condvar API contract This is the macOS changes required for the upstream commit: 8056a75 Also correct cstyle. remember cv_timedwait() and cv_timedwait_hires() take different timeout types! macOS: Add abd_cache_reap_now for abd_chunk_cache users macOS changes needed for commit 7564073 macOS: fix zfstester get_time macOS: can not pass componentname to ZFS as ZFS updates the name with the real name (case insensitive) and will cause panic, as it is often protected. We need to pass a buffer to use, and use the returned name as cachename. macOS: remove more tests to fit in 60mins macOS: zvol need to verify and lock zv before use. When called from, or calling to C++, we need to treat the stored 'zv' as a unique ID, and verify it is still in the list of active zvols. If found, lock in the correct order. SPL: correct cstyle.pl Fixed kmem_bufctl_cache memory leak (#273) macOS: cstyle fixes, remove spl-kobj.c macOS: cstyle.pl-ify SPL macOS: cstyle.pl all kernel header files. macOS: cstyle kernel C files macOS: cstyle kernel CPP files macOS: libspl cstyle fixes. Fixed memory leak during zfs driver unload. (#279) macOS: fix file based pools zfs_dev_is_whole_disk() was incorrectly ported from FreeBSD. Use Linux version. macOS: undo previous decmpfs handling We used to handle decmpfs by uncompressing it after the fact, but it added a lot of dependencies. Now, if decmpfs XATTR is set, AND it sets UF_COMPRESSED, AND is followed by a setsize(0), we will ignore the truncate, and delete the XATTR. Only concern is if we were to stop a truncate, which was supposed to happen (ie, not decmpfs related). macOS: make codecheck pass macOS: change send/recv pipe to fifo Simplify kernel dependencies by only do IO on vnodes, and userland to wrap send to pipes with fifo (opened to get vnode) and relay child processes.
- Loading branch information
Showing
250 changed files
with
91,492 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: 1.0.{build} | ||
branches: | ||
only: | ||
- macos | ||
image: macOS | ||
build_script: | ||
- sh: >- | ||
pwd | ||
ls -l | ||
sh autoconf.sh | ||
./configure CPPFLAGS="-I/usr/local/opt/gettext/include -I/usr/local/opt/[email protected]/include" LDFLAGS="-L/usr/local/opt/gettext/lib/ -L/usr/local/opt/[email protected]/lib" | ||
make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/sh | ||
# | ||
# Helper to mount and unmount snapshots when asked to by kernel. | ||
# | ||
# Mostly used in macOS. | ||
# | ||
set -ef | ||
|
||
[ -f "${ZED_ZEDLET_DIR}/zed.rc" ] && . "${ZED_ZEDLET_DIR}/zed.rc" | ||
. "${ZED_ZEDLET_DIR}/zed-functions.sh" | ||
|
||
[ -n "${ZEVENT_SNAPSHOT_NAME}" ] || exit 1 | ||
[ -n "${ZEVENT_SUBCLASS}" ] || exit 2 | ||
|
||
if [ "${ZEVENT_SUBCLASS}" = "snapshot_mount" ]; then | ||
action="mount" | ||
elif [ "${ZEVENT_SUBCLASS}" = "snapshot_unmount" ]; then | ||
action="unmount" | ||
else | ||
zed_log_err "unsupported event class \"${ZEVENT_SUBCLASS}\"" | ||
exit 3 | ||
fi | ||
|
||
zed_exit_if_ignoring_this_event | ||
zed_check_cmd "${ZFS}" || exit 4 | ||
|
||
"${ZFS}" "${action}" "${ZEVENT_SNAPSHOT_NAME}" | ||
|
||
finished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
snapshot_mount.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* CDDL HEADER START | ||
* | ||
* The contents of this file are subject to the terms of the | ||
* Common Development and Distribution License (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 | ||
*/ | ||
|
||
#include <assert.h> | ||
#include <ctype.h> | ||
#include <errno.h> | ||
#include <fcntl.h> | ||
#include <libintl.h> | ||
#include <libnvpair.h> | ||
#include <libzutil.h> | ||
#include <limits.h> | ||
#include <sys/spa.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
#include <unistd.h> | ||
#include "zpool_util.h" | ||
#include <sys/zfs_context.h> | ||
|
||
#include <sys/efi_partition.h> | ||
#include <sys/stat.h> | ||
#include <sys/vtoc.h> | ||
#include <sys/mntent.h> | ||
#include <uuid/uuid.h> | ||
|
||
boolean_t | ||
check_sector_size_database(char *path, int *sector_size) | ||
{ | ||
return (B_FALSE); | ||
} | ||
|
||
void | ||
zpool_vdev_enable_file(struct stat64 *statbuf, boolean_t *wholedisk) | ||
{ | ||
if (S_ISCHR(statbuf->st_mode)) { | ||
statbuf->st_mode &= ~S_IFCHR; | ||
statbuf->st_mode |= S_IFBLK; | ||
*wholedisk = B_FALSE; | ||
} | ||
} | ||
|
||
int | ||
check_device(const char *name, boolean_t force, | ||
boolean_t isspare, boolean_t iswholedisk) | ||
{ | ||
char path[MAXPATHLEN]; | ||
|
||
if (strncmp(name, _PATH_DEV, sizeof (_PATH_DEV) - 1) != 0) | ||
snprintf(path, sizeof (path), "%s%s", _PATH_DEV, name); | ||
else | ||
strlcpy(path, name, sizeof (path)); | ||
|
||
return (check_file(path, force, isspare)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SUBDIRS = spl zfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
SUBDIRS = sys rpc |
Oops, something went wrong.