diff options
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 9bdb3aeefe89..3b04f5d2e896 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -64,6 +64,7 @@ | |||
64 | #include "sysfile.h" | 64 | #include "sysfile.h" |
65 | #include "uptodate.h" | 65 | #include "uptodate.h" |
66 | #include "ver.h" | 66 | #include "ver.h" |
67 | #include "xattr.h" | ||
67 | 68 | ||
68 | #include "buffer_head_io.h" | 69 | #include "buffer_head_io.h" |
69 | 70 | ||
@@ -154,6 +155,8 @@ enum { | |||
154 | Opt_localalloc, | 155 | Opt_localalloc, |
155 | Opt_localflocks, | 156 | Opt_localflocks, |
156 | Opt_stack, | 157 | Opt_stack, |
158 | Opt_user_xattr, | ||
159 | Opt_nouser_xattr, | ||
157 | Opt_err, | 160 | Opt_err, |
158 | }; | 161 | }; |
159 | 162 | ||
@@ -173,6 +176,8 @@ static const match_table_t tokens = { | |||
173 | {Opt_localalloc, "localalloc=%d"}, | 176 | {Opt_localalloc, "localalloc=%d"}, |
174 | {Opt_localflocks, "localflocks"}, | 177 | {Opt_localflocks, "localflocks"}, |
175 | {Opt_stack, "cluster_stack=%s"}, | 178 | {Opt_stack, "cluster_stack=%s"}, |
179 | {Opt_user_xattr, "user_xattr"}, | ||
180 | {Opt_nouser_xattr, "nouser_xattr"}, | ||
176 | {Opt_err, NULL} | 181 | {Opt_err, NULL} |
177 | }; | 182 | }; |
178 | 183 | ||
@@ -848,6 +853,12 @@ static int ocfs2_parse_options(struct super_block *sb, | |||
848 | case Opt_data_writeback: | 853 | case Opt_data_writeback: |
849 | mopt->mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; | 854 | mopt->mount_opt |= OCFS2_MOUNT_DATA_WRITEBACK; |
850 | break; | 855 | break; |
856 | case Opt_user_xattr: | ||
857 | mopt->mount_opt &= ~OCFS2_MOUNT_NOUSERXATTR; | ||
858 | break; | ||
859 | case Opt_nouser_xattr: | ||
860 | mopt->mount_opt |= OCFS2_MOUNT_NOUSERXATTR; | ||
861 | break; | ||
851 | case Opt_atime_quantum: | 862 | case Opt_atime_quantum: |
852 | if (match_int(&args[0], &option)) { | 863 | if (match_int(&args[0], &option)) { |
853 | status = 0; | 864 | status = 0; |
@@ -1135,6 +1146,7 @@ static void ocfs2_inode_init_once(void *data) | |||
1135 | oi->ip_dir_start_lookup = 0; | 1146 | oi->ip_dir_start_lookup = 0; |
1136 | 1147 | ||
1137 | init_rwsem(&oi->ip_alloc_sem); | 1148 | init_rwsem(&oi->ip_alloc_sem); |
1149 | init_rwsem(&oi->ip_xattr_sem); | ||
1138 | mutex_init(&oi->ip_io_mutex); | 1150 | mutex_init(&oi->ip_io_mutex); |
1139 | 1151 | ||
1140 | oi->ip_blkno = 0ULL; | 1152 | oi->ip_blkno = 0ULL; |
@@ -1378,6 +1390,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1378 | sb->s_fs_info = osb; | 1390 | sb->s_fs_info = osb; |
1379 | sb->s_op = &ocfs2_sops; | 1391 | sb->s_op = &ocfs2_sops; |
1380 | sb->s_export_op = &ocfs2_export_ops; | 1392 | sb->s_export_op = &ocfs2_export_ops; |
1393 | sb->s_xattr = ocfs2_xattr_handlers; | ||
1381 | sb->s_time_gran = 1; | 1394 | sb->s_time_gran = 1; |
1382 | sb->s_flags |= MS_NOATIME; | 1395 | sb->s_flags |= MS_NOATIME; |
1383 | /* this is needed to support O_LARGEFILE */ | 1396 | /* this is needed to support O_LARGEFILE */ |
@@ -1574,6 +1587,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1574 | osb->first_cluster_group_blkno = | 1587 | osb->first_cluster_group_blkno = |
1575 | le64_to_cpu(di->id2.i_super.s_first_cluster_group); | 1588 | le64_to_cpu(di->id2.i_super.s_first_cluster_group); |
1576 | osb->fs_generation = le32_to_cpu(di->i_fs_generation); | 1589 | osb->fs_generation = le32_to_cpu(di->i_fs_generation); |
1590 | osb->uuid_hash = le32_to_cpu(di->id2.i_super.s_uuid_hash); | ||
1577 | mlog(0, "vol_label: %s\n", osb->vol_label); | 1591 | mlog(0, "vol_label: %s\n", osb->vol_label); |
1578 | mlog(0, "uuid: %s\n", osb->uuid_str); | 1592 | mlog(0, "uuid: %s\n", osb->uuid_str); |
1579 | mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n", | 1593 | mlog(0, "root_blkno=%llu, system_dir_blkno=%llu\n", |