Thu Oct 15 06:15:48 2015 UTC ()
Move stuff from struct ulfsmount to struct lfs.


(dholland)
diff -r1.194 -r1.195 src/sys/ufs/lfs/lfs.h
diff -r1.171 -r1.172 src/sys/ufs/lfs/lfs_syscalls.c
diff -r1.346 -r1.347 src/sys/ufs/lfs/lfs_vfsops.c
diff -r1.13 -r1.14 src/sys/ufs/lfs/ulfsmount.h

cvs diff -r1.194 -r1.195 src/sys/ufs/lfs/lfs.h (expand / switch to unified diff)

--- src/sys/ufs/lfs/lfs.h 2015/10/03 08:29:34 1.194
+++ src/sys/ufs/lfs/lfs.h 2015/10/15 06:15:48 1.195
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lfs.h,v 1.194 2015/10/03 08:29:34 dholland Exp $ */ 1/* $NetBSD: lfs.h,v 1.195 2015/10/15 06:15:48 dholland Exp $ */
2 2
3/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */ 3/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */
4/* from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp */ 4/* from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp */
5 5
6/*- 6/*-
7 * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. 7 * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This code is derived from software contributed to The NetBSD Foundation 10 * This code is derived from software contributed to The NetBSD Foundation
11 * by Konrad E. Schroder <perseant@hhhh.org>. 11 * by Konrad E. Schroder <perseant@hhhh.org>.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions 14 * modification, are permitted provided that the following conditions
@@ -1018,47 +1018,58 @@ struct lfs { @@ -1018,47 +1018,58 @@ struct lfs {
1018 daddr_t lfs_cleanint[LFS_MAX_CLEANIND]; /* Active cleaning intervals */ 1018 daddr_t lfs_cleanint[LFS_MAX_CLEANIND]; /* Active cleaning intervals */
1019 int lfs_cleanind; /* Index into intervals */ 1019 int lfs_cleanind; /* Index into intervals */
1020 int lfs_sleepers; /* # procs sleeping this fs */ 1020 int lfs_sleepers; /* # procs sleeping this fs */
1021 int lfs_pages; /* dirty pages blaming this fs */ 1021 int lfs_pages; /* dirty pages blaming this fs */
1022 lfs_bm_t *lfs_ino_bitmap; /* Inuse inodes bitmap */ 1022 lfs_bm_t *lfs_ino_bitmap; /* Inuse inodes bitmap */
1023 int lfs_nowrap; /* Suspend log wrap */ 1023 int lfs_nowrap; /* Suspend log wrap */
1024 int lfs_wrappass; /* Allow first log wrap requester to pass */ 1024 int lfs_wrappass; /* Allow first log wrap requester to pass */
1025 int lfs_wrapstatus; /* Wrap status */ 1025 int lfs_wrapstatus; /* Wrap status */
1026 int lfs_reclino; /* Inode being reclaimed */ 1026 int lfs_reclino; /* Inode being reclaimed */
1027 daddr_t lfs_startseg; /* Segment we started writing at */ 1027 daddr_t lfs_startseg; /* Segment we started writing at */
1028 LIST_HEAD(, segdelta) lfs_segdhd; /* List of pending trunc accounting events */ 1028 LIST_HEAD(, segdelta) lfs_segdhd; /* List of pending trunc accounting events */
1029 1029
1030#ifdef _KERNEL 1030#ifdef _KERNEL
 1031 /* The block device we're mounted on. */
 1032 dev_t lfs_dev;
 1033 struct vnode *lfs_devvp;
 1034
1031 /* ULFS-level information */ 1035 /* ULFS-level information */
1032 u_int32_t um_flags; /* ULFS flags (below) */ 1036 u_int32_t um_flags; /* ULFS flags (below) */
1033 u_long um_nindir; /* indirect ptrs per block */ 1037 u_long um_nindir; /* indirect ptrs per block */
1034 u_long um_lognindir; /* log2 of um_nindir */ 1038 u_long um_lognindir; /* log2 of um_nindir */
1035 u_long um_bptrtodb; /* indir ptr to disk block */ 1039 u_long um_bptrtodb; /* indir ptr to disk block */
1036 u_long um_seqinc; /* inc between seq blocks */ 1040 u_long um_seqinc; /* inc between seq blocks */
1037 int um_maxsymlinklen; 1041 int um_maxsymlinklen;
1038 int um_dirblksiz; 1042 int um_dirblksiz;
1039 u_int64_t um_maxfilesize; 1043 u_int64_t um_maxfilesize;
1040 1044
1041 /* Stuff used by quota2 code, not currently operable */ 1045 /* Stuff used by quota2 code, not currently operable */
1042 unsigned lfs_use_quota2 : 1; 1046 unsigned lfs_use_quota2 : 1;
1043 uint32_t lfs_quota_magic; 1047 uint32_t lfs_quota_magic;
1044 uint8_t lfs_quota_flags; 1048 uint8_t lfs_quota_flags;
1045 uint64_t lfs_quotaino[2]; 1049 uint64_t lfs_quotaino[2];
1046 1050
1047 /* Sleep address replacing &lfs_avail inside the on-disk superblock */ 1051 /* Sleep address replacing &lfs_avail inside the on-disk superblock */
1048 /* XXX: should be replaced with a condvar */ 1052 /* XXX: should be replaced with a condvar */
1049 int lfs_availsleep; 1053 int lfs_availsleep;
1050 /* This one replaces &lfs_nextseg... all ditto */ 1054 /* This one replaces &lfs_nextseg... all ditto */
1051 int lfs_nextsegsleep; 1055 int lfs_nextsegsleep;
 1056
 1057 /* Cleaner lwp, set on first bmapv syscall. */
 1058 struct lwp *lfs_cleaner_thread;
 1059
 1060 /* Hint from cleaner, only valid if curlwp == um_cleaner_thread. */
 1061 /* XXX change this to BLOCK_INFO after resorting this file */
 1062 struct block_info *lfs_cleaner_hint;
