FreeBSD Bugzilla – Attachment 86939 Details for
Bug 123456
fstat(1): /usr/bin/fstat shows error messages and hang.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.76 KB, created by
KOIE Hidetaka
on 2008-05-06 12:00:04 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
KOIE Hidetaka
Created:
2008-05-06 12:00:04 UTC
Size:
3.76 KB
patch
obsolete
>diff -c -r1.65 fstat.c >*** fstat.c 5 Nov 2007 23:15:02 -0000 1.65 >--- fstat.c 6 May 2008 10:11:33 -0000 >*************** >*** 348,354 **** > /* > * current working directory vnode > */ >! vtrans(filed.fd_cdir, CDIR, FREAD); > /* > * jail root, if any. > */ >--- 348,355 ---- > /* > * current working directory vnode > */ >! if (filed.fd_cdir) >! vtrans(filed.fd_cdir, CDIR, FREAD); > /* > * jail root, if any. > */ >*************** >*** 390,417 **** > i, (void *)ofiles[i], Pid); > continue; > } >! if (file.f_type == DTYPE_VNODE) > vtrans(file.f_vnode, i, file.f_flag); >! else if (file.f_type == DTYPE_SOCKET) { > if (checkfile == 0) > socktrans(file.f_data, i); >! } > #ifdef DTYPE_PIPE >! else if (file.f_type == DTYPE_PIPE) { > if (checkfile == 0) > pipetrans(file.f_data, i, file.f_flag); >! } > #endif > #ifdef DTYPE_FIFO >! else if (file.f_type == DTYPE_FIFO) { > if (checkfile == 0) > vtrans(file.f_vnode, i, file.f_flag); >! } > #endif >! else { > dprintf(stderr, > "unknown file type %d for file %d of pid %d\n", > file.f_type, i, Pid); > } > } > } >--- 391,435 ---- > i, (void *)ofiles[i], Pid); > continue; > } >! switch (file.f_type) { >! case DTYPE_VNODE: > vtrans(file.f_vnode, i, file.f_flag); >! break; >! case DTYPE_SOCKET: > if (checkfile == 0) > socktrans(file.f_data, i); >! break; > #ifdef DTYPE_PIPE >! case DTYPE_PIPE: > if (checkfile == 0) > pipetrans(file.f_data, i, file.f_flag); >! break; > #endif > #ifdef DTYPE_FIFO >! case DTYPE_FIFO: > if (checkfile == 0) > vtrans(file.f_vnode, i, file.f_flag); >! break; > #endif >! #ifdef DTYPE_KQUEUE >! case DTYPE_KQUEUE: >! #endif >! #ifdef DTYPE_CRYPTO >! case DTYPE_CRYPTO: >! #endif >! #ifdef DTYPE_MQUEUE >! case DTYPE_MQUEUE: >! #endif >! #ifdef DTYPE_SHM >! case DTYPE_SHM: >! #endif >! /* not supported */ >! break; >! default: > dprintf(stderr, > "unknown file type %d for file %d of pid %d\n", > file.f_type, i, Pid); >+ break; > } > } > } >diff -c -r1.2 zfs.c >*** zfs.c 17 Nov 2007 23:21:38 -0000 1.2 >--- zfs.c 6 May 2008 10:02:48 -0000 >*************** >*** 68,75 **** > uint64_t *zid; > void *znodeptr, *vnodeptr; > char *dataptr; >! int *zphys_addr; >! size_t len, size; > > len = sizeof(size); > if (sysctlbyname("debug.sizeof.znode", &size, &len, NULL, 0) == -1) { >--- 68,76 ---- > uint64_t *zid; > void *znodeptr, *vnodeptr; > char *dataptr; >! void *zphys_addr; >! size_t len; >! int size; > > len = sizeof(size); > if (sysctlbyname("debug.sizeof.znode", &size, &len, NULL, 0) == -1) { >*************** >*** 84,90 **** > > /* Since we have problems including vnode.h, we'll use the wrappers. */ > vnodeptr = getvnodedata(vp); >! if (!KVM_READ(vnodeptr, znodeptr, size)) { > dprintf(stderr, "can't read znode at %p for pid %d\n", > (void *)vnodeptr, Pid); > goto bad; >--- 85,91 ---- > > /* Since we have problems including vnode.h, we'll use the wrappers. */ > vnodeptr = getvnodedata(vp); >! if (!KVM_READ(vnodeptr, znodeptr, (size_t)size)) { > dprintf(stderr, "can't read znode at %p for pid %d\n", > (void *)vnodeptr, Pid); > goto bad; >*************** >*** 99,107 **** > */ > dataptr = znodeptr; > zid = (uint64_t *)(dataptr + LOCATION_ZID); >! zphys_addr = (int *)(dataptr + LOCATION_ZPHYS(size)); > >! if (!KVM_READ(*zphys_addr, &zphys, sizeof(zphys))) { > dprintf(stderr, "can't read znode_phys at %p for pid %d\n", > zphys_addr, Pid); > goto bad; >--- 100,108 ---- > */ > dataptr = znodeptr; > zid = (uint64_t *)(dataptr + LOCATION_ZID); >! zphys_addr = *(void **)(dataptr + LOCATION_ZPHYS(size)); > >! if (!KVM_READ(zphys_addr, &zphys, sizeof(zphys))) { > dprintf(stderr, "can't read znode_phys at %p for pid %d\n", > zphys_addr, Pid); > goto bad;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 123456
: 86939