Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/ufs/ufs_extern.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/ufs/ufs_extern.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.72 retrieving revision 1.72.2.1 diff -u -p -r1.72 -r1.72.2.1 --- src/sys/ufs/ufs/ufs_extern.h 2012/05/09 00:21:18 1.72 +++ src/sys/ufs/ufs/ufs_extern.h 2013/02/10 16:26:34 1.72.2.1 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_extern.h,v 1.72 2012/05/09 00:21:18 riastradh Exp $ */ +/* $NetBSD: ufs_extern.h,v 1.72.2.1 2013/02/10 16:26:34 tls Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -35,6 +35,7 @@ #define _UFS_UFS_EXTERN_H_ #include +#include struct buf; struct componentname; @@ -188,9 +189,20 @@ void ufs_reinit(void); void ufs_done(void); int ufs_start(struct mount *, int); int ufs_root(struct mount *, struct vnode **); +void ufs_update_maxphys(struct mount *); int ufs_quotactl(struct mount *, struct quotactl_args *); int ufs_fhtovp(struct mount *, struct ufid *, struct vnode **); +static inline uint32_t +ufs_maxphys(struct mount *mp) +{ + while (__predict_false(mp->mnt_dev_serial != disk_serial)) { + ufs_update_maxphys(mp); + } + + return mp->mnt_maxphys; +} + /* ufs_vnops.c */ void ufs_vinit(struct mount *, int (**)(void *), int (**)(void *), struct vnode **);