version 1.77, 2005/12/11 12:25:25 |
version 1.77.10.3, 2006/05/06 23:32:33 |
Line 47 __KERNEL_RCSID(0, "$NetBSD$"); |
|
Line 47 __KERNEL_RCSID(0, "$NetBSD$"); |
|
#include <sys/vnode.h> |
#include <sys/vnode.h> |
#include <sys/pool.h> |
#include <sys/pool.h> |
#include <sys/signalvar.h> |
#include <sys/signalvar.h> |
|
#include <sys/kauth.h> |
|
|
#include <miscfs/fifofs/fifo.h> |
#include <miscfs/fifofs/fifo.h> |
#include <miscfs/genfs/genfs.h> |
#include <miscfs/genfs/genfs.h> |
Line 237 ffs_fsync(void *v) |
|
Line 238 ffs_fsync(void *v) |
|
{ |
{ |
struct vop_fsync_args /* { |
struct vop_fsync_args /* { |
struct vnode *a_vp; |
struct vnode *a_vp; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
int a_flags; |
int a_flags; |
off_t a_offlo; |
off_t a_offlo; |
off_t a_offhi; |
off_t a_offhi; |
Line 322 ffs_fsync(void *v) |
|
Line 323 ffs_fsync(void *v) |
|
if (error == 0 && ap->a_flags & FSYNC_CACHE) { |
if (error == 0 && ap->a_flags & FSYNC_CACHE) { |
int l = 0; |
int l = 0; |
VOP_IOCTL(VTOI(vp)->i_devvp, DIOCCACHESYNC, &l, FWRITE, |
VOP_IOCTL(VTOI(vp)->i_devvp, DIOCCACHESYNC, &l, FWRITE, |
ap->a_l->l_proc->p_ucred, ap->a_l); |
ap->a_l->l_proc->p_cred, ap->a_l); |
} |
} |
|
|
return error; |
return error; |
Line 337 ffs_full_fsync(void *v) |
|
Line 338 ffs_full_fsync(void *v) |
|
{ |
{ |
struct vop_fsync_args /* { |
struct vop_fsync_args /* { |
struct vnode *a_vp; |
struct vnode *a_vp; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
int a_flags; |
int a_flags; |
off_t a_offlo; |
off_t a_offlo; |
off_t a_offhi; |
off_t a_offhi; |
|
|
if (error == 0 && ap->a_flags & FSYNC_CACHE) { |
if (error == 0 && ap->a_flags & FSYNC_CACHE) { |
int i = 0; |
int i = 0; |
VOP_IOCTL(VTOI(vp)->i_devvp, DIOCCACHESYNC, &i, FWRITE, |
VOP_IOCTL(VTOI(vp)->i_devvp, DIOCCACHESYNC, &i, FWRITE, |
ap->a_l->l_proc->p_ucred, ap->a_l); |
ap->a_l->l_proc->p_cred, ap->a_l); |
} |
} |
|
|
return error; |
return error; |
Line 546 ffs_gop_size(struct vnode *vp, off_t siz |
|
Line 547 ffs_gop_size(struct vnode *vp, off_t siz |
|
struct fs *fs = ip->i_fs; |
struct fs *fs = ip->i_fs; |
daddr_t olbn, nlbn; |
daddr_t olbn, nlbn; |
|
|
KASSERT(flags & (GOP_SIZE_READ | GOP_SIZE_WRITE)); |
|
KASSERT((flags & (GOP_SIZE_READ | GOP_SIZE_WRITE)) |
|
!= (GOP_SIZE_READ | GOP_SIZE_WRITE)); |
|
|
|
olbn = lblkno(fs, ip->i_size); |
olbn = lblkno(fs, ip->i_size); |
nlbn = lblkno(fs, size); |
nlbn = lblkno(fs, size); |
if (nlbn < NDADDR && olbn <= nlbn) { |
if (nlbn < NDADDR && olbn <= nlbn) { |
Line 564 ffs_openextattr(void *v) |
|
Line 561 ffs_openextattr(void *v) |
|
{ |
{ |
struct vop_openextattr_args /* { |
struct vop_openextattr_args /* { |
struct vnode *a_vp; |
struct vnode *a_vp; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
struct proc *a_p; |
struct proc *a_p; |
} */ *ap = v; |
} */ *ap = v; |
struct inode *ip = VTOI(ap->a_vp); |
struct inode *ip = VTOI(ap->a_vp); |
Line 584 ffs_closeextattr(void *v) |
|
Line 581 ffs_closeextattr(void *v) |
|
struct vop_closeextattr_args /* { |
struct vop_closeextattr_args /* { |
struct vnode *a_vp; |
struct vnode *a_vp; |
int a_commit; |
int a_commit; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
struct proc *a_p; |
struct proc *a_p; |
} */ *ap = v; |
} */ *ap = v; |
struct inode *ip = VTOI(ap->a_vp); |
struct inode *ip = VTOI(ap->a_vp); |
Line 607 ffs_getextattr(void *v) |
|
Line 604 ffs_getextattr(void *v) |
|
const char *a_name; |
const char *a_name; |
struct uio *a_uio; |
struct uio *a_uio; |
size_t *a_size; |
size_t *a_size; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
struct proc *a_p; |
struct proc *a_p; |
} */ *ap = v; |
} */ *ap = v; |
struct inode *ip = VTOI(ap->a_vp); |
struct inode *ip = VTOI(ap->a_vp); |
Line 633 ffs_setextattr(void *v) |
|
Line 630 ffs_setextattr(void *v) |
|
int a_attrnamespace; |
int a_attrnamespace; |
const char *a_name; |
const char *a_name; |
struct uio *a_uio; |
struct uio *a_uio; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
struct proc *a_p; |
struct proc *a_p; |
} */ *ap = v; |
} */ *ap = v; |
struct inode *ip = VTOI(ap->a_vp); |
struct inode *ip = VTOI(ap->a_vp); |
Line 659 ffs_listextattr(void *v) |
|
Line 656 ffs_listextattr(void *v) |
|
int a_attrnamespace; |
int a_attrnamespace; |
struct uio *a_uio; |
struct uio *a_uio; |
size_t *a_size; |
size_t *a_size; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
struct proc *a_p; |
struct proc *a_p; |
} */ *ap = v; |
} */ *ap = v; |
struct inode *ip = VTOI(ap->a_vp); |
struct inode *ip = VTOI(ap->a_vp); |
Line 679 ffs_deleteextattr(void *v) |
|
Line 676 ffs_deleteextattr(void *v) |
|
struct vop_deleteextattr_args /* { |
struct vop_deleteextattr_args /* { |
struct vnode *a_vp; |
struct vnode *a_vp; |
int a_attrnamespace; |
int a_attrnamespace; |
struct ucred *a_cred; |
kauth_cred_t a_cred; |
struct proc *a_p; |
struct proc *a_p; |
} */ *ap = v; |
} */ *ap = v; |
struct inode *ip = VTOI(ap->a_vp); |
struct inode *ip = VTOI(ap->a_vp); |