diff --git a/lib/libprocstat/common_kvm.c b/lib/libprocstat/common_kvm.c index be05980f183f..4ca25145b75d 100644 --- a/lib/libprocstat/common_kvm.c +++ b/lib/libprocstat/common_kvm.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #undef _KERNEL @@ -88,17 +90,22 @@ int ufs_filestat(kvm_t *kd, struct vnode *vp, struct vnstat *vn) { struct inode inode; + struct ufsmount um; if (!kvm_read_all(kd, (unsigned long)VTOI(vp), &inode, sizeof(inode))) { warnx("can't read inode at %p", (void *)VTOI(vp)); return (1); } + if (!kvm_read_all(kd, (unsigned long)inode.i_ump, &um, sizeof(um))) { + warnx("can't read ufsmount at %p", (void *)inode.i_ump); + return (1); + } /* * The st_dev from stat(2) is a dev_t. These kernel structures * contain cdev pointers. We need to convert to dev_t to make * comparisons */ - vn->vn_fsid = dev2udev(kd, inode.i_dev); + vn->vn_fsid = dev2udev(kd, um.um_dev); vn->vn_fileid = inode.i_number; vn->vn_mode = (mode_t)inode.i_mode; vn->vn_size = inode.i_size; diff --git a/sys/ufs/ufs/extattr.h b/sys/ufs/ufs/extattr.h index 1e5152c28a0e..6b4987cc2b69 100644 --- a/sys/ufs/ufs/extattr.h +++ b/sys/ufs/ufs/extattr.h @@ -133,6 +133,10 @@ struct ufs_extattr_per_mount { int uepm_flags; }; +struct vop_getextattr_args; +struct vop_deleteextattr_args; +struct vop_setextattr_args; + void ufs_extattr_uepm_init(struct ufs_extattr_per_mount *uepm); void ufs_extattr_uepm_destroy(struct ufs_extattr_per_mount *uepm); int ufs_extattr_start(struct mount *mp, struct thread *td); diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 191166536954..e44cae59ee45 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -145,14 +145,14 @@ struct inode { #define ITOFS(ip) (ITOUMP(ip)->um_fs) #define ITOVFS(ip) ((ip)->i_vnode->v_mount) -static inline bool +static inline _Bool I_IS_UFS1(const struct inode *ip) { return ((ip->i_flag & IN_UFS2) == 0); } -static inline bool +static inline _Bool I_IS_UFS2(const struct inode *ip) {