Author: mckusick
Date: Sun Jul 24 17:43:09 2011
New Revision: 224290
URL: http://svn.freebsd.org/changeset/base/224290

Log:
  This update changes the mnt_flag field in the mount structure from
  32 bits to 64 bits and eliminates the unused mnt_xflag field.  The
  existing mnt_flag field is completely out of bits, so this update
  gives us room to expand. Note that the f_flags field in the statfs
  structure is already 64 bits, so the expanded mnt_flag field can
  be exported without having to make any changes in the statfs structure.
  
  Approved by: re (bz)

Modified:
  head/sys/fs/cd9660/iso.h
  head/sys/fs/msdosfs/msdosfsmount.h
  head/sys/fs/ntfs/ntfs.h
  head/sys/fs/smbfs/smbfs.h
  head/sys/kern/kern_jail.c
  head/sys/kern/vfs_mount.c
  head/sys/sys/mount.h

Modified: head/sys/fs/cd9660/iso.h
==============================================================================
--- head/sys/fs/cd9660/iso.h    Sun Jul 24 17:24:26 2011        (r224289)
+++ head/sys/fs/cd9660/iso.h    Sun Jul 24 17:43:09 2011        (r224290)
@@ -220,7 +220,7 @@ enum ISO_FTYPE      { ISO_FTYPE_DEFAULT, ISO_
 #endif
 
 struct iso_mnt {
-       int im_flags;
+       uint64_t im_flags;
 
        struct mount *im_mountp;
        struct cdev *im_dev;

Modified: head/sys/fs/msdosfs/msdosfsmount.h
==============================================================================
--- head/sys/fs/msdosfs/msdosfsmount.h  Sun Jul 24 17:24:26 2011        
(r224289)
+++ head/sys/fs/msdosfs/msdosfsmount.h  Sun Jul 24 17:43:09 2011        
(r224290)
@@ -103,7 +103,7 @@ struct msdosfsmount {
        u_int pm_fatdiv;        /*      offset computation */
        u_int pm_curfat;        /* current fat for FAT32 (0 otherwise) */
        u_int *pm_inusemap;     /* ptr to bitmap of in-use clusters */
-       u_int pm_flags;         /* see below */
+       uint64_t pm_flags;      /* see below */
        void *pm_u2w;   /* Local->Unicode iconv handle */
        void *pm_w2u;   /* Unicode->Local iconv handle */
        void *pm_u2d;   /* Unicode->DOS iconv handle */

Modified: head/sys/fs/ntfs/ntfs.h
==============================================================================
--- head/sys/fs/ntfs/ntfs.h     Sun Jul 24 17:24:26 2011        (r224289)
+++ head/sys/fs/ntfs/ntfs.h     Sun Jul 24 17:43:09 2011        (r224290)
@@ -250,7 +250,7 @@ struct ntfsmount {
        uid_t           ntm_uid;
        gid_t           ntm_gid;
        mode_t          ntm_mode;
-       u_int           ntm_flag;
+       uint64_t        ntm_flag;
        cn_t            ntm_cfree;
        struct ntvattrdef *ntm_ad;
        int             ntm_adnum;

Modified: head/sys/fs/smbfs/smbfs.h
==============================================================================
--- head/sys/fs/smbfs/smbfs.h   Sun Jul 24 17:24:26 2011        (r224289)
+++ head/sys/fs/smbfs/smbfs.h   Sun Jul 24 17:43:09 2011        (r224290)
@@ -80,7 +80,7 @@ struct smbmount {
        struct mount *          sm_mp;
        struct smbnode *        sm_root;
        struct ucred *          sm_owner;
-       u_int                   sm_flags;
+       uint64_t                sm_flags;
        long                    sm_nextino;
        struct smb_share *      sm_share;
 /*     struct simplelock       sm_npslock;*/

Modified: head/sys/kern/kern_jail.c
==============================================================================
--- head/sys/kern/kern_jail.c   Sun Jul 24 17:24:26 2011        (r224289)
+++ head/sys/kern/kern_jail.c   Sun Jul 24 17:43:09 2011        (r224290)
@@ -540,8 +540,8 @@ kern_jail_set(struct thread *td, struct 
 #ifdef INET6
        int ip6s, redo_ip6;
 #endif
-       unsigned pr_flags, ch_flags;
-       unsigned pr_allow, ch_allow, tallow;
+       uint64_t pr_allow, ch_allow, pr_flags, ch_flags;
+       unsigned tallow;
        char numbuf[12];
 
        error = priv_check(td, PRIV_JAIL_SET);

Modified: head/sys/kern/vfs_mount.c
==============================================================================
--- head/sys/kern/vfs_mount.c   Sun Jul 24 17:24:26 2011        (r224289)
+++ head/sys/kern/vfs_mount.c   Sun Jul 24 17:43:09 2011        (r224290)
@@ -1496,7 +1496,8 @@ vfs_getopts(struct vfsoptlist *opts, con
 }
 
 int
-vfs_flagopt(struct vfsoptlist *opts, const char *name, u_int *w, u_int val)
+vfs_flagopt(struct vfsoptlist *opts, const char *name, uint64_t *w,
+       uint64_t val)
 {
        struct vfsopt *opt;
 

Modified: head/sys/sys/mount.h
==============================================================================
--- head/sys/sys/mount.h        Sun Jul 24 17:24:26 2011        (r224289)
+++ head/sys/sys/mount.h        Sun Jul 24 17:43:09 2011        (r224290)
@@ -166,8 +166,7 @@ struct mount {
        int             mnt_nvnodelistsize;     /* (i) # of vnodes */
        int             mnt_writeopcount;       /* (i) write syscalls pending */
        int             mnt_kern_flag;          /* (i) kernel only flags */
-       u_int           mnt_flag;               /* (i) flags shared with user */
-       u_int           mnt_xflag;              /* (i) more flags shared with 
user */
+       uint64_t        mnt_flag;               /* (i) flags shared with user */
        u_int           mnt_noasync;            /* (i) # noasync overrides */
        struct vfsoptlist *mnt_opt;             /* current mount options */
        struct vfsoptlist *mnt_optnew;          /* new options passed to fs */
@@ -224,43 +223,43 @@ void          __mnt_vnode_markerfree(str
 /*
  * User specifiable flags, stored in mnt_flag.
  */
-#define        MNT_RDONLY      0x00000001      /* read only filesystem */
-#define        MNT_SYNCHRONOUS 0x00000002      /* filesystem written 
synchronously */
-#define        MNT_NOEXEC      0x00000004      /* can't exec from filesystem */
-#define        MNT_NOSUID      0x00000008      /* don't honor setuid bits on 
fs */
-#define        MNT_UNION       0x00000020      /* union with underlying 
filesystem */
-#define        MNT_ASYNC       0x00000040      /* filesystem written 
asynchronously */
-#define        MNT_SUIDDIR     0x00100000      /* special handling of SUID on 
dirs */
-#define        MNT_SOFTDEP     0x00200000      /* soft updates being done */
-#define        MNT_NOSYMFOLLOW 0x00400000      /* do not follow symlinks */
-#define        MNT_GJOURNAL    0x02000000      /* GEOM journal support enabled 
*/
-#define        MNT_MULTILABEL  0x04000000      /* MAC support for individual 
objects */
-#define        MNT_ACLS        0x08000000      /* ACL support enabled */
-#define        MNT_NOATIME     0x10000000      /* disable update of file 
access time */
-#define        MNT_NOCLUSTERR  0x40000000      /* disable cluster read */
-#define        MNT_NOCLUSTERW  0x80000000      /* disable cluster write */
-#define        MNT_NFS4ACLS    0x00000010
+#define        MNT_RDONLY      0x0000000000000001ULL /* read only filesystem */
+#define        MNT_SYNCHRONOUS 0x0000000000000002ULL /* fs written 
synchronously */
+#define        MNT_NOEXEC      0x0000000000000004ULL /* can't exec from 
filesystem */
+#define        MNT_NOSUID      0x0000000000000008ULL /* don't honor setuid fs 
bits */
+#define        MNT_NFS4ACLS    0x0000000000000010ULL /* enable NFS version 4 
ACLs */
+#define        MNT_UNION       0x0000000000000020ULL /* union with underlying 
fs */
+#define        MNT_ASYNC       0x0000000000000040ULL /* fs written 
asynchronously */
+#define        MNT_SUIDDIR     0x0000000000100000ULL /* special SUID dir 
handling */
+#define        MNT_SOFTDEP     0x0000000000200000ULL /* using soft updates */
+#define        MNT_NOSYMFOLLOW 0x0000000000400000ULL /* do not follow symlinks 
*/
+#define        MNT_GJOURNAL    0x0000000002000000ULL /* GEOM journal support 
enabled */
+#define        MNT_MULTILABEL  0x0000000004000000ULL /* MAC support for 
objects */
+#define        MNT_ACLS        0x0000000008000000ULL /* ACL support enabled */
+#define        MNT_NOATIME     0x0000000010000000ULL /* dont update file 
access time */
+#define        MNT_NOCLUSTERR  0x0000000040000000ULL /* disable cluster read */
+#define        MNT_NOCLUSTERW  0x0000000080000000ULL /* disable cluster write 
*/
 
 /*
  * NFS export related mount flags.
  */
-#define        MNT_EXRDONLY    0x00000080      /* exported read only */
-#define        MNT_EXPORTED    0x00000100      /* filesystem is exported */
-#define        MNT_DEFEXPORTED 0x00000200      /* exported to the world */
-#define        MNT_EXPORTANON  0x00000400      /* use anon uid mapping for 
everyone */
-#define        MNT_EXKERB      0x00000800      /* exported with Kerberos uid 
mapping */
-#define        MNT_EXPUBLIC    0x20000000      /* public export (WebNFS) */
+#define        MNT_EXRDONLY    0x0000000000000080ULL   /* exported read only */
+#define        MNT_EXPORTED    0x0000000000000100ULL   /* filesystem is 
exported */
+#define        MNT_DEFEXPORTED 0x0000000000000200ULL   /* exported to the 
world */
+#define        MNT_EXPORTANON  0x0000000000000400ULL   /* anon uid mapping for 
all */
+#define        MNT_EXKERB      0x0000000000000800ULL   /* exported with 
Kerberos */
+#define        MNT_EXPUBLIC    0x0000000020000000ULL   /* public export 
(WebNFS) */
 
 /*
  * Flags set by internal operations,
  * but visible to the user.
  * XXX some of these are not quite right.. (I've never seen the root flag set)
  */
-#define        MNT_LOCAL       0x00001000      /* filesystem is stored locally 
*/
-#define        MNT_QUOTA       0x00002000      /* quotas are enabled on 
filesystem */
-#define        MNT_ROOTFS      0x00004000      /* identifies the root 
filesystem */
-#define        MNT_USER        0x00008000      /* mounted by a user */
-#define        MNT_IGNORE      0x00800000      /* do not show entry in df */
+#define        MNT_LOCAL       0x0000000000001000ULL /* filesystem is stored 
locally */
+#define        MNT_QUOTA       0x0000000000002000ULL /* quotas are enabled on 
fs */
+#define        MNT_ROOTFS      0x0000000000004000ULL /* identifies the root fs 
*/
+#define        MNT_USER        0x0000000000008000ULL /* mounted by a user */
+#define        MNT_IGNORE      0x0000000000800000ULL /* do not show entry in 
df */
 
 /*
  * Mask of flags that are visible to statfs().
@@ -293,12 +292,12 @@ void          __mnt_vnode_markerfree(str
  * XXX: MNT_BYFSID collides with MNT_ACLS, but because MNT_ACLS is only used 
for
  *      mount(2) and MNT_BYFSID is only used for unmount(2) it's harmless.
  */
-#define        MNT_UPDATE      0x00010000      /* not a real mount, just an 
update */
-#define        MNT_DELEXPORT   0x00020000      /* delete export host lists */
-#define        MNT_RELOAD      0x00040000      /* reload filesystem data */
-#define        MNT_FORCE       0x00080000      /* force unmount or readonly 
change */
-#define        MNT_SNAPSHOT    0x01000000      /* snapshot the filesystem */
-#define        MNT_BYFSID      0x08000000      /* specify filesystem by ID. */
+#define        MNT_UPDATE      0x0000000000010000ULL /* not real mount, just 
update */
+#define        MNT_DELEXPORT   0x0000000000020000ULL /* delete export host 
lists */
+#define        MNT_RELOAD      0x0000000000040000ULL /* reload filesystem data 
*/
+#define        MNT_FORCE       0x0000000000080000ULL /* force unmount or 
readonly */
+#define        MNT_SNAPSHOT    0x0000000001000000ULL /* snapshot the 
filesystem */
+#define        MNT_BYFSID      0x0000000008000000ULL /* specify filesystem by 
ID. */
 #define MNT_CMDFLAGS   (MNT_UPDATE     | MNT_DELEXPORT | MNT_RELOAD    | \
                        MNT_FORCE       | MNT_SNAPSHOT  | MNT_BYFSID)
 /*
@@ -715,7 +714,8 @@ void        vfs_event_signal(fsid_t *, u_int32_
 void   vfs_freeopts(struct vfsoptlist *opts);
 void   vfs_deleteopt(struct vfsoptlist *opts, const char *name);
 int    vfs_buildopts(struct uio *auio, struct vfsoptlist **options);
-int    vfs_flagopt(struct vfsoptlist *opts, const char *name, u_int *w, u_int 
val);
+int    vfs_flagopt(struct vfsoptlist *opts, const char *name, uint64_t *w,
+           uint64_t val);
 int    vfs_getopt(struct vfsoptlist *, const char *, void **, int *);
 int    vfs_getopt_pos(struct vfsoptlist *opts, const char *name);
 char   *vfs_getopts(struct vfsoptlist *, const char *, int *error);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to