1052#endif 1063#endif
1053}; 1064};
1054 1065
1055/* 1066/*
1056 * Structures used by lfs_bmapv and lfs_markv to communicate information 1067 * Structures used by lfs_bmapv and lfs_markv to communicate information
1057 * about inodes and data blocks. 1068 * about inodes and data blocks.
1058 */ 1069 */
1059typedef struct block_info { 1070typedef struct block_info {
1060 u_int64_t bi_inode; /* inode # */ 1071 u_int64_t bi_inode; /* inode # */
1061 int64_t bi_lbn; /* logical block w/in file */ 1072 int64_t bi_lbn; /* logical block w/in file */
1062 int64_t bi_daddr; /* disk address of block */ 1073 int64_t bi_daddr; /* disk address of block */
1063 u_int64_t bi_segcreate; /* origin segment create time */ 1074 u_int64_t bi_segcreate; /* origin segment create time */
1064 int bi_version; /* file version number */ 1075 int bi_version; /* file version number */

cvs diff -r1.171 -r1.172 src/sys/ufs/lfs/lfs_syscalls.c (expand / switch to unified diff)

--- src/sys/ufs/lfs/lfs_syscalls.c 2015/10/10 22:34:33 1.171
+++ src/sys/ufs/lfs/lfs_syscalls.c 2015/10/15 06:15:48 1.172
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lfs_syscalls.c,v 1.171 2015/10/10 22:34:33 dholland Exp $ */ 1/* $NetBSD: lfs_syscalls.c,v 1.172 2015/10/15 06:15:48 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008 4 * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007, 2008
5 * The NetBSD Foundation, Inc. 5 * The NetBSD Foundation, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to The NetBSD Foundation 8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Konrad E. Schroder <perseant@hhhh.org>. 9 * by Konrad E. Schroder <perseant@hhhh.org>.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -51,27 +51,27 @@ @@ -51,27 +51,27 @@
51 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 51 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE. 58 * SUCH DAMAGE.
59 * 59 *
60 * @(#)lfs_syscalls.c 8.10 (Berkeley) 5/14/95 60 * @(#)lfs_syscalls.c 8.10 (Berkeley) 5/14/95
61 */ 61 */
62 62
63#include <sys/cdefs.h> 63#include <sys/cdefs.h>
64__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.171 2015/10/10 22:34:33 dholland Exp $"); 64__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.172 2015/10/15 06:15:48 dholland Exp $");
65 65
66#ifndef LFS 66#ifndef LFS
67# define LFS /* for prototypes in syscallargs.h */ 67# define LFS /* for prototypes in syscallargs.h */
68#endif 68#endif
69 69
70#include <sys/param.h> 70#include <sys/param.h>
71#include <sys/systm.h> 71#include <sys/systm.h>
72#include <sys/proc.h> 72#include <sys/proc.h>
73#include <sys/buf.h> 73#include <sys/buf.h>
74#include <sys/mount.h> 74#include <sys/mount.h>
75#include <sys/vnode.h> 75#include <sys/vnode.h>
76#include <sys/kernel.h> 76#include <sys/kernel.h>
77#include <sys/kauth.h> 77#include <sys/kauth.h>
@@ -647,37 +647,37 @@ lfs_bmapv(struct lwp *l, fsid_t *fsidp,  @@ -647,37 +647,37 @@ lfs_bmapv(struct lwp *l, fsid_t *fsidp,
647 ino_t lastino; 647 ino_t lastino;
648 daddr_t v_daddr; 648 daddr_t v_daddr;
649 int cnt, error; 649 int cnt, error;
650 int numrefed = 0; 650 int numrefed = 0;
651 651
652 error = kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LFS, 652 error = kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_LFS,
653 KAUTH_REQ_SYSTEM_LFS_BMAPV, NULL, NULL, NULL); 653 KAUTH_REQ_SYSTEM_LFS_BMAPV, NULL, NULL, NULL);
654 if (error) 654 if (error)
655 return (error); 655 return (error);
656 656
657 if ((mntp = vfs_getvfs(fsidp)) == NULL) 657 if ((mntp = vfs_getvfs(fsidp)) == NULL)
658 return (ENOENT); 658 return (ENOENT);
659 659
660 ump = VFSTOULFS(mntp); 
661 if ((error = vfs_busy(mntp, NULL)) != 0) 660 if ((error = vfs_busy(mntp, NULL)) != 0)
662 return (error); 661 return (error);
663 662
664 if (ump->um_cleaner_thread == NULL) 663 ump = VFSTOULFS(mntp);
665 ump->um_cleaner_thread = curlwp; 664 fs = ump->um_lfs;
666 KASSERT(ump->um_cleaner_thread == curlwp); 
667 665
668 cnt = blkcnt; 666 if (fs->lfs_cleaner_thread == NULL)
 667 fs->lfs_cleaner_thread = curlwp;
 668 KASSERT(fs->lfs_cleaner_thread == curlwp);
669 669
670 fs = VFSTOULFS(mntp)->um_lfs; 670 cnt = blkcnt;
671 671
672 error = 0; 672 error = 0;
673 673
674 /* these were inside the initialization for the for loop */ 674 /* these were inside the initialization for the for loop */
675 vp = NULL; 675 vp = NULL;
676 v_daddr = LFS_UNUSED_DADDR; 676 v_daddr = LFS_UNUSED_DADDR;
677 lastino = LFS_UNUSED_INUM; 677 lastino = LFS_UNUSED_INUM;
678 for (blkp = blkiov; cnt--; ++blkp) 678 for (blkp = blkiov; cnt--; ++blkp)
679 { 679 {
680 /* 680 /*
681 * Get the IFILE entry (only once) and see if the file still 681 * Get the IFILE entry (only once) and see if the file still
682 * exists. 682 * exists.
683 */ 683 */
@@ -966,32 +966,34 @@ sys___lfs_segwait50(struct lwp *l, const @@ -966,32 +966,34 @@ sys___lfs_segwait50(struct lwp *l, const
966/* 966/*
967 * VFS_VGET call specialized for the cleaner. If the cleaner is 967 * VFS_VGET call specialized for the cleaner. If the cleaner is
968 * processing IINFO structures, it may have the ondisk inode already, so 968 * processing IINFO structures, it may have the ondisk inode already, so
969 * don't go retrieving it again. 969 * don't go retrieving it again.
970 * 970 *
971 * Return the vnode referenced and locked. 971 * Return the vnode referenced and locked.
972 */ 972 */
973 973
974static int 974static int
975lfs_fastvget(struct mount *mp, ino_t ino, BLOCK_INFO *blkp, int lk_flags, 975lfs_fastvget(struct mount *mp, ino_t ino, BLOCK_INFO *blkp, int lk_flags,
976 struct vnode **vpp) 976 struct vnode **vpp)
977{ 977{
978 struct ulfsmount *ump; 978 struct ulfsmount *ump;
 979 struct lfs *fs;
979 int error; 980 int error;
980 981
981 ump = VFSTOULFS(mp); 982 ump = VFSTOULFS(mp);
982 ump->um_cleaner_hint = blkp; 983 fs = ump->um_lfs;
 984 fs->lfs_cleaner_hint = blkp;
983 error = vcache_get(mp, &ino, sizeof(ino), vpp); 985 error = vcache_get(mp, &ino, sizeof(ino), vpp);
984 ump->um_cleaner_hint = NULL; 986 fs->lfs_cleaner_hint = NULL;
985 if (error) 987 if (error)
986 return error; 988 return error;
987 error = vn_lock(*vpp, lk_flags); 989 error = vn_lock(*vpp, lk_flags);
988 if (error) { 990 if (error) {
989 if (error == EBUSY) 991 if (error == EBUSY)
990 error = EAGAIN; 992 error = EAGAIN;
991 vrele(*vpp); 993 vrele(*vpp);
992 *vpp = NULL; 994 *vpp = NULL;
993 return error; 995 return error;
994 } 996 }
995 997
996 return 0; 998 return 0;
997} 999}

cvs diff -r1.346 -r1.347 src/sys/ufs/lfs/lfs_vfsops.c (expand / switch to unified diff)

--- src/sys/ufs/lfs/lfs_vfsops.c 2015/10/10 22:33:57 1.346
+++ src/sys/ufs/lfs/lfs_vfsops.c 2015/10/15 06:15:48 1.347
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lfs_vfsops.c,v 1.346 2015/10/10 22:33:57 dholland Exp $ */ 1/* $NetBSD: lfs_vfsops.c,v 1.347 2015/10/15 06:15:48 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007 4 * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
5 * The NetBSD Foundation, Inc. 5 * The NetBSD Foundation, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to The NetBSD Foundation 8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Konrad E. Schroder <perseant@hhhh.org>. 9 * by Konrad E. Schroder <perseant@hhhh.org>.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -51,27 +51,27 @@ @@ -51,27 +51,27 @@
51 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 51 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 52 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 53 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 54 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE. 58 * SUCH DAMAGE.
59 * 59 *
60 * @(#)lfs_vfsops.c 8.20 (Berkeley) 6/10/95 60 * @(#)lfs_vfsops.c 8.20 (Berkeley) 6/10/95
61 */ 61 */
62 62
63#include <sys/cdefs.h> 63#include <sys/cdefs.h>
64__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.346 2015/10/10 22:33:57 dholland Exp $"); 64__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.347 2015/10/15 06:15:48 dholland Exp $");
65 65
66#if defined(_KERNEL_OPT) 66#if defined(_KERNEL_OPT)
67#include "opt_lfs.h" 67#include "opt_lfs.h"
68#include "opt_quota.h" 68#include "opt_quota.h"
69#endif 69#endif
70 70
71#include <sys/param.h> 71#include <sys/param.h>
72#include <sys/systm.h> 72#include <sys/systm.h>
73#include <sys/namei.h> 73#include <sys/namei.h>
74#include <sys/proc.h> 74#include <sys/proc.h>
75#include <sys/kernel.h> 75#include <sys/kernel.h>
76#include <sys/vnode.h> 76#include <sys/vnode.h>
77#include <sys/mount.h> 77#include <sys/mount.h>
@@ -662,46 +662,54 @@ lfs_mount(struct mount *mp, const char * @@ -662,46 +662,54 @@ lfs_mount(struct mount *mp, const char *
662 662
663 if (!update) { 663 if (!update) {
664 /* 664 /*
665 * Be sure this is a valid block device 665 * Be sure this is a valid block device
666 */ 666 */
667 if (devvp->v_type != VBLK) 667 if (devvp->v_type != VBLK)
668 error = ENOTBLK; 668 error = ENOTBLK;
669 else if (bdevsw_lookup(devvp->v_rdev) == NULL) 669 else if (bdevsw_lookup(devvp->v_rdev) == NULL)
670 error = ENXIO; 670 error = ENXIO;
671 } else { 671 } else {
672 /* 672 /*
673 * Be sure we're still naming the same device 673 * Be sure we're still naming the same device
674 * used for our initial mount 674 * used for our initial mount
 675 *
 676 * XXX dholland 20151010: if namei gives us a
 677 * different vnode for the same device,
 678 * wouldn't it be better to use it going
 679 * forward rather than ignore it in favor of
 680 * the old one?
675 */ 681 */
676 ump = VFSTOULFS(mp); 682 ump = VFSTOULFS(mp);
677 if (devvp != ump->um_devvp) { 683 fs = ump->um_lfs;
678 if (devvp->v_rdev != ump->um_devvp->v_rdev) 684 if (devvp != fs->lfs_devvp) {
 685 if (devvp->v_rdev != fs->lfs_devvp->v_rdev)
679 error = EINVAL; 686 error = EINVAL;
680 else { 687 else {
681 vrele(devvp); 688 vrele(devvp);
682 devvp = ump->um_devvp; 689 devvp = fs->lfs_devvp;
683 vref(devvp); 690 vref(devvp);
684 } 691 }
685 } 692 }
686 } 693 }
687 } else { 694 } else {
688 if (!update) { 695 if (!update) {
689 /* New mounts must have a filename for the device */ 696 /* New mounts must have a filename for the device */
690 return (EINVAL); 697 return (EINVAL);
691 } else { 698 } else {
692 /* Use the extant mount */ 699 /* Use the extant mount */
693 ump = VFSTOULFS(mp); 700 ump = VFSTOULFS(mp);
694 devvp = ump->um_devvp; 701 fs = ump->um_lfs;
 702 devvp = fs->lfs_devvp;
695 vref(devvp); 703 vref(devvp);
696 } 704 }
697 } 705 }
698 706
699 707
700 /* 708 /*
701 * If mount by non-root, then verify that user has necessary 709 * If mount by non-root, then verify that user has necessary
702 * permissions on the device. 710 * permissions on the device.
703 */ 711 */
704 if (error == 0) { 712 if (error == 0) {
705 accessmode = VREAD; 713 accessmode = VREAD;
706 if (update ? 714 if (update ?
707 (mp->mnt_iflag & IMNT_WANTRDWR) != 0 : 715 (mp->mnt_iflag & IMNT_WANTRDWR) != 0 :
@@ -1026,62 +1034,64 @@ lfs_mountfs(struct vnode *devvp, struct  @@ -1026,62 +1034,64 @@ lfs_mountfs(struct vnode *devvp, struct
1026 fs->lfs_seglock = 0; 1034 fs->lfs_seglock = 0;
1027 fs->lfs_pdflush = 0; 1035 fs->lfs_pdflush = 0;
1028 fs->lfs_sleepers = 0; 1036 fs->lfs_sleepers = 0;
1029 fs->lfs_pages = 0; 1037 fs->lfs_pages = 0;
1030 rw_init(&fs->lfs_fraglock); 1038 rw_init(&fs->lfs_fraglock);
1031 rw_init(&fs->lfs_iflock); 1039 rw_init(&fs->lfs_iflock);
1032 cv_init(&fs->lfs_stopcv, "lfsstop"); 1040 cv_init(&fs->lfs_stopcv, "lfsstop");
1033 1041
1034 /* Set the file system readonly/modify bits. */ 1042 /* Set the file system readonly/modify bits. */
1035 fs->lfs_ronly = ronly; 1043 fs->lfs_ronly = ronly;
1036 if (ronly == 0) 1044 if (ronly == 0)
1037 fs->lfs_fmod = 1; 1045 fs->lfs_fmod = 1;
1038 1046
 1047 /* Device we're using */
 1048 dev = devvp->v_rdev;
 1049 fs->lfs_dev = dev;
 1050 fs->lfs_devvp = devvp;
 1051
1039 /* ulfs-level information */ 1052 /* ulfs-level information */
1040 fs->um_flags = 0; 1053 fs->um_flags = 0;
1041 fs->um_bptrtodb = lfs_sb_getffshift(fs) - DEV_BSHIFT; 1054 fs->um_bptrtodb = lfs_sb_getffshift(fs) - DEV_BSHIFT;
1042 fs->um_seqinc = lfs_sb_getfrag(fs); 1055 fs->um_seqinc = lfs_sb_getfrag(fs);
1043 fs->um_nindir = lfs_sb_getnindir(fs); 1056 fs->um_nindir = lfs_sb_getnindir(fs);
1044 fs->um_lognindir = ffs(lfs_sb_getnindir(fs)) - 1; 1057 fs->um_lognindir = ffs(lfs_sb_getnindir(fs)) - 1;
1045 fs->um_maxsymlinklen = lfs_sb_getmaxsymlinklen(fs); 1058 fs->um_maxsymlinklen = lfs_sb_getmaxsymlinklen(fs);
1046 fs->um_dirblksiz = LFS_DIRBLKSIZ; 1059 fs->um_dirblksiz = LFS_DIRBLKSIZ;
1047 fs->um_maxfilesize = lfs_sb_getmaxfilesize(fs); 1060 fs->um_maxfilesize = lfs_sb_getmaxfilesize(fs);
1048 1061
1049 /* quota stuff */ 1062 /* quota stuff */
1050 /* XXX: these need to come from the on-disk superblock to be used */ 1063 /* XXX: these need to come from the on-disk superblock to be used */
1051 fs->lfs_use_quota2 = 0; 1064 fs->lfs_use_quota2 = 0;
1052 fs->lfs_quota_magic = 0; 1065 fs->lfs_quota_magic = 0;
1053 fs->lfs_quota_flags = 0; 1066 fs->lfs_quota_flags = 0;
1054 fs->lfs_quotaino[0] = 0; 1067 fs->lfs_quotaino[0] = 0;
1055 fs->lfs_quotaino[1] = 0; 1068 fs->lfs_quotaino[1] = 0;
1056 1069
1057 /* Initialize the mount structure. */ 1070 /* Initialize the mount structure. */
1058 dev = devvp->v_rdev; 
1059 mp->mnt_data = ump; 1071 mp->mnt_data = ump;
1060 mp->mnt_stat.f_fsidx.__fsid_val[0] = (long)dev; 1072 mp->mnt_stat.f_fsidx.__fsid_val[0] = (long)dev;
1061 mp->mnt_stat.f_fsidx.__fsid_val[1] = makefstype(MOUNT_LFS); 1073 mp->mnt_stat.f_fsidx.__fsid_val[1] = makefstype(MOUNT_LFS);
1062 mp->mnt_stat.f_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0]; 1074 mp->mnt_stat.f_fsid = mp->mnt_stat.f_fsidx.__fsid_val[0];
1063 mp->mnt_stat.f_namemax = LFS_MAXNAMLEN; 1075 mp->mnt_stat.f_namemax = LFS_MAXNAMLEN;
1064 mp->mnt_stat.f_iosize = lfs_sb_getbsize(fs); 1076 mp->mnt_stat.f_iosize = lfs_sb_getbsize(fs);
1065 mp->mnt_flag |= MNT_LOCAL; 1077 mp->mnt_flag |= MNT_LOCAL;
1066 mp->mnt_fs_bshift = lfs_sb_getbshift(fs); 1078 mp->mnt_fs_bshift = lfs_sb_getbshift(fs);
1067 if (fs->um_maxsymlinklen > 0) 1079 if (fs->um_maxsymlinklen > 0)
1068 mp->mnt_iflag |= IMNT_DTYPE; 1080 mp->mnt_iflag |= IMNT_DTYPE;
1069 else 1081 else
1070 fs->lfs_hasolddirfmt = true; 1082 fs->lfs_hasolddirfmt = true;
1071 1083
1072 ump->um_mountp = mp; 1084 ump->um_mountp = mp;
1073 ump->um_dev = dev; 
1074 ump->um_devvp = devvp; 
1075 for (i = 0; i < ULFS_MAXQUOTAS; i++) 1085 for (i = 0; i < ULFS_MAXQUOTAS; i++)
1076 ump->um_quotas[i] = NULLVP; 1086 ump->um_quotas[i] = NULLVP;
1077 spec_node_setmountedfs(devvp, mp); 1087 spec_node_setmountedfs(devvp, mp);
1078 1088
1079 /* Set up reserved memory for pageout */ 1089 /* Set up reserved memory for pageout */
1080 lfs_setup_resblks(fs); 1090 lfs_setup_resblks(fs);
1081 /* Set up vdirop tailq */ 1091 /* Set up vdirop tailq */
1082 TAILQ_INIT(&fs->lfs_dchainhd); 1092 TAILQ_INIT(&fs->lfs_dchainhd);
1083 /* and paging tailq */ 1093 /* and paging tailq */
1084 TAILQ_INIT(&fs->lfs_pchainhd); 1094 TAILQ_INIT(&fs->lfs_pchainhd);
1085 /* and delayed segment accounting for truncation list */ 1095 /* and delayed segment accounting for truncation list */
1086 LIST_INIT(&fs->lfs_segdhd); 1096 LIST_INIT(&fs->lfs_segdhd);
1087 1097
@@ -1318,32 +1328,32 @@ lfs_unmount(struct mount *mp, int mntfla @@ -1318,32 +1328,32 @@ lfs_unmount(struct mount *mp, int mntfla
1318 lfs_sb_setpflags(fs, lfs_sb_getpflags(fs) | LFS_PF_CLEAN); 1328 lfs_sb_setpflags(fs, lfs_sb_getpflags(fs) | LFS_PF_CLEAN);
1319 lfs_writesuper(fs, lfs_sb_getsboff(fs, 0)); 1329 lfs_writesuper(fs, lfs_sb_getsboff(fs, 0));
1320 lfs_writesuper(fs, lfs_sb_getsboff(fs, 1)); 1330 lfs_writesuper(fs, lfs_sb_getsboff(fs, 1));
1321 mutex_enter(&lfs_lock); 1331 mutex_enter(&lfs_lock);
1322 while (fs->lfs_iocount) 1332 while (fs->lfs_iocount)
1323 mtsleep(&fs->lfs_iocount, PRIBIO + 1, "lfs_umount", 0, 1333 mtsleep(&fs->lfs_iocount, PRIBIO + 1, "lfs_umount", 0,
1324 &lfs_lock); 1334 &lfs_lock);
1325 mutex_exit(&lfs_lock); 1335 mutex_exit(&lfs_lock);
1326 1336
1327 /* Finish with the Ifile, now that we're done with it */ 1337 /* Finish with the Ifile, now that we're done with it */
1328 vgone(fs->lfs_ivnode); 1338 vgone(fs->lfs_ivnode);
1329 1339
1330 ronly = !fs->lfs_ronly; 1340 ronly = !fs->lfs_ronly;
1331 if (ump->um_devvp->v_type != VBAD) 1341 if (fs->lfs_devvp->v_type != VBAD)
1332 spec_node_setmountedfs(ump->um_devvp, NULL); 1342 spec_node_setmountedfs(fs->lfs_devvp, NULL);
1333 vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); 1343 vn_lock(fs->lfs_devvp, LK_EXCLUSIVE | LK_RETRY);
1334 error = VOP_CLOSE(ump->um_devvp, 1344 error = VOP_CLOSE(fs->lfs_devvp,
1335 ronly ? FREAD : FREAD|FWRITE, NOCRED); 1345 ronly ? FREAD : FREAD|FWRITE, NOCRED);
1336 vput(ump->um_devvp); 1346 vput(fs->lfs_devvp);
1337 1347
1338 /* Complain about page leakage */ 1348 /* Complain about page leakage */
1339 if (fs->lfs_pages > 0) 1349 if (fs->lfs_pages > 0)
1340 printf("lfs_unmount: still claim %d pages (%d in subsystem)\n", 1350 printf("lfs_unmount: still claim %d pages (%d in subsystem)\n",
1341 fs->lfs_pages, lfs_subsys_pages); 1351 fs->lfs_pages, lfs_subsys_pages);
1342 1352
1343 /* Free per-mount data structures */ 1353 /* Free per-mount data structures */
1344 free(fs->lfs_ino_bitmap, M_SEGMENT); 1354 free(fs->lfs_ino_bitmap, M_SEGMENT);
1345 free(fs->lfs_suflags[0], M_SEGMENT); 1355 free(fs->lfs_suflags[0], M_SEGMENT);
1346 free(fs->lfs_suflags[1], M_SEGMENT); 1356 free(fs->lfs_suflags[1], M_SEGMENT);
1347 free(fs->lfs_suflags, M_SEGMENT); 1357 free(fs->lfs_suflags, M_SEGMENT);
1348 lfs_free_resblks(fs); 1358 lfs_free_resblks(fs);
1349 cv_destroy(&fs->lfs_stopcv); 1359 cv_destroy(&fs->lfs_stopcv);
@@ -1476,42 +1486,42 @@ lfs_vget(struct mount *mp, ino_t ino, st @@ -1476,42 +1486,42 @@ lfs_vget(struct mount *mp, ino_t ino, st
1476 return 0; 1486 return 0;
1477} 1487}
1478 1488
1479/* 1489/*
1480 * Create a new vnode/inode pair and initialize what fields we can. 1490 * Create a new vnode/inode pair and initialize what fields we can.
1481 */ 1491 */
1482static void 1492static void
1483lfs_init_vnode(struct ulfsmount *ump, ino_t ino, struct vnode *vp) 1493lfs_init_vnode(struct ulfsmount *ump, ino_t ino, struct vnode *vp)
1484{ 1494{
1485 struct lfs *fs = ump->um_lfs; 1495 struct lfs *fs = ump->um_lfs;
1486 struct inode *ip; 1496 struct inode *ip;
1487 union lfs_dinode *dp; 1497 union lfs_dinode *dp;
1488 1498
1489 ASSERT_NO_SEGLOCK(ump->um_lfs); 1499 ASSERT_NO_SEGLOCK(fs);
1490 1500
1491 /* Initialize the inode. */ 1501 /* Initialize the inode. */
1492 ip = pool_get(&lfs_inode_pool, PR_WAITOK); 1502 ip = pool_get(&lfs_inode_pool, PR_WAITOK);
1493 memset(ip, 0, sizeof(*ip)); 1503 memset(ip, 0, sizeof(*ip));
1494 dp = pool_get(&lfs_dinode_pool, PR_WAITOK); 1504 dp = pool_get(&lfs_dinode_pool, PR_WAITOK);
1495 memset(dp, 0, sizeof(*dp)); 1505 memset(dp, 0, sizeof(*dp));
1496 ip->inode_ext.lfs = pool_get(&lfs_inoext_pool, PR_WAITOK); 1506 ip->inode_ext.lfs = pool_get(&lfs_inoext_pool, PR_WAITOK);
1497 memset(ip->inode_ext.lfs, 0, sizeof(*ip->inode_ext.lfs)); 1507 memset(ip->inode_ext.lfs, 0, sizeof(*ip->inode_ext.lfs));
1498 ip->i_din = dp; 1508 ip->i_din = dp;
1499 ip->i_ump = ump; 1509 ip->i_ump = ump;
1500 ip->i_vnode = vp; 1510 ip->i_vnode = vp;
1501 ip->i_dev = ump->um_dev; 1511 ip->i_dev = fs->lfs_dev;
1502 lfs_dino_setinumber(fs, dp, ino); 1512 lfs_dino_setinumber(fs, dp, ino);
1503 ip->i_number = ino; 1513 ip->i_number = ino;
1504 ip->i_lfs = ump->um_lfs; 1514 ip->i_lfs = fs;
1505 ip->i_lfs_effnblks = 0; 1515 ip->i_lfs_effnblks = 0;
1506 SPLAY_INIT(&ip->i_lfs_lbtree); 1516 SPLAY_INIT(&ip->i_lfs_lbtree);
1507 ip->i_lfs_nbtree = 0; 1517 ip->i_lfs_nbtree = 0;
1508 LIST_INIT(&ip->i_lfs_segdhd); 1518 LIST_INIT(&ip->i_lfs_segdhd);
1509 1519
1510 vp->v_tag = VT_LFS; 1520 vp->v_tag = VT_LFS;
1511 vp->v_op = lfs_vnodeop_p; 1521 vp->v_op = lfs_vnodeop_p;
1512 vp->v_data = ip; 1522 vp->v_data = ip;
1513} 1523}
1514 1524
1515/* 1525/*
1516 * Undo lfs_init_vnode(). 1526 * Undo lfs_init_vnode().
1517 */ 1527 */
@@ -1575,48 +1585,48 @@ lfs_loadvnode(struct mount *mp, struct v @@ -1575,48 +1585,48 @@ lfs_loadvnode(struct mount *mp, struct v
1575 ts.tv_nsec = lfs_if_getatime_nsec(fs, ifp); 1585 ts.tv_nsec = lfs_if_getatime_nsec(fs, ifp);
1576 } 1586 }
1577 1587
1578 brelse(bp, 0); 1588 brelse(bp, 0);
1579 if (daddr == LFS_UNUSED_DADDR) 1589 if (daddr == LFS_UNUSED_DADDR)
1580 return (ENOENT); 1590 return (ENOENT);
1581 } 1591 }
1582 1592
1583 /* Allocate/init new vnode/inode. */ 1593 /* Allocate/init new vnode/inode. */
1584 lfs_init_vnode(ump, ino, vp); 1594 lfs_init_vnode(ump, ino, vp);
1585 ip = VTOI(vp); 1595 ip = VTOI(vp);
1586 1596
1587 /* If the cleaner supplied the inode, use it. */ 1597 /* If the cleaner supplied the inode, use it. */
1588 if (curlwp == ump->um_cleaner_thread && ump->um_cleaner_hint != NULL && 1598 if (curlwp == fs->lfs_cleaner_thread && fs->lfs_cleaner_hint != NULL &&
1589 ump->um_cleaner_hint->bi_lbn == LFS_UNUSED_LBN) { 1599 fs->lfs_cleaner_hint->bi_lbn == LFS_UNUSED_LBN) {
1590 dip = ump->um_cleaner_hint->bi_bp; 1600 dip = fs->lfs_cleaner_hint->bi_bp;
1591 if (fs->lfs_is64) { 1601 if (fs->lfs_is64) {
1592 error = copyin(dip, &ip->i_din->u_64, 1602 error = copyin(dip, &ip->i_din->u_64,
1593 sizeof(struct lfs64_dinode)); 1603 sizeof(struct lfs64_dinode));
1594 } else { 1604 } else {
1595 error = copyin(dip, &ip->i_din->u_32, 1605 error = copyin(dip, &ip->i_din->u_32,
1596 sizeof(struct lfs32_dinode)); 1606 sizeof(struct lfs32_dinode));
1597 } 1607 }
1598 if (error) { 1608 if (error) {
1599 lfs_deinit_vnode(ump, vp); 1609 lfs_deinit_vnode(ump, vp);
1600 return error; 1610 return error;
1601 } 1611 }
1602 KASSERT(ip->i_number == ino); 1612 KASSERT(ip->i_number == ino);
1603 goto out; 1613 goto out;
1604 } 1614 }
1605 1615
1606 /* Read in the disk contents for the inode, copy into the inode. */ 1616 /* Read in the disk contents for the inode, copy into the inode. */
1607 retries = 0; 1617 retries = 0;
1608again: 1618again:
1609 error = bread(ump->um_devvp, LFS_FSBTODB(fs, daddr), 1619 error = bread(fs->lfs_devvp, LFS_FSBTODB(fs, daddr),
1610 (lfs_sb_getversion(fs) == 1 ? lfs_sb_getbsize(fs) : lfs_sb_getibsize(fs)), 1620 (lfs_sb_getversion(fs) == 1 ? lfs_sb_getbsize(fs) : lfs_sb_getibsize(fs)),
1611 0, &bp); 1621 0, &bp);
1612 if (error) { 1622 if (error) {
1613 lfs_deinit_vnode(ump, vp); 1623 lfs_deinit_vnode(ump, vp);
1614 return error; 1624 return error;
1615 } 1625 }
1616 1626
1617 dip = lfs_ifind(fs, ino, bp); 1627 dip = lfs_ifind(fs, ino, bp);
1618 if (dip == NULL) { 1628 if (dip == NULL) {
1619 /* Assume write has not completed yet; try again */ 1629 /* Assume write has not completed yet; try again */
1620 brelse(bp, BC_INVAL); 1630 brelse(bp, BC_INVAL);
1621 ++retries; 1631 ++retries;
1622 if (retries <= LFS_IFIND_RETRIES) { 1632 if (retries <= LFS_IFIND_RETRIES) {
@@ -2256,27 +2266,27 @@ lfs_vinit(struct mount *mp, struct vnode @@ -2256,27 +2266,27 @@ lfs_vinit(struct mount *mp, struct vnode
2256# ifdef DEBUG 2266# ifdef DEBUG
2257 lfs_dump_dinode(fs, ip->i_din); 2267 lfs_dump_dinode(fs, ip->i_din);
2258# endif 2268# endif
2259 panic("lfs_vinit: ino %llu is type VNON! (ifmt=%o)\n", 2269 panic("lfs_vinit: ino %llu is type VNON! (ifmt=%o)\n",
2260 (unsigned long long)ip->i_number, 2270 (unsigned long long)ip->i_number,
2261 (ip->i_mode & LFS_IFMT) >> 12); 2271 (ip->i_mode & LFS_IFMT) >> 12);
2262 } 2272 }
2263#endif /* DIAGNOSTIC */ 2273#endif /* DIAGNOSTIC */
2264 2274
2265 /* 2275 /*
2266 * Finish inode initialization now that aliasing has been resolved. 2276 * Finish inode initialization now that aliasing has been resolved.
2267 */ 2277 */
2268 2278
2269 ip->i_devvp = ump->um_devvp; 2279 ip->i_devvp = fs->lfs_devvp;
2270 vref(ip->i_devvp); 2280 vref(ip->i_devvp);
2271#if defined(LFS_QUOTA) || defined(LFS_QUOTA2) 2281#if defined(LFS_QUOTA) || defined(LFS_QUOTA2)
2272 ulfsquota_init(ip); 2282 ulfsquota_init(ip);
2273#endif 2283#endif
2274 genfs_node_init(vp, &lfs_genfsops); 2284 genfs_node_init(vp, &lfs_genfsops);
2275 uvm_vnp_setsize(vp, ip->i_size); 2285 uvm_vnp_setsize(vp, ip->i_size);
2276 2286
2277 /* Initialize hiblk from file size */ 2287 /* Initialize hiblk from file size */
2278 ip->i_lfs_hiblk = lfs_lblkno(ip->i_lfs, ip->i_size + lfs_sb_getbsize(ip->i_lfs) - 1) - 1; 2288 ip->i_lfs_hiblk = lfs_lblkno(ip->i_lfs, ip->i_size + lfs_sb_getbsize(ip->i_lfs) - 1) - 1;
2279 2289
2280 *vpp = vp; 2290 *vpp = vp;
2281} 2291}
2282 2292

cvs diff -r1.13 -r1.14 src/sys/ufs/lfs/ulfsmount.h (expand / switch to unified diff)

--- src/sys/ufs/lfs/ulfsmount.h 2015/05/31 15:48:03 1.13
+++ src/sys/ufs/lfs/ulfsmount.h 2015/10/15 06:15:48 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ulfsmount.h,v 1.13 2015/05/31 15:48:03 hannken Exp $ */ 1/* $NetBSD: ulfsmount.h,v 1.14 2015/10/15 06:15:48 dholland Exp $ */
2/* from NetBSD: ufsmount.h,v 1.39 2012/10/19 17:09:08 drochner Exp */ 2/* from NetBSD: ufsmount.h,v 1.39 2012/10/19 17:09:08 drochner Exp */
3 3
4/* 4/*
5 * Copyright (c) 1982, 1986, 1989, 1993 5 * Copyright (c) 1982, 1986, 1989, 1993
6 * The Regents of the University of California. All rights reserved. 6 * The Regents of the University of California. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -50,44 +50,35 @@ @@ -50,44 +50,35 @@
50 50
51struct buf; 51struct buf;
52struct inode; 52struct inode;
53struct nameidata; 53struct nameidata;
54struct timeval; 54struct timeval;
55struct uio; 55struct uio;
56struct vnode; 56struct vnode;
57 57
58/* This structure describes the ULFS specific mount structure data. */ 58/* This structure describes the ULFS specific mount structure data. */
59struct ulfsmount { 59struct ulfsmount {
60 /* Abstract vfs-level filesystem structure. */ 60 /* Abstract vfs-level filesystem structure. */
61 struct mount *um_mountp; 61 struct mount *um_mountp;
62 62
63 /* The block device we're mounted on. */ 
64 dev_t um_dev; 
65 struct vnode *um_devvp; 
66 
67 /* type of fs; currently always ULFS1, theoretically also ULFS2 */ 63 /* type of fs; currently always ULFS1, theoretically also ULFS2 */
68 u_long um_fstype; 64 u_long um_fstype;
69 65
70 /* pointer to the filesystem-specific filesystem structure */ 66 /* pointer to the filesystem-specific filesystem structure */
71 struct lfs *um_lfs; 67 struct lfs *um_lfs;
72 68
73 /* Extended attribute information. */ 69 /* Extended attribute information. */
74 struct ulfs_extattr_per_mount um_extattr; 70 struct ulfs_extattr_per_mount um_extattr;
75 71
76 /* Cleaner lwp, set on first bmapv syscall. */ 
77 struct lwp *um_cleaner_thread; 
78 
79 /* Hint from cleaner, only valid if curlwp == um_cleaner_thread. */ 
80 BLOCK_INFO *um_cleaner_hint; 
81 /* Quota-related material. */ 72 /* Quota-related material. */
82 struct vnode *um_quotas[ULFS_MAXQUOTAS]; /* quota files */ 73 struct vnode *um_quotas[ULFS_MAXQUOTAS]; /* quota files */
83 kauth_cred_t um_cred[ULFS_MAXQUOTAS]; /* quota file access cred */ 74 kauth_cred_t um_cred[ULFS_MAXQUOTAS]; /* quota file access cred */
84 union { 75 union {
85 struct um_q1 { 76 struct um_q1 {
86 time_t q1_btime[ULFS_MAXQUOTAS]; /* block quota time limit */ 77 time_t q1_btime[ULFS_MAXQUOTAS]; /* block quota time limit */
87 time_t q1_itime[ULFS_MAXQUOTAS]; /* inode quota time limit */ 78 time_t q1_itime[ULFS_MAXQUOTAS]; /* inode quota time limit */
88 char q1_qflags[ULFS_MAXQUOTAS]; /* quota flags */ 79 char q1_qflags[ULFS_MAXQUOTAS]; /* quota flags */
89 } um_q1; 80 } um_q1;
90 struct um_q2 { 81 struct um_q2 {
91 uint64_t q2_bsize; /* block size of quota file */ 82 uint64_t q2_bsize; /* block size of quota file */
92 uint64_t q2_bmask; /* mask for above */ 83 uint64_t q2_bmask; /* mask for above */
93 } um_q2; 84 } um_q2;