diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-07-03 15:34:28 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2015-07-03 15:34:28 +0000 |
commit | a429e499ea7532aa425c931866c377b84ff88804 (patch) | |
tree | 47c03fe398ea14a10c30fc8196131257cc5ebe08 /usr | |
parent | 162addd17bf2abc53e0a206fe1c9db52d3b37de9 (diff) | |
download | illumos-joyent-a429e499ea7532aa425c931866c377b84ff88804.tar.gz |
OS-4475 rkt run needs syncfs
Diffstat (limited to 'usr')
-rw-r--r-- | usr/src/uts/common/brand/lx/os/lx_syscall.c | 4 | ||||
-rw-r--r-- | usr/src/uts/common/brand/lx/sys/lx_syscalls.h | 1 | ||||
-rw-r--r-- | usr/src/uts/common/brand/lx/syscall/lx_sync.c | 37 | ||||
-rw-r--r-- | usr/src/uts/intel/Makefile.files | 1 |
4 files changed, 41 insertions, 2 deletions
diff --git a/usr/src/uts/common/brand/lx/os/lx_syscall.c b/usr/src/uts/common/brand/lx/os/lx_syscall.c index 993af09f12..3497521c5a 100644 --- a/usr/src/uts/common/brand/lx/os/lx_syscall.c +++ b/usr/src/uts/common/brand/lx/os/lx_syscall.c @@ -871,7 +871,7 @@ lx_sysent_t lx_sysent32[] = { {"name_to_handle_at", NULL, NOSYS_NULL, 0}, /* 341 */ {"open_by_handle_at", NULL, NOSYS_NULL, 0}, /* 342 */ {"clock_adjtime", NULL, NOSYS_NULL, 0}, /* 343 */ - {"syncfs", NULL, NOSYS_NULL, 0}, /* 344 */ + {"syncfs", lx_syncfs, 0, 1}, /* 344 */ {"sendmmsg", NULL, NOSYS_NULL, 0}, /* 345 */ {"setns", NULL, NOSYS_NULL, 0}, /* 346 */ {"process_vm_readv", NULL, NOSYS_NULL, 0}, /* 347 */ @@ -1200,7 +1200,7 @@ lx_sysent_t lx_sysent64[] = { {"name_to_handle_at", NULL, NOSYS_NULL, 0}, /* 303 */ {"open_by_handle_at", NULL, NOSYS_NULL, 0}, /* 304 */ {"clock_adjtime", NULL, NOSYS_NULL, 0}, /* 305 */ - {"syncfs", NULL, NOSYS_NULL, 0}, /* 306 */ + {"syncfs", lx_syncfs, 0, 1}, /* 306 */ {"sendmmsg", NULL, NOSYS_NULL, 0}, /* 307 */ {"setns", NULL, NOSYS_NULL, 0}, /* 309 */ {"getcpu", lx_getcpu, 0, 3}, /* 309 */ diff --git a/usr/src/uts/common/brand/lx/sys/lx_syscalls.h b/usr/src/uts/common/brand/lx/sys/lx_syscalls.h index 41587591fd..54933857f7 100644 --- a/usr/src/uts/common/brand/lx/sys/lx_syscalls.h +++ b/usr/src/uts/common/brand/lx/sys/lx_syscalls.h @@ -99,6 +99,7 @@ extern long lx_setresuid(); extern long lx_setresuid16(); extern long lx_setrlimit(); extern long lx_socketcall(); +extern long lx_syncfs(); extern long lx_sysinfo32(); extern long lx_sysinfo64(); extern long lx_tgkill(); diff --git a/usr/src/uts/common/brand/lx/syscall/lx_sync.c b/usr/src/uts/common/brand/lx/syscall/lx_sync.c new file mode 100644 index 0000000000..327a73d3b7 --- /dev/null +++ b/usr/src/uts/common/brand/lx/syscall/lx_sync.c @@ -0,0 +1,37 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2015 Joyent, Inc. + */ + +#include <sys/systm.h> +#include <sys/types.h> +#include <sys/vfs.h> +#include <sys/lx_impl.h> +#include <sys/lx_brand.h> + +long +lx_syncfs(int fd) +{ + file_t *fp; + vfs_t *vfsp; + + if ((fp = getf(fd)) == NULL) + return (set_errno(EBADF)); + + vfsp = fp->f_vnode->v_vfsp; + releasef(fd); + + (void) (vfsp->vfs_op->vfs_sync)(vfsp, 0, CRED()); + + return (0); +} diff --git a/usr/src/uts/intel/Makefile.files b/usr/src/uts/intel/Makefile.files index 7e30c5843f..cb1543b4ae 100644 --- a/usr/src/uts/intel/Makefile.files +++ b/usr/src/uts/intel/Makefile.files @@ -315,6 +315,7 @@ LX_BRAND_OBJS = \ lx_sched.o \ lx_signum.o \ lx_socket.o \ + lx_sync.o \ lx_syscall.o \ lx_sysinfo.o \ lx_thread_area.o \ |