]> err.no Git - linux-2.6/blobdiff - fs/xfs/linux-2.6/xfs_super.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / fs / xfs / linux-2.6 / xfs_super.c
index 156a1a7da16bc9cf9ddc7dc75ee12e30a7172b37..8831d95187904f0ecf4a1aa1ac5b77cc767aec77 100644 (file)
@@ -171,7 +171,7 @@ xfs_parseargs(
        char                    *this_char, *value, *eov;
        int                     dsunit, dswidth, vol_dsunit, vol_dswidth;
        int                     iosize;
-       int                     ikeep = 0;
+       int                     dmapi_implies_ikeep = 1;
 
        args->flags |= XFSMNT_BARRIER;
        args->flags2 |= XFSMNT2_COMPAT_IOSIZE;
@@ -302,10 +302,10 @@ xfs_parseargs(
                } else if (!strcmp(this_char, MNTOPT_NOBARRIER)) {
                        args->flags &= ~XFSMNT_BARRIER;
                } else if (!strcmp(this_char, MNTOPT_IKEEP)) {
-                       ikeep = 1;
-                       args->flags &= ~XFSMNT_IDELETE;
+                       args->flags |= XFSMNT_IKEEP;
                } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
-                       args->flags |= XFSMNT_IDELETE;
+                       dmapi_implies_ikeep = 0;
+                       args->flags &= ~XFSMNT_IKEEP;
                } else if (!strcmp(this_char, MNTOPT_LARGEIO)) {
                        args->flags2 &= ~XFSMNT2_COMPAT_IOSIZE;
                } else if (!strcmp(this_char, MNTOPT_NOLARGEIO)) {
@@ -410,8 +410,8 @@ xfs_parseargs(
         * Note that if "ikeep" or "noikeep" mount options are
         * supplied, then they are honored.
         */
-       if (!(args->flags & XFSMNT_DMAPI) && !ikeep)
-               args->flags |= XFSMNT_IDELETE;
+       if ((args->flags & XFSMNT_DMAPI) && dmapi_implies_ikeep)
+               args->flags |= XFSMNT_IKEEP;
 
        if ((args->flags & XFSMNT_NOALIGN) != XFSMNT_NOALIGN) {
                if (dsunit) {
@@ -446,6 +446,7 @@ xfs_showargs(
 {
        static struct proc_xfs_info xfs_info_set[] = {
                /* the few simple ones we can get from the mount struct */
+               { XFS_MOUNT_IKEEP,              "," MNTOPT_IKEEP },
                { XFS_MOUNT_WSYNC,              "," MNTOPT_WSYNC },
                { XFS_MOUNT_INO64,              "," MNTOPT_INO64 },
                { XFS_MOUNT_NOALIGN,            "," MNTOPT_NOALIGN },
@@ -461,7 +462,6 @@ xfs_showargs(
        };
        static struct proc_xfs_info xfs_info_unset[] = {
                /* the few simple ones we can get from the mount struct */
-               { XFS_MOUNT_IDELETE,            "," MNTOPT_IKEEP },
                { XFS_MOUNT_COMPAT_IOSIZE,      "," MNTOPT_LARGEIO },
                { XFS_MOUNT_BARRIER,            "," MNTOPT_NOBARRIER },
                { XFS_MOUNT_SMALL_INUMS,        "," MNTOPT_64BITINODE },
@@ -569,7 +569,7 @@ xfs_set_inodeops(
                break;
        case S_IFLNK:
                inode->i_op = &xfs_symlink_inode_operations;
-               if (inode->i_blocks)
+               if (!(XFS_I(inode)->i_df.if_flags & XFS_IFINLINE))
                        inode->i_mapping->a_ops = &xfs_address_space_operations;
                break;
        default:
@@ -606,8 +606,6 @@ xfs_revalidate_inode(
 
        inode->i_generation = ip->i_d.di_gen;
        i_size_write(inode, ip->i_d.di_size);
-       inode->i_blocks =
-               XFS_FSB_TO_BB(mp, ip->i_d.di_nblocks + ip->i_delayed_blks);
        inode->i_atime.tv_sec   = ip->i_d.di_atime.t_sec;
        inode->i_atime.tv_nsec  = ip->i_d.di_atime.t_nsec;
        inode->i_mtime.tv_sec   = ip->i_d.di_mtime.t_sec;
@@ -851,7 +849,7 @@ xfs_fs_inode_init_once(
        inode_init_once(vn_to_inode((bhv_vnode_t *)vnode));
 }
 
-STATIC int
+STATIC int __init
 xfs_init_zones(void)
 {
        xfs_vnode_zone = kmem_zone_init_flags(sizeof(bhv_vnode_t), "xfs_vnode",
@@ -1346,9 +1344,11 @@ xfs_fs_fill_super(
        sb->s_time_gran = 1;
        set_posix_acl_flag(sb);
 
-       error = xfs_root(mp, &rootvp);
-       if (error)
+       rootvp = igrab(mp->m_rootip->i_vnode);
+       if (!rootvp) {
+               error = ENOENT;
                goto fail_unmount;
+       }
 
        sb->s_root = d_alloc_root(vn_to_inode(rootvp));
        if (!sb->s_root) {