diff options
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 1d68ffcdeaa7..979a77d4b87d 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c | |||
@@ -17,12 +17,12 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "xfs.h" | 19 | #include "xfs.h" |
20 | #include "xfs_format.h" | ||
20 | #include "xfs_log.h" | 21 | #include "xfs_log.h" |
21 | #include "xfs_inum.h" | 22 | #include "xfs_inum.h" |
22 | #include "xfs_trans.h" | 23 | #include "xfs_trans.h" |
23 | #include "xfs_sb.h" | 24 | #include "xfs_sb.h" |
24 | #include "xfs_ag.h" | 25 | #include "xfs_ag.h" |
25 | #include "xfs_dir2.h" | ||
26 | #include "xfs_alloc.h" | 26 | #include "xfs_alloc.h" |
27 | #include "xfs_quota.h" | 27 | #include "xfs_quota.h" |
28 | #include "xfs_mount.h" | 28 | #include "xfs_mount.h" |
@@ -40,12 +40,12 @@ | |||
40 | #include "xfs_fsops.h" | 40 | #include "xfs_fsops.h" |
41 | #include "xfs_attr.h" | 41 | #include "xfs_attr.h" |
42 | #include "xfs_buf_item.h" | 42 | #include "xfs_buf_item.h" |
43 | #include "xfs_utils.h" | ||
44 | #include "xfs_vnodeops.h" | ||
45 | #include "xfs_log_priv.h" | 43 | #include "xfs_log_priv.h" |
46 | #include "xfs_trans_priv.h" | 44 | #include "xfs_trans_priv.h" |
47 | #include "xfs_filestream.h" | 45 | #include "xfs_filestream.h" |
48 | #include "xfs_da_btree.h" | 46 | #include "xfs_da_btree.h" |
47 | #include "xfs_dir2_format.h" | ||
48 | #include "xfs_dir2.h" | ||
49 | #include "xfs_extfree_item.h" | 49 | #include "xfs_extfree_item.h" |
50 | #include "xfs_mru_cache.h" | 50 | #include "xfs_mru_cache.h" |
51 | #include "xfs_inode_item.h" | 51 | #include "xfs_inode_item.h" |
@@ -421,12 +421,6 @@ xfs_parseargs( | |||
421 | } | 421 | } |
422 | #endif | 422 | #endif |
423 | 423 | ||
424 | if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && | ||
425 | (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE))) { | ||
426 | xfs_warn(mp, "cannot mount with both project and group quota"); | ||
427 | return EINVAL; | ||
428 | } | ||
429 | |||
430 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { | 424 | if ((dsunit && !dswidth) || (!dsunit && dswidth)) { |
431 | xfs_warn(mp, "sunit and swidth must be specified together"); | 425 | xfs_warn(mp, "sunit and swidth must be specified together"); |
432 | return EINVAL; | 426 | return EINVAL; |
@@ -556,14 +550,13 @@ xfs_showargs( | |||
556 | else if (mp->m_qflags & XFS_UQUOTA_ACCT) | 550 | else if (mp->m_qflags & XFS_UQUOTA_ACCT) |
557 | seq_puts(m, "," MNTOPT_UQUOTANOENF); | 551 | seq_puts(m, "," MNTOPT_UQUOTANOENF); |
558 | 552 | ||
559 | /* Either project or group quotas can be active, not both */ | ||
560 | |||
561 | if (mp->m_qflags & XFS_PQUOTA_ACCT) { | 553 | if (mp->m_qflags & XFS_PQUOTA_ACCT) { |
562 | if (mp->m_qflags & XFS_PQUOTA_ENFD) | 554 | if (mp->m_qflags & XFS_PQUOTA_ENFD) |
563 | seq_puts(m, "," MNTOPT_PRJQUOTA); | 555 | seq_puts(m, "," MNTOPT_PRJQUOTA); |
564 | else | 556 | else |
565 | seq_puts(m, "," MNTOPT_PQUOTANOENF); | 557 | seq_puts(m, "," MNTOPT_PQUOTANOENF); |
566 | } else if (mp->m_qflags & XFS_GQUOTA_ACCT) { | 558 | } |
559 | if (mp->m_qflags & XFS_GQUOTA_ACCT) { | ||
567 | if (mp->m_qflags & XFS_GQUOTA_ENFD) | 560 | if (mp->m_qflags & XFS_GQUOTA_ENFD) |
568 | seq_puts(m, "," MNTOPT_GRPQUOTA); | 561 | seq_puts(m, "," MNTOPT_GRPQUOTA); |
569 | else | 562 | else |
@@ -870,17 +863,17 @@ xfs_init_mount_workqueues( | |||
870 | goto out_destroy_unwritten; | 863 | goto out_destroy_unwritten; |
871 | 864 | ||
872 | mp->m_reclaim_workqueue = alloc_workqueue("xfs-reclaim/%s", | 865 | mp->m_reclaim_workqueue = alloc_workqueue("xfs-reclaim/%s", |
873 | WQ_NON_REENTRANT, 0, mp->m_fsname); | 866 | 0, 0, mp->m_fsname); |
874 | if (!mp->m_reclaim_workqueue) | 867 | if (!mp->m_reclaim_workqueue) |
875 | goto out_destroy_cil; | 868 | goto out_destroy_cil; |
876 | 869 | ||
877 | mp->m_log_workqueue = alloc_workqueue("xfs-log/%s", | 870 | mp->m_log_workqueue = alloc_workqueue("xfs-log/%s", |
878 | WQ_NON_REENTRANT, 0, mp->m_fsname); | 871 | 0, 0, mp->m_fsname); |
879 | if (!mp->m_log_workqueue) | 872 | if (!mp->m_log_workqueue) |
880 | goto out_destroy_reclaim; | 873 | goto out_destroy_reclaim; |
881 | 874 | ||
882 | mp->m_eofblocks_workqueue = alloc_workqueue("xfs-eofblocks/%s", | 875 | mp->m_eofblocks_workqueue = alloc_workqueue("xfs-eofblocks/%s", |
883 | WQ_NON_REENTRANT, 0, mp->m_fsname); | 876 | 0, 0, mp->m_fsname); |
884 | if (!mp->m_eofblocks_workqueue) | 877 | if (!mp->m_eofblocks_workqueue) |
885 | goto out_destroy_log; | 878 | goto out_destroy_log; |
886 | 879 | ||
@@ -1396,6 +1389,14 @@ xfs_finish_flags( | |||
1396 | return XFS_ERROR(EROFS); | 1389 | return XFS_ERROR(EROFS); |
1397 | } | 1390 | } |
1398 | 1391 | ||
1392 | if ((mp->m_qflags & (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE)) && | ||
1393 | (mp->m_qflags & (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE)) && | ||
1394 | !xfs_sb_version_has_pquotino(&mp->m_sb)) { | ||
1395 | xfs_warn(mp, | ||
1396 | "Super block does not support project and group quota together"); | ||
1397 | return XFS_ERROR(EINVAL); | ||
1398 | } | ||
1399 | |||
1399 | return 0; | 1400 | return 0; |
1400 | } | 1401 | } |
1401 | 1402 | ||