Subject: Problems with recent vnode changes
To: None <current-users@netbsd.org>
From: Geoff Wing <gcw@pobox.com>
List: current-users
Date: 07/23/2007 14:54:28
The recent vnode changes are not working well for me.

--------------------
1) PR #36679
--------------------
2) basic tmpfs (can't see any recent changes really specific to tmpfs though)

(gdb) bt
#0  0xc0347b7d in cpu_reboot (howto=0, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:853
#1  0xc02cd5b4 in panic (
    fmt=0xc050a684 "kernel %sassertion \"%s\" failed: file \"%s\", line %d")
    at ../../../../kern/subr_prf.c:246
#2  0xc042bed6 in __assert (t=0xc04a967f "diagnostic ", 
    f=0xc04dfb54 "../../../../fs/tmpfs/tmpfs_vnops.c", l=933, 
    e=0xc04ae0cb "fnode->tn_type != VDIR")
    at ../../../../../../lib/libkern/__assert.c:45
#3  0xc01bb762 in tmpfs_rename (v=0xcea18b10)
    at ../../../../fs/tmpfs/tmpfs_vnops.c:933
#4  0xc030898a in VOP_RENAME (fdvp=0xce689790, fvp=0xceb6c0bc, 
    fcnp=0xcea18bec, tdvp=0xce689790, tvp=0xce68d4d8, tcnp=0xcea18ba0)
    at ../../../../kern/vnode_if.c:979
#5  0xc02ff8a6 in rename_files (from=<value optimized out>, 
    to=<value optimized out>, l=0xce89d380, retain=0)
    at ../../../../kern/vfs_syscalls.c:3315
#6  0xc0351b18 in syscall_plain (frame=0xcea18c88)
    at ../../../../arch/i386/i386/syscall.c:148
#7  0xc01004c8 in syscall1 ()
(gdb) 
...
(gdb) up
#3  0xc01bb762 in tmpfs_rename (v=0xcea18b10)
    at ../../../../fs/tmpfs/tmpfs_vnops.c:933
933                     KASSERT(fnode->tn_type != VDIR);
(gdb) p *fnode
$1 = {tn_entries = {le_next = 0xceaf8990, le_prev = 0xc282d01c}, 
  tn_type = VDIR, tn_id = 6893, tn_status = 8, tn_size = 0, tn_uid = 100, 
  tn_gid = 0, tn_mode = 493, tn_flags = 0, tn_links = 2, tn_atime = {
    tv_sec = 1185164956, tv_nsec = 788064139}, tn_mtime = {
    tv_sec = 1185164956, tv_nsec = 788064139}, tn_ctime = {
    tv_sec = 1185164956, tv_nsec = 808063045}, tn_birthtime = {
    tv_sec = 1185164956, tv_nsec = 788064139}, tn_gen = 1330338994, 
  tn_lockf = 0x0, tn_vnode = 0xceb6c0bc, tn_lookup_dirent = 0xceae40f0, 
  tn_spec = {tn_dev = {tn_rdev = 3462955756}, tn_dir = {
      tn_parent = 0xce6882ec, tn_dir = {tqh_first = 0x0, 
        tqh_last = 0xceaf8a74}, tn_readdir_lastn = 0, tn_readdir_lastp = 0x0}, 
    tn_lnk = {tn_link = 0xce6882ec "h\203hÎp\202hÎ\002"}, tn_reg = {
      tn_aobj = 0xce6882ec, tn_aobj_pages = 0}}}
...
(gdb) up
#5  0xc02ff8a6 in rename_files (from=<value optimized out>,
    to=<value optimized out>, l=0xce89d380, retain=0)
    at ../../../../kern/vfs_syscalls.c:3315
3315                    error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.
ni_cnd,
(gdb) p *fromnd.ni_dvp      
$7 = {v_uobj = {vmobjlock = {lock_data = 0 '\0', lock_pad = "\000\000"}, 
    pgops = 0xc0512cac, memq = {tqh_first = 0x0, tqh_last = 0xce689798}, 
    uo_npages = 0, uo_refs = 5}, v_size = 480, v_writesize = 480, v_flag = 0, 
  v_numoutput = 0, v_writecount = 0, v_holdcnt = 0, v_mount = 0xc282c000, 
  v_op = 0xc26fc100, v_freelist = {tqe_next = 0xcde840b0, 
    tqe_prev = 0xcc7d43b0}, v_mntvnodes = {tqe_next = 0xce6896e0, 
    tqe_prev = 0xce689888}, v_cleanblkhd = {lh_first = 0x0}, v_dirtyblkhd = {
    lh_first = 0x0}, v_synclist_slot = 0, v_synclist = {tqe_next = 0x0, 
    tqe_prev = 0x0}, v_dnclist = {lh_first = 0xce29a304}, v_nclist = {
    lh_first = 0xcdb8c20c}, v_un = {vu_mountedhere = 0x0, vu_socket = 0x0, 
    vu_specinfo = 0x0, vu_fifoinfo = 0x0, vu_ractx = 0x0}, v_type = VDIR, 
  v_tag = VT_TMPFS, v_lock = {lk_interlock = {lock_data = 0 '\0', 
      lock_pad = "\000\000"}, lk_flags = 1024, lk_sharecount = 0, 
    lk_exclusivecount = 1, lk_recurselevel = 0, lk_waitcount = 0, 
    lk_wmesg = 0xc04b8264 "vnlock", lk_un = {lk_un_sleep = {
        lk_sleep_lockholder = 9315, lk_sleep_locklwp = 1, lk_sleep_prio = 20, 
        lk_sleep_timo = 0, lk_newlock = 0x0}, lk_un_spin = {
        lk_spin_cpu = 9315}}}, v_vnlock = 0xce689808, v_data = 0xce6882ec, 
  v_klist = {slh_first = 0x0}}
(gdb) p *tond.ni_dvp
$8 = {v_uobj = {vmobjlock = {lock_data = 0 '\0', lock_pad = "\000\000"}, 
    pgops = 0xc0512cac, memq = {tqh_first = 0x0, tqh_last = 0xce689798}, 
    uo_npages = 0, uo_refs = 5}, v_size = 480, v_writesize = 480, v_flag = 0, 
  v_numoutput = 0, v_writecount = 0, v_holdcnt = 0, v_mount = 0xc282c000, 
  v_op = 0xc26fc100, v_freelist = {tqe_next = 0xcde840b0, 
    tqe_prev = 0xcc7d43b0}, v_mntvnodes = {tqe_next = 0xce6896e0, 
    tqe_prev = 0xce689888}, v_cleanblkhd = {lh_first = 0x0}, v_dirtyblkhd = {
    lh_first = 0x0}, v_synclist_slot = 0, v_synclist = {tqe_next = 0x0, 
    tqe_prev = 0x0}, v_dnclist = {lh_first = 0xce29a304}, v_nclist = {
    lh_first = 0xcdb8c20c}, v_un = {vu_mountedhere = 0x0, vu_socket = 0x0, 
    vu_specinfo = 0x0, vu_fifoinfo = 0x0, vu_ractx = 0x0}, v_type = VDIR, 
  v_tag = VT_TMPFS, v_lock = {lk_interlock = {lock_data = 0 '\0', 
      lock_pad = "\000\000"}, lk_flags = 1024, lk_sharecount = 0, 
    lk_exclusivecount = 1, lk_recurselevel = 0, lk_waitcount = 0, 
    lk_wmesg = 0xc04b8264 "vnlock", lk_un = {lk_un_sleep = {
        lk_sleep_lockholder = 9315, lk_sleep_locklwp = 1, lk_sleep_prio = 20, 
        lk_sleep_timo = 0, lk_newlock = 0x0}, lk_un_spin = {
        lk_spin_cpu = 9315}}}, v_vnlock = 0xce689808, v_data = 0xce6882ec, 
  v_klist = {slh_first = 0x0}}
--------------------

Nothing obvious to anyone?

Regards,
Geoff