Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys 64 bit inode changes.
details: https://anonhg.NetBSD.org/src/rev/f5c2a1d406dd
branches: trunk
changeset: 583677:f5c2a1d406dd
user: christos <christos%NetBSD.org@localhost>
date: Fri Aug 19 02:04:03 2005 +0000
description:
64 bit inode changes.
diffstat:
sys/kern/kern_sa.c | 33 +++++-
sys/kern/syscalls.c | 16 +-
sys/kern/syscalls.conf | 4 +-
sys/kern/syscalls.master | 14 +-
sys/kern/vfs_getcwd.c | 8 +-
sys/kern/vfs_syscalls.c | 16 +-
sys/lib/libsa/ufs.c | 21 ++-
sys/lib/libsa/ufs_ls.c | 6 +-
sys/lkm/Makefile.inc | 4 +-
sys/lkm/net/pf/Makefile | 4 +-
sys/miscfs/fdesc/fdesc_vnops.c | 7 +-
sys/nfs/nfs_bio.c | 28 ++--
sys/nfs/nfs_vnops.c | 118 +++++++---------------
sys/sys/dirent.h | 71 ++++++++++---
sys/sys/stat.h | 94 +++++++++++++-----
sys/sys/syscall.h | 32 ++++-
sys/sys/syscallargs.h | 57 ++++++++--
sys/sys/types.h | 4 +-
sys/sys/vnode.h | 4 +-
sys/ufs/ext2fs/ext2fs_alloc.c | 21 ++-
sys/ufs/ext2fs/ext2fs_lookup.c | 6 +-
sys/ufs/ffs/ffs_alloc.c | 23 ++-
sys/ufs/ffs/ffs_snapshot.c | 37 ++++---
sys/ufs/ffs/ffs_softdep.c | 13 +-
sys/ufs/lfs/lfs_alloc.c | 7 +-
sys/ufs/lfs/lfs_debug.c | 10 +-
sys/ufs/lfs/lfs_segment.c | 11 +-
sys/ufs/lfs/lfs_vfsops.c | 9 +-
sys/ufs/lfs/lfs_vnops.c | 7 +-
sys/ufs/ufs/inode.h | 4 +-
sys/ufs/ufs/ufs_lookup.c | 9 +-
sys/ufs/ufs/ufs_vnops.c | 211 ++++++++++++++++++++--------------------
32 files changed, 519 insertions(+), 390 deletions(-)
diffs (truncated from 2022 to 300 lines):
diff -r 0e7febdd986c -r f5c2a1d406dd sys/kern/kern_sa.c
--- a/sys/kern/kern_sa.c Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/kern/kern_sa.c Fri Aug 19 02:04:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sa.c,v 1.62 2005/06/06 19:56:46 jdc Exp $ */
+/* $NetBSD: kern_sa.c,v 1.63 2005/08/19 02:04:03 christos Exp $ */
/*-
* Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.62 2005/06/06 19:56:46 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sa.c,v 1.63 2005/08/19 02:04:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -698,9 +698,34 @@
int
sys_sa_preempt(struct lwp *l, void *v, register_t *retval)
{
+ struct sys_sa_preempt_args /* {
+ syscallarg(lwpid_t) sa_id;
+ } */ *uap = v;
+ int target_lid;
+ struct proc *p = l->l_proc;
+ struct lwp *t;
- /* XXX Implement me. */
- return (ENOSYS);
+ target_lid = SCARG(uap, sa_id);
+
+ LIST_FOREACH(t, &p->p_lwps, l_sibling)
+ if (t->l_lid == target_lid)
+ break;
+
+ if (t == NULL)
+ return ESRCH;
+
+ /* XXX: Not correct, but the best we can do for now */
+ if (t != l && t->l_stat == LSONPROC && l->l_cpu != t->l_cpu) {
+#ifdef DIAGNOSTIC
+ printf("reschedule %d\n", t->l_lid);
+#endif
+ need_resched(t->l_cpu);
+#ifndef DIAGNOSTIC
+ } else {
+ printf("can't reschedule %d\n", t->l_lid);
+#endif
+ }
+ return 0;
}
diff -r 0e7febdd986c -r f5c2a1d406dd sys/kern/syscalls.c
--- a/sys/kern/syscalls.c Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/kern/syscalls.c Fri Aug 19 02:04:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscalls.c,v 1.160 2005/07/10 22:05:24 thorpej Exp $ */
+/* $NetBSD: syscalls.c,v 1.161 2005/08/19 02:04:03 christos Exp $ */
/*
* System call names.
@@ -8,7 +8,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.160 2005/07/10 22:05:24 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.161 2005/08/19 02:04:03 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ktrace.h"
@@ -391,15 +391,15 @@
"#269 (unimplemented)", /* 269 = unimplemented */
"__posix_rename", /* 270 = __posix_rename */
"swapctl", /* 271 = swapctl */
- "getdents", /* 272 = getdents */
+ "compat_30_getdents", /* 272 = compat_30 getdents */
"minherit", /* 273 = minherit */
"lchmod", /* 274 = lchmod */
"lchown", /* 275 = lchown */
"lutimes", /* 276 = lutimes */
"__msync13", /* 277 = __msync13 */
- "__stat13", /* 278 = __stat13 */
- "__fstat13", /* 279 = __fstat13 */
- "__lstat13", /* 280 = __lstat13 */
+ "compat_30___stat13", /* 278 = compat_30 __stat13 */
+ "compat_30___fstat13", /* 279 = compat_30 __fstat13 */
+ "compat_30___lstat13", /* 280 = compat_30 __lstat13 */
"__sigaltstack14", /* 281 = __sigaltstack14 */
"__vfork14", /* 282 = __vfork14 */
"__posix_chown", /* 283 = __posix_chown */
@@ -522,4 +522,8 @@
"removexattr", /* 384 = removexattr */
"lremovexattr", /* 385 = lremovexattr */
"fremovexattr", /* 386 = fremovexattr */
+ "__stat30", /* 387 = __stat30 */
+ "__fstat30", /* 388 = __fstat30 */
+ "__lstat30", /* 389 = __lstat30 */
+ "__getdents30", /* 390 = __getdents30 */
};
diff -r 0e7febdd986c -r f5c2a1d406dd sys/kern/syscalls.conf
--- a/sys/kern/syscalls.conf Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/kern/syscalls.conf Fri Aug 19 02:04:03 2005 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: syscalls.conf,v 1.8 2004/04/21 01:05:38 christos Exp $
+# $NetBSD: syscalls.conf,v 1.9 2005/08/19 02:04:03 christos Exp $
sysnames="syscalls.c"
sysnumhdr="../sys/syscall.h"
syssw="init_sysent.c"
sysarghdr="../sys/syscallargs.h"
-compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20"
+compatopts="compat_43 compat_09 compat_10 compat_11 compat_12 compat_13 compat_14 compat_15 compat_16 compat_20 compat_30"
libcompatopts=""
switchname="sysent"
diff -r 0e7febdd986c -r f5c2a1d406dd sys/kern/syscalls.master
--- a/sys/kern/syscalls.master Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/kern/syscalls.master Fri Aug 19 02:04:03 2005 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.147 2005/07/10 22:04:20 thorpej Exp $
+ $NetBSD: syscalls.master,v 1.148 2005/08/19 02:04:03 christos Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -562,7 +562,7 @@
270 STD { int sys___posix_rename(const char *from, \
const char *to); }
271 STD { int sys_swapctl(int cmd, void *arg, int misc); }
-272 STD { int sys_getdents(int fd, char *buf, size_t count); }
+272 COMPAT_30 { int sys_getdents(int fd, char *buf, size_t count); }
273 STD { int sys_minherit(void *addr, size_t len, \
int inherit); }
274 STD { int sys_lchmod(const char *path, mode_t mode); }
@@ -571,9 +571,9 @@
276 STD { int sys_lutimes(const char *path, \
const struct timeval *tptr); }
277 STD { int sys___msync13(void *addr, size_t len, int flags); }
-278 STD { int sys___stat13(const char *path, struct stat *ub); }
-279 STD { int sys___fstat13(int fd, struct stat *sb); }
-280 STD { int sys___lstat13(const char *path, struct stat *ub); }
+278 COMPAT_30 { int sys___stat13(const char *path, struct stat30 *ub); }
+279 COMPAT_30 { int sys___fstat13(int fd, struct stat30 *sb); }
+280 COMPAT_30 { int sys___lstat13(const char *path, struct stat30 *ub); }
281 STD { int sys___sigaltstack14( \
const struct sigaltstack *nss, \
struct sigaltstack *oss); }
@@ -778,3 +778,7 @@
const char *name); }
386 STD { int sys_fremovexattr(int fd, \
const char *name); }
+387 STD { int sys___stat30(const char *path, struct stat *ub); }
+388 STD { int sys___fstat30(int fd, struct stat *sb); }
+389 STD { int sys___lstat30(const char *path, struct stat *ub); }
+390 STD { int sys___getdents30(int fd, char *buf, size_t count); }
diff -r 0e7febdd986c -r f5c2a1d406dd sys/kern/vfs_getcwd.c
--- a/sys/kern/vfs_getcwd.c Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/kern/vfs_getcwd.c Fri Aug 19 02:04:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_getcwd.c,v 1.27 2005/06/05 23:47:48 thorpej Exp $ */
+/* $NetBSD: vfs_getcwd.c,v 1.28 2005/08/19 02:04:03 christos Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_getcwd.c,v 1.27 2005/06/05 23:47:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_getcwd.c,v 1.28 2005/08/19 02:04:03 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -57,8 +57,6 @@
#include <sys/sa.h>
#include <sys/syscallargs.h>
-#define DIRENT_MINSIZE (sizeof(struct dirent) - (MAXNAMLEN + 1) + 4)
-
/*
* Vnode variable naming conventions in this file:
*
@@ -218,7 +216,7 @@
reclen = dp->d_reclen;
/* check for malformed directory.. */
- if (reclen < DIRENT_MINSIZE) {
+ if (reclen < _DIRENT_MINSIZE(dp)) {
error = EINVAL;
goto out;
}
diff -r 0e7febdd986c -r f5c2a1d406dd sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/kern/vfs_syscalls.c Fri Aug 19 02:04:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.227 2005/08/05 13:22:23 jmmv Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.228 2005/08/19 02:04:03 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.227 2005/08/05 13:22:23 jmmv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.228 2005/08/19 02:04:03 christos Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_43.h"
@@ -2113,9 +2113,9 @@
*/
/* ARGSUSED */
int
-sys___stat13(struct lwp *l, void *v, register_t *retval)
+sys___stat30(struct lwp *l, void *v, register_t *retval)
{
- struct sys___stat13_args /* {
+ struct sys___stat30_args /* {
syscallarg(const char *) path;
syscallarg(struct stat *) ub;
} */ *uap = v;
@@ -2141,9 +2141,9 @@
*/
/* ARGSUSED */
int
-sys___lstat13(struct lwp *l, void *v, register_t *retval)
+sys___lstat30(struct lwp *l, void *v, register_t *retval)
{
- struct sys___lstat13_args /* {
+ struct sys___lstat30_args /* {
syscallarg(const char *) path;
syscallarg(struct stat *) ub;
} */ *uap = v;
@@ -3256,9 +3256,9 @@
* Read a block of directory entries in a file system independent format.
*/
int
-sys_getdents(struct lwp *l, void *v, register_t *retval)
+sys___getdents30(struct lwp *l, void *v, register_t *retval)
{
- struct sys_getdents_args /* {
+ struct sys___getdents30_args /* {
syscallarg(int) fd;
syscallarg(char *) buf;
syscallarg(size_t) count;
diff -r 0e7febdd986c -r f5c2a1d406dd sys/lib/libsa/ufs.c
--- a/sys/lib/libsa/ufs.c Fri Aug 19 02:04:02 2005 +0000
+++ b/sys/lib/libsa/ufs.c Fri Aug 19 02:04:03 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs.c,v 1.44 2005/02/26 22:58:57 perry Exp $ */
+/* $NetBSD: ufs.c,v 1.45 2005/08/19 02:04:03 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -134,6 +134,7 @@
#ifndef indp_t
#define indp_t uint32_t
#endif
+typedef uint32_t ino32_t;
#ifndef FSBTODB
#define FSBTODB(fs, indp) fsbtodb(fs, indp)
#endif
@@ -166,10 +167,10 @@
daddr_t f_buf_blkno; /* block number of data block */
};
-static int read_inode(ino_t, struct open_file *);
+static int read_inode(ino32_t, struct open_file *);
static int block_map(struct open_file *, indp_t, indp_t *);
static int buf_read_file(struct open_file *, char **, size_t *);
-static int search_directory(const char *, int, struct open_file *, ino_t *);
+static int search_directory(const char *, int, struct open_file *, ino32_t *);
#ifdef LIBSA_FFSv1
static void ffs_oldfscompat(struct fs *);
#endif
@@ -182,7 +183,7 @@
* Find an inode's block. Look it up in the ifile. Whee!
*/
static int
-find_inode_sector(ino_t inumber, struct open_file *f, daddr_t *isp)
+find_inode_sector(ino32_t inumber, struct open_file *f, daddr_t *isp)
{
struct file *fp = (struct file *)f->f_fsdata;
struct fs *fs = fp->f_fs;
@@ -217,7 +218,7 @@
* Read a new inode into a file structure.
*/
static int
-read_inode(ino_t inumber, struct open_file *f)
+read_inode(ino32_t inumber, struct open_file *f)
{
struct file *fp = (struct file *)f->f_fsdata;
struct fs *fs = fp->f_fs;
@@ -440,7 +441,7 @@
*/
static int
search_directory(const char *name, int length, struct open_file *f,
- ino_t *inumber_p)
Home |
Main Index |
Thread Index |
Old Index