diff options
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 3033ba5e9762..1d68ffcdeaa7 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include "xfs_inode_item.h" | 51 | #include "xfs_inode_item.h" |
52 | #include "xfs_icache.h" | 52 | #include "xfs_icache.h" |
53 | #include "xfs_trace.h" | 53 | #include "xfs_trace.h" |
54 | #include "xfs_icreate_item.h" | ||
54 | 55 | ||
55 | #include <linux/namei.h> | 56 | #include <linux/namei.h> |
56 | #include <linux/init.h> | 57 | #include <linux/init.h> |
@@ -359,17 +360,17 @@ xfs_parseargs( | |||
359 | } else if (!strcmp(this_char, MNTOPT_PQUOTA) || | 360 | } else if (!strcmp(this_char, MNTOPT_PQUOTA) || |
360 | !strcmp(this_char, MNTOPT_PRJQUOTA)) { | 361 | !strcmp(this_char, MNTOPT_PRJQUOTA)) { |
361 | mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE | | 362 | mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE | |
362 | XFS_OQUOTA_ENFD); | 363 | XFS_PQUOTA_ENFD); |
363 | } else if (!strcmp(this_char, MNTOPT_PQUOTANOENF)) { | 364 | } else if (!strcmp(this_char, MNTOPT_PQUOTANOENF)) { |
364 | mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE); | 365 | mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE); |
365 | mp->m_qflags &= ~XFS_OQUOTA_ENFD; | 366 | mp->m_qflags &= ~XFS_PQUOTA_ENFD; |
366 | } else if (!strcmp(this_char, MNTOPT_GQUOTA) || | 367 | } else if (!strcmp(this_char, MNTOPT_GQUOTA) || |
367 | !strcmp(this_char, MNTOPT_GRPQUOTA)) { | 368 | !strcmp(this_char, MNTOPT_GRPQUOTA)) { |
368 | mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE | | 369 | mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE | |
369 | XFS_OQUOTA_ENFD); | 370 | XFS_GQUOTA_ENFD); |
370 | } else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) { | 371 | } else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) { |
371 | mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE); | 372 | mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE); |
372 | mp->m_qflags &= ~XFS_OQUOTA_ENFD; | 373 | mp->m_qflags &= ~XFS_GQUOTA_ENFD; |
373 | } else if (!strcmp(this_char, MNTOPT_DELAYLOG)) { | 374 | } else if (!strcmp(this_char, MNTOPT_DELAYLOG)) { |
374 | xfs_warn(mp, | 375 | xfs_warn(mp, |
375 | "delaylog is the default now, option is deprecated."); | 376 | "delaylog is the default now, option is deprecated."); |
@@ -439,20 +440,15 @@ xfs_parseargs( | |||
439 | } | 440 | } |
440 | 441 | ||
441 | done: | 442 | done: |
442 | if (!(mp->m_flags & XFS_MOUNT_NOALIGN)) { | 443 | if (dsunit && !(mp->m_flags & XFS_MOUNT_NOALIGN)) { |
443 | /* | 444 | /* |
444 | * At this point the superblock has not been read | 445 | * At this point the superblock has not been read |
445 | * in, therefore we do not know the block size. | 446 | * in, therefore we do not know the block size. |
446 | * Before the mount call ends we will convert | 447 | * Before the mount call ends we will convert |
447 | * these to FSBs. | 448 | * these to FSBs. |
448 | */ | 449 | */ |
449 | if (dsunit) { | 450 | mp->m_dalign = dsunit; |
450 | mp->m_dalign = dsunit; | 451 | mp->m_swidth = dswidth; |
451 | mp->m_flags |= XFS_MOUNT_RETERR; | ||
452 | } | ||
453 | |||
454 | if (dswidth) | ||
455 | mp->m_swidth = dswidth; | ||
456 | } | 452 | } |
457 | 453 | ||
458 | if (mp->m_logbufs != -1 && | 454 | if (mp->m_logbufs != -1 && |
@@ -563,12 +559,12 @@ xfs_showargs( | |||
563 | /* Either project or group quotas can be active, not both */ | 559 | /* Either project or group quotas can be active, not both */ |
564 | 560 | ||
565 | if (mp->m_qflags & XFS_PQUOTA_ACCT) { | 561 | if (mp->m_qflags & XFS_PQUOTA_ACCT) { |
566 | if (mp->m_qflags & XFS_OQUOTA_ENFD) | 562 | if (mp->m_qflags & XFS_PQUOTA_ENFD) |
567 | seq_puts(m, "," MNTOPT_PRJQUOTA); | 563 | seq_puts(m, "," MNTOPT_PRJQUOTA); |
568 | else | 564 | else |
569 | seq_puts(m, "," MNTOPT_PQUOTANOENF); | 565 | seq_puts(m, "," MNTOPT_PQUOTANOENF); |
570 | } else if (mp->m_qflags & XFS_GQUOTA_ACCT) { | 566 | } else if (mp->m_qflags & XFS_GQUOTA_ACCT) { |
571 | if (mp->m_qflags & XFS_OQUOTA_ENFD) | 567 | if (mp->m_qflags & XFS_GQUOTA_ENFD) |
572 | seq_puts(m, "," MNTOPT_GRPQUOTA); | 568 | seq_puts(m, "," MNTOPT_GRPQUOTA); |
573 | else | 569 | else |
574 | seq_puts(m, "," MNTOPT_GQUOTANOENF); | 570 | seq_puts(m, "," MNTOPT_GQUOTANOENF); |
@@ -1136,8 +1132,8 @@ xfs_fs_statfs( | |||
1136 | spin_unlock(&mp->m_sb_lock); | 1132 | spin_unlock(&mp->m_sb_lock); |
1137 | 1133 | ||
1138 | if ((ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && | 1134 | if ((ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && |
1139 | ((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD))) == | 1135 | ((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD))) == |
1140 | (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD)) | 1136 | (XFS_PQUOTA_ACCT|XFS_PQUOTA_ENFD)) |
1141 | xfs_qm_statvfs(ip, statp); | 1137 | xfs_qm_statvfs(ip, statp); |
1142 | return 0; | 1138 | return 0; |
1143 | } | 1139 | } |
@@ -1481,6 +1477,10 @@ xfs_fs_fill_super( | |||
1481 | sb->s_time_gran = 1; | 1477 | sb->s_time_gran = 1; |
1482 | set_posix_acl_flag(sb); | 1478 | set_posix_acl_flag(sb); |
1483 | 1479 | ||
1480 | /* version 5 superblocks support inode version counters. */ | ||
1481 | if (XFS_SB_VERSION_NUM(&mp->m_sb) == XFS_SB_VERSION_5) | ||
1482 | sb->s_flags |= MS_I_VERSION; | ||
1483 | |||
1484 | error = xfs_mountfs(mp); | 1484 | error = xfs_mountfs(mp); |
1485 | if (error) | 1485 | if (error) |
1486 | goto out_filestream_unmount; | 1486 | goto out_filestream_unmount; |
@@ -1655,9 +1655,15 @@ xfs_init_zones(void) | |||
1655 | KM_ZONE_SPREAD, NULL); | 1655 | KM_ZONE_SPREAD, NULL); |
1656 | if (!xfs_ili_zone) | 1656 | if (!xfs_ili_zone) |
1657 | goto out_destroy_inode_zone; | 1657 | goto out_destroy_inode_zone; |
1658 | xfs_icreate_zone = kmem_zone_init(sizeof(struct xfs_icreate_item), | ||
1659 | "xfs_icr"); | ||
1660 | if (!xfs_icreate_zone) | ||
1661 | goto out_destroy_ili_zone; | ||
1658 | 1662 | ||
1659 | return 0; | 1663 | return 0; |
1660 | 1664 | ||
1665 | out_destroy_ili_zone: | ||
1666 | kmem_zone_destroy(xfs_ili_zone); | ||
1661 | out_destroy_inode_zone: | 1667 | out_destroy_inode_zone: |
1662 | kmem_zone_destroy(xfs_inode_zone); | 1668 | kmem_zone_destroy(xfs_inode_zone); |
1663 | out_destroy_efi_zone: | 1669 | out_destroy_efi_zone: |
@@ -1696,6 +1702,7 @@ xfs_destroy_zones(void) | |||
1696 | * destroy caches. | 1702 | * destroy caches. |
1697 | */ | 1703 | */ |
1698 | rcu_barrier(); | 1704 | rcu_barrier(); |
1705 | kmem_zone_destroy(xfs_icreate_zone); | ||
1699 | kmem_zone_destroy(xfs_ili_zone); | 1706 | kmem_zone_destroy(xfs_ili_zone); |
1700 | kmem_zone_destroy(xfs_inode_zone); | 1707 | kmem_zone_destroy(xfs_inode_zone); |
1701 | kmem_zone_destroy(xfs_efi_zone); | 1708 | kmem_zone_destroy(xfs_efi_zone); |