DragonFly-2.1.1.444.g34943 master lib/libc/sys stat.2 sys/kern kern_exec.c vfs_default.c vfs_subr.c vfs_vopops.c sys/sys vfsops.h vnode.h sys/vfs/hammer hammer_vnops.c sys/vfs/ufs ufs_vnops.c sys/vm vm_mmap.c

Sepherosa Ziehau sepherosa at gmail.com
Wed Jan 21 04:02:52 PST 2009


On Wed, Jan 21, 2009 at 9:41 AM, Matthew Dillon
<dillon at crater.dragonflybsd.org> wrote:
>
> commit 349433c9ce488bf66a66873bc5591529ad32500f
> Author: Matthew Dillon <dillon at apollo.backplane.com>
> Date:   Tue Jan 20 17:39:51 2009 -0800
>
>    Issue 1013 - update atime on exec and mmap, add helper vop_markatime
>
>    Add a new helper VOP which passively updates a vnode's atime.  Implement
>    the new VOP in HAMMER and UFS and create a default op which does nothing.
>    Call the new function from mmap() and exec().
>
>    Submitted-by: Dion Blazakis
>    Reported-by: Simon Schubert
>
> Summary of changes:
>  lib/libc/sys/stat.2           |    6 ++++--
>  sys/kern/kern_exec.c          |    3 +++
>  sys/kern/vfs_default.c        |    7 +++++++
>  sys/kern/vfs_subr.c           |   10 ++++++++++
>  sys/kern/vfs_vopops.c         |   27 ++++++++++++++++++++++++++-
>  sys/sys/vfsops.h              |   14 ++++++++++++++
>  sys/sys/vnode.h               |    2 ++
>  sys/vfs/hammer/hammer_vnops.c |   31 +++++++++++++++++++++++++++++++
>  sys/vfs/ufs/ufs_vnops.c       |   20 ++++++++++++++++++++
>  sys/vm/vm_mmap.c              |    8 ++++++++

I got a panic when tried to startx

+void
+vn_mark_atime(struct vnode *vp, struct thread *td)
+{
+       struct proc *p = td->td_proc;
+       struct ucred *cred = p ? p->p_ucred : proc0.p_ucred;
+
+       if ((vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0) {

vp->v_mount is NULL

+               VOP_MARKATIME(vp, cred);
+       }
+}

Brief backtrace:
vn_make_atime
vm_mmap
kern_mmap
sys_mmap

I am uploading kernel and core; it is very slow from my side.

Best Regards,
sephe

-- 
Live Free or Die





More information about the Commits mailing list