|
|
| version 1.521, 2007/06/08 16:05:36 | version 1.522, 2007/07/09 06:12:03 |
|---|---|
| Line 51 | Line 51 |
| #include "xfs_acl.h" | #include "xfs_acl.h" |
| #include "xfs_attr.h" | #include "xfs_attr.h" |
| #include "xfs_clnt.h" | #include "xfs_clnt.h" |
| #include "xfs_mru_cache.h" | |
| #include "xfs_filestream.h" | |
| #include "xfs_fsops.h" | #include "xfs_fsops.h" |
| STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); | STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); |
| Line 81 xfs_init(void) | Line 83 xfs_init(void) |
| xfs_dabuf_zone = kmem_zone_init(sizeof(xfs_dabuf_t), "xfs_dabuf"); | xfs_dabuf_zone = kmem_zone_init(sizeof(xfs_dabuf_t), "xfs_dabuf"); |
| xfs_ifork_zone = kmem_zone_init(sizeof(xfs_ifork_t), "xfs_ifork"); | xfs_ifork_zone = kmem_zone_init(sizeof(xfs_ifork_t), "xfs_ifork"); |
| xfs_acl_zone_init(xfs_acl_zone, "xfs_acl"); | xfs_acl_zone_init(xfs_acl_zone, "xfs_acl"); |
| xfs_mru_cache_init(); | |
| xfs_filestream_init(); | |
| /* | /* |
| * The size of the zone allocated buf log item is the maximum | * The size of the zone allocated buf log item is the maximum |
| Line 164 xfs_cleanup(void) | Line 168 xfs_cleanup(void) |
| xfs_cleanup_procfs(); | xfs_cleanup_procfs(); |
| xfs_sysctl_unregister(); | xfs_sysctl_unregister(); |
| xfs_refcache_destroy(); | xfs_refcache_destroy(); |
| xfs_filestream_uninit(); | |
| xfs_mru_cache_uninit(); | |
| xfs_acl_zone_destroy(xfs_acl_zone); | xfs_acl_zone_destroy(xfs_acl_zone); |
| #ifdef XFS_DIR2_TRACE | #ifdef XFS_DIR2_TRACE |
| Line 320 xfs_start_flags( | Line 326 xfs_start_flags( |
| else | else |
| mp->m_flags &= ~XFS_MOUNT_BARRIER; | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
| if (ap->flags2 & XFSMNT2_FILESTREAMS) | |
| mp->m_flags |= XFS_MOUNT_FILESTREAMS; | |
| return 0; | return 0; |
| } | } |
| Line 518 xfs_mount( | Line 527 xfs_mount( |
| if (mp->m_flags & XFS_MOUNT_BARRIER) | if (mp->m_flags & XFS_MOUNT_BARRIER) |
| xfs_mountfs_check_barriers(mp); | xfs_mountfs_check_barriers(mp); |
| if ((error = xfs_filestream_mount(mp))) | |
| goto error2; | |
| error = XFS_IOINIT(vfsp, args, flags); | error = XFS_IOINIT(vfsp, args, flags); |
| if (error) | if (error) |
| goto error2; | goto error2; |
| Line 575 xfs_unmount( | Line 587 xfs_unmount( |
| */ | */ |
| xfs_refcache_purge_mp(mp); | xfs_refcache_purge_mp(mp); |
| /* | |
| * Blow away any referenced inode in the filestreams cache. | |
| * This can and will cause log traffic as inodes go inactive | |
| * here. | |
| */ | |
| xfs_filestream_unmount(mp); | |
| XFS_bflush(mp->m_ddev_targp); | XFS_bflush(mp->m_ddev_targp); |
| error = xfs_unmount_flush(mp, 0); | error = xfs_unmount_flush(mp, 0); |
| if (error) | if (error) |
| Line 694 xfs_mntupdate( | Line 713 xfs_mntupdate( |
| mp->m_flags &= ~XFS_MOUNT_BARRIER; | mp->m_flags &= ~XFS_MOUNT_BARRIER; |
| } | } |
| } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ | } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ |
| xfs_filestream_flush(mp); | |
| bhv_vfs_sync(vfsp, SYNC_DATA_QUIESCE, NULL); | bhv_vfs_sync(vfsp, SYNC_DATA_QUIESCE, NULL); |
| xfs_attr_quiesce(mp); | xfs_attr_quiesce(mp); |
| vfsp->vfs_flag |= VFS_RDONLY; | vfsp->vfs_flag |= VFS_RDONLY; |
| Line 909 xfs_sync( | Line 929 xfs_sync( |
| { | { |
| xfs_mount_t *mp = XFS_BHVTOM(bdp); | xfs_mount_t *mp = XFS_BHVTOM(bdp); |
| if (flags & SYNC_IOWAIT) | |
| xfs_filestream_flush(mp); | |
| return xfs_syncsub(mp, flags, NULL); | return xfs_syncsub(mp, flags, NULL); |
| } | } |
| Line 1659 xfs_vget( | Line 1682 xfs_vget( |
| * in stat(). */ | * in stat(). */ |
| #define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */ | #define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */ |
| #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ | #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ |
| #define MNTOPT_FILESTREAM "filestreams" /* use filestreams allocator */ | |
| STATIC unsigned long | STATIC unsigned long |
| suffix_strtoul(char *s, char **endp, unsigned int base) | suffix_strtoul(char *s, char **endp, unsigned int base) |
| Line 1845 xfs_parseargs( | Line 1869 xfs_parseargs( |
| args->flags |= XFSMNT_ATTR2; | args->flags |= XFSMNT_ATTR2; |
| } else if (!strcmp(this_char, MNTOPT_NOATTR2)) { | } else if (!strcmp(this_char, MNTOPT_NOATTR2)) { |
| args->flags &= ~XFSMNT_ATTR2; | args->flags &= ~XFSMNT_ATTR2; |
| } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) { | |
| args->flags2 |= XFSMNT2_FILESTREAMS; | |
| } else if (!strcmp(this_char, "osyncisdsync")) { | } else if (!strcmp(this_char, "osyncisdsync")) { |
| /* no-op, this is now the default */ | /* no-op, this is now the default */ |
| cmn_err(CE_WARN, | cmn_err(CE_WARN, |