Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
ocfs2/trivial: Use proper mask for 2 places in hearbeat.c
Ocfs2: Let ocfs2 support fiemap for symlink and fast symlink.
Ocfs2: Should ocfs2 support fiemap for S_IFDIR inode?
ocfs2: Use FIEMAP_EXTENT_SHARED
fiemap: Add new extent flag FIEMAP_EXTENT_SHARED
ocfs2: replace u8 by __u8 in ocfs2_fs.h
ocfs2: explicit declare uninitialized var in user_cluster_connect()
ocfs2-devel: remove redundant OCFS2_MOUNT_POSIX_ACL check in ocfs2_get_acl_nolock()
ocfs2: return -EAGAIN instead of EAGAIN in dlm
ocfs2/cluster: Make fence method configurable - v2
ocfs2: Set MS_POSIXACL on remount
ocfs2: Make acl use the default
ocfs2: Always include ACL support

+170 -116
+1 -9
fs/ocfs2/Kconfig
··· 6 6 select CRC32 7 7 select QUOTA 8 8 select QUOTA_TREE 9 + select FS_POSIX_ACL 9 10 help 10 11 OCFS2 is a general purpose extent based shared disk cluster file 11 12 system with many similarities to ext3. It supports 64 bit inode ··· 75 74 This option will enable expensive consistency checks. Enable 76 75 this option for debugging only as it is likely to decrease 77 76 performance of the filesystem. 78 - 79 - config OCFS2_FS_POSIX_ACL 80 - bool "OCFS2 POSIX Access Control Lists" 81 - depends on OCFS2_FS 82 - select FS_POSIX_ACL 83 - default n 84 - help 85 - Posix Access Control Lists (ACLs) support permissions for users and 86 - groups beyond the owner/group/world scheme.
+2 -5
fs/ocfs2/Makefile
··· 39 39 ver.o \ 40 40 quota_local.o \ 41 41 quota_global.o \ 42 - xattr.o 43 - 44 - ifeq ($(CONFIG_OCFS2_FS_POSIX_ACL),y) 45 - ocfs2-objs += acl.o 46 - endif 42 + xattr.o \ 43 + acl.o 47 44 48 45 ocfs2_stackglue-objs := stackglue.o 49 46 ocfs2_stack_o2cb-objs := stack_o2cb.o
-4
fs/ocfs2/acl.c
··· 98 98 int type, 99 99 struct buffer_head *di_bh) 100 100 { 101 - struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); 102 101 int name_index; 103 102 char *value = NULL; 104 103 struct posix_acl *acl; 105 104 int retval; 106 - 107 - if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL)) 108 - return NULL; 109 105 110 106 switch (type) { 111 107 case ACL_TYPE_ACCESS:
-22
fs/ocfs2/acl.h
··· 26 26 __le32 e_id; 27 27 }; 28 28 29 - #ifdef CONFIG_OCFS2_FS_POSIX_ACL 30 - 31 29 extern int ocfs2_check_acl(struct inode *, int); 32 30 extern int ocfs2_acl_chmod(struct inode *); 33 31 extern int ocfs2_init_acl(handle_t *, struct inode *, struct inode *, 34 32 struct buffer_head *, struct buffer_head *, 35 33 struct ocfs2_alloc_context *, 36 34 struct ocfs2_alloc_context *); 37 - 38 - #else /* CONFIG_OCFS2_FS_POSIX_ACL*/ 39 - 40 - #define ocfs2_check_acl NULL 41 - static inline int ocfs2_acl_chmod(struct inode *inode) 42 - { 43 - return 0; 44 - } 45 - static inline int ocfs2_init_acl(handle_t *handle, 46 - struct inode *inode, 47 - struct inode *dir, 48 - struct buffer_head *di_bh, 49 - struct buffer_head *dir_bh, 50 - struct ocfs2_alloc_context *meta_ac, 51 - struct ocfs2_alloc_context *data_ac) 52 - { 53 - return 0; 54 - } 55 - 56 - #endif /* CONFIG_OCFS2_FS_POSIX_ACL*/ 57 35 58 36 #endif /* OCFS2_ACL_H */
+4 -2
fs/ocfs2/cluster/heartbeat.c
··· 176 176 177 177 static void o2hb_arm_write_timeout(struct o2hb_region *reg) 178 178 { 179 - mlog(0, "Queue write timeout for %u ms\n", O2HB_MAX_WRITE_TIMEOUT_MS); 179 + mlog(ML_HEARTBEAT, "Queue write timeout for %u ms\n", 180 + O2HB_MAX_WRITE_TIMEOUT_MS); 180 181 181 182 cancel_delayed_work(&reg->hr_write_timeout_work); 182 183 reg->hr_last_timeout_start = jiffies; ··· 875 874 do_gettimeofday(&after_hb); 876 875 elapsed_msec = o2hb_elapsed_msecs(&before_hb, &after_hb); 877 876 878 - mlog(0, "start = %lu.%lu, end = %lu.%lu, msec = %u\n", 877 + mlog(ML_HEARTBEAT, 878 + "start = %lu.%lu, end = %lu.%lu, msec = %u\n", 879 879 before_hb.tv_sec, (unsigned long) before_hb.tv_usec, 880 880 after_hb.tv_sec, (unsigned long) after_hb.tv_usec, 881 881 elapsed_msec);
+51
fs/ocfs2/cluster/nodemanager.c
··· 35 35 * cluster references throughout where nodes are looked up */ 36 36 struct o2nm_cluster *o2nm_single_cluster = NULL; 37 37 38 + char *o2nm_fence_method_desc[O2NM_FENCE_METHODS] = { 39 + "reset", /* O2NM_FENCE_RESET */ 40 + "panic", /* O2NM_FENCE_PANIC */ 41 + }; 38 42 39 43 struct o2nm_node *o2nm_get_node_by_num(u8 node_num) 40 44 { ··· 583 579 return o2nm_cluster_attr_write(page, count, 584 580 &cluster->cl_reconnect_delay_ms); 585 581 } 582 + 583 + static ssize_t o2nm_cluster_attr_fence_method_read( 584 + struct o2nm_cluster *cluster, char *page) 585 + { 586 + ssize_t ret = 0; 587 + 588 + if (cluster) 589 + ret = sprintf(page, "%s\n", 590 + o2nm_fence_method_desc[cluster->cl_fence_method]); 591 + return ret; 592 + } 593 + 594 + static ssize_t o2nm_cluster_attr_fence_method_write( 595 + struct o2nm_cluster *cluster, const char *page, size_t count) 596 + { 597 + unsigned int i; 598 + 599 + if (page[count - 1] != '\n') 600 + goto bail; 601 + 602 + for (i = 0; i < O2NM_FENCE_METHODS; ++i) { 603 + if (count != strlen(o2nm_fence_method_desc[i]) + 1) 604 + continue; 605 + if (strncasecmp(page, o2nm_fence_method_desc[i], count - 1)) 606 + continue; 607 + if (cluster->cl_fence_method != i) { 608 + printk(KERN_INFO "ocfs2: Changing fence method to %s\n", 609 + o2nm_fence_method_desc[i]); 610 + cluster->cl_fence_method = i; 611 + } 612 + return count; 613 + } 614 + 615 + bail: 616 + return -EINVAL; 617 + } 618 + 586 619 static struct o2nm_cluster_attribute o2nm_cluster_attr_idle_timeout_ms = { 587 620 .attr = { .ca_owner = THIS_MODULE, 588 621 .ca_name = "idle_timeout_ms", ··· 644 603 .store = o2nm_cluster_attr_reconnect_delay_ms_write, 645 604 }; 646 605 606 + static struct o2nm_cluster_attribute o2nm_cluster_attr_fence_method = { 607 + .attr = { .ca_owner = THIS_MODULE, 608 + .ca_name = "fence_method", 609 + .ca_mode = S_IRUGO | S_IWUSR }, 610 + .show = o2nm_cluster_attr_fence_method_read, 611 + .store = o2nm_cluster_attr_fence_method_write, 612 + }; 613 + 647 614 static struct configfs_attribute *o2nm_cluster_attrs[] = { 648 615 &o2nm_cluster_attr_idle_timeout_ms.attr, 649 616 &o2nm_cluster_attr_keepalive_delay_ms.attr, 650 617 &o2nm_cluster_attr_reconnect_delay_ms.attr, 618 + &o2nm_cluster_attr_fence_method.attr, 651 619 NULL, 652 620 }; 653 621 static ssize_t o2nm_cluster_show(struct config_item *item, ··· 828 778 cluster->cl_reconnect_delay_ms = O2NET_RECONNECT_DELAY_MS_DEFAULT; 829 779 cluster->cl_idle_timeout_ms = O2NET_IDLE_TIMEOUT_MS_DEFAULT; 830 780 cluster->cl_keepalive_delay_ms = O2NET_KEEPALIVE_DELAY_MS_DEFAULT; 781 + cluster->cl_fence_method = O2NM_FENCE_RESET; 831 782 832 783 ret = &cluster->cl_group; 833 784 o2nm_single_cluster = cluster;
+7
fs/ocfs2/cluster/nodemanager.h
··· 33 33 #include <linux/configfs.h> 34 34 #include <linux/rbtree.h> 35 35 36 + enum o2nm_fence_method { 37 + O2NM_FENCE_RESET = 0, 38 + O2NM_FENCE_PANIC, 39 + O2NM_FENCE_METHODS, /* Number of fence methods */ 40 + }; 41 + 36 42 struct o2nm_node { 37 43 spinlock_t nd_lock; 38 44 struct config_item nd_item; ··· 64 58 unsigned int cl_idle_timeout_ms; 65 59 unsigned int cl_keepalive_delay_ms; 66 60 unsigned int cl_reconnect_delay_ms; 61 + enum o2nm_fence_method cl_fence_method; 67 62 68 63 /* this bitmap is part of a hack for disk bitmap.. will go eventually. - zab */ 69 64 unsigned long cl_nodes_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)];
+14 -2
fs/ocfs2/cluster/quorum.c
··· 74 74 * threads can still schedule, etc, etc */ 75 75 o2hb_stop_all_regions(); 76 76 77 - printk("ocfs2 is very sorry to be fencing this system by restarting\n"); 78 - emergency_restart(); 77 + switch (o2nm_single_cluster->cl_fence_method) { 78 + case O2NM_FENCE_PANIC: 79 + panic("*** ocfs2 is very sorry to be fencing this system by " 80 + "panicing ***\n"); 81 + break; 82 + default: 83 + WARN_ON(o2nm_single_cluster->cl_fence_method >= 84 + O2NM_FENCE_METHODS); 85 + case O2NM_FENCE_RESET: 86 + printk(KERN_ERR "*** ocfs2 is very sorry to be fencing this " 87 + "system by restarting ***\n"); 88 + emergency_restart(); 89 + break; 90 + }; 79 91 } 80 92 81 93 /* Indicate that a timeout occured on a hearbeat region write. The
+9 -9
fs/ocfs2/dlm/dlmrecovery.c
··· 2589 2589 "begin reco msg (%d)\n", dlm->name, nodenum, ret); 2590 2590 ret = 0; 2591 2591 } 2592 + if (ret == -EAGAIN) { 2593 + mlog(0, "%s: trying to start recovery of node " 2594 + "%u, but node %u is waiting for last recovery " 2595 + "to complete, backoff for a bit\n", dlm->name, 2596 + dead_node, nodenum); 2597 + msleep(100); 2598 + goto retry; 2599 + } 2592 2600 if (ret < 0) { 2593 2601 struct dlm_lock_resource *res; 2594 2602 /* this is now a serious problem, possibly ENOMEM ··· 2614 2606 } 2615 2607 /* sleep for a bit in hopes that we can avoid 2616 2608 * another ENOMEM */ 2617 - msleep(100); 2618 - goto retry; 2619 - } else if (ret == EAGAIN) { 2620 - mlog(0, "%s: trying to start recovery of node " 2621 - "%u, but node %u is waiting for last recovery " 2622 - "to complete, backoff for a bit\n", dlm->name, 2623 - dead_node, nodenum); 2624 - /* TODO Look into replacing msleep with cond_resched() */ 2625 2609 msleep(100); 2626 2610 goto retry; 2627 2611 } ··· 2639 2639 dlm->name, br->node_idx, br->dead_node, 2640 2640 dlm->reco.dead_node, dlm->reco.new_master); 2641 2641 spin_unlock(&dlm->spinlock); 2642 - return EAGAIN; 2642 + return -EAGAIN; 2643 2643 } 2644 2644 spin_unlock(&dlm->spinlock); 2645 2645
+21 -4
fs/ocfs2/extent_map.c
··· 37 37 #include "extent_map.h" 38 38 #include "inode.h" 39 39 #include "super.h" 40 + #include "symlink.h" 40 41 41 42 #include "buffer_head_io.h" 42 43 ··· 704 703 return ret; 705 704 } 706 705 706 + /* 707 + * The ocfs2_fiemap_inline() may be a little bit misleading, since 708 + * it not only handles the fiemap for inlined files, but also deals 709 + * with the fast symlink, cause they have no difference for extent 710 + * mapping per se. 711 + */ 707 712 static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, 708 713 struct fiemap_extent_info *fieinfo, 709 714 u64 map_start) ··· 722 715 struct ocfs2_inode_info *oi = OCFS2_I(inode); 723 716 724 717 di = (struct ocfs2_dinode *)di_bh->b_data; 725 - id_count = le16_to_cpu(di->id2.i_data.id_count); 718 + if (ocfs2_inode_is_fast_symlink(inode)) 719 + id_count = ocfs2_fast_symlink_chars(inode->i_sb); 720 + else 721 + id_count = le16_to_cpu(di->id2.i_data.id_count); 726 722 727 723 if (map_start < id_count) { 728 724 phys = oi->ip_blkno << inode->i_sb->s_blocksize_bits; 729 - phys += offsetof(struct ocfs2_dinode, id2.i_data.id_data); 725 + if (ocfs2_inode_is_fast_symlink(inode)) 726 + phys += offsetof(struct ocfs2_dinode, id2.i_symlink); 727 + else 728 + phys += offsetof(struct ocfs2_dinode, 729 + id2.i_data.id_data); 730 730 731 731 ret = fiemap_fill_next_extent(fieinfo, 0, phys, id_count, 732 732 flags); ··· 770 756 down_read(&OCFS2_I(inode)->ip_alloc_sem); 771 757 772 758 /* 773 - * Handle inline-data separately. 759 + * Handle inline-data and fast symlink separately. 774 760 */ 775 - if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) { 761 + if ((OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) || 762 + ocfs2_inode_is_fast_symlink(inode)) { 776 763 ret = ocfs2_fiemap_inline(inode, di_bh, fieinfo, map_start); 777 764 goto out_unlock; 778 765 } ··· 801 786 fe_flags = 0; 802 787 if (rec.e_flags & OCFS2_EXT_UNWRITTEN) 803 788 fe_flags |= FIEMAP_EXTENT_UNWRITTEN; 789 + if (rec.e_flags & OCFS2_EXT_REFCOUNTED) 790 + fe_flags |= FIEMAP_EXTENT_SHARED; 804 791 if (is_last) 805 792 fe_flags |= FIEMAP_EXTENT_LAST; 806 793 len_bytes = (u64)le16_to_cpu(rec.e_leaf_clusters) << osb->s_clustersize_bits;
+1
fs/ocfs2/namei.c
··· 2329 2329 .getxattr = generic_getxattr, 2330 2330 .listxattr = ocfs2_listxattr, 2331 2331 .removexattr = generic_removexattr, 2332 + .fiemap = ocfs2_fiemap, 2332 2333 };
+5 -3
fs/ocfs2/ocfs2.h
··· 245 245 OCFS2_MOUNT_LOCALFLOCKS = 1 << 5, /* No cluster aware user file locks */ 246 246 OCFS2_MOUNT_NOUSERXATTR = 1 << 6, /* No user xattr */ 247 247 OCFS2_MOUNT_INODE64 = 1 << 7, /* Allow inode numbers > 2^32 */ 248 - OCFS2_MOUNT_POSIX_ACL = 1 << 8, /* POSIX access control lists */ 249 - OCFS2_MOUNT_USRQUOTA = 1 << 9, /* We support user quotas */ 250 - OCFS2_MOUNT_GRPQUOTA = 1 << 10, /* We support group quotas */ 248 + OCFS2_MOUNT_POSIX_ACL = 1 << 8, /* Force POSIX access control lists */ 249 + OCFS2_MOUNT_NO_POSIX_ACL = 1 << 9, /* Disable POSIX access 250 + control lists */ 251 + OCFS2_MOUNT_USRQUOTA = 1 << 10, /* We support user quotas */ 252 + OCFS2_MOUNT_GRPQUOTA = 1 << 11, /* We support group quotas */ 251 253 }; 252 254 253 255 #define OCFS2_OSB_SOFT_RO 0x0001
+1 -1
fs/ocfs2/ocfs2_fs.h
··· 1202 1202 /* Header of one chunk of a quota file */ 1203 1203 struct ocfs2_local_disk_chunk { 1204 1204 __le32 dqc_free; /* Number of free entries in the bitmap */ 1205 - u8 dqc_bitmap[0]; /* Bitmap of entries in the corresponding 1205 + __u8 dqc_bitmap[0]; /* Bitmap of entries in the corresponding 1206 1206 * chunk of quota file */ 1207 1207 }; 1208 1208
+1 -1
fs/ocfs2/stack_user.c
··· 814 814 static int user_cluster_connect(struct ocfs2_cluster_connection *conn) 815 815 { 816 816 dlm_lockspace_t *fsdlm; 817 - struct ocfs2_live_connection *control; 817 + struct ocfs2_live_connection *uninitialized_var(control); 818 818 int rc = 0; 819 819 820 820 BUG_ON(conn == NULL);
+48 -47
fs/ocfs2/super.c
··· 100 100 static int ocfs2_parse_options(struct super_block *sb, char *options, 101 101 struct mount_options *mopt, 102 102 int is_remount); 103 + static int ocfs2_check_set_options(struct super_block *sb, 104 + struct mount_options *options); 103 105 static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt); 104 106 static void ocfs2_put_super(struct super_block *sb); 105 107 static int ocfs2_mount_volume(struct super_block *sb); ··· 602 600 603 601 lock_kernel(); 604 602 605 - if (!ocfs2_parse_options(sb, data, &parsed_options, 1)) { 603 + if (!ocfs2_parse_options(sb, data, &parsed_options, 1) || 604 + !ocfs2_check_set_options(sb, &parsed_options)) { 606 605 ret = -EINVAL; 607 606 goto out; 608 607 } ··· 694 691 if (!ret) { 695 692 /* Only save off the new mount options in case of a successful 696 693 * remount. */ 697 - if (!(osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_XATTR)) 698 - parsed_options.mount_opt &= ~OCFS2_MOUNT_POSIX_ACL; 699 694 osb->s_mount_opt = parsed_options.mount_opt; 700 695 osb->s_atime_quantum = parsed_options.atime_quantum; 701 696 osb->preferred_slot = parsed_options.slot; ··· 702 701 703 702 if (!ocfs2_is_hard_readonly(osb)) 704 703 ocfs2_set_journal_params(osb); 704 + 705 + sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | 706 + ((osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL) ? 707 + MS_POSIXACL : 0); 705 708 } 706 709 out: 707 710 unlock_kernel(); ··· 1016 1011 brelse(bh); 1017 1012 bh = NULL; 1018 1013 1019 - if (!(osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_XATTR)) 1020 - parsed_options.mount_opt &= ~OCFS2_MOUNT_POSIX_ACL; 1021 - 1014 + if (!ocfs2_check_set_options(sb, &parsed_options)) { 1015 + status = -EINVAL; 1016 + goto read_super_error; 1017 + } 1022 1018 osb->s_mount_opt = parsed_options.mount_opt; 1023 1019 osb->s_atime_quantum = parsed_options.atime_quantum; 1024 1020 osb->preferred_slot = parsed_options.slot; 1025 1021 osb->osb_commit_interval = parsed_options.commit_interval; 1026 1022 osb->local_alloc_default_bits = ocfs2_megabytes_to_clusters(sb, parsed_options.localalloc_opt); 1027 1023 osb->local_alloc_bits = osb->local_alloc_default_bits; 1028 - if (osb->s_mount_opt & OCFS2_MOUNT_USRQUOTA && 1029 - !OCFS2_HAS_RO_COMPAT_FEATURE(sb, 1030 - OCFS2_FEATURE_RO_COMPAT_USRQUOTA)) { 1031 - status = -EINVAL; 1032 - mlog(ML_ERROR, "User quotas were requested, but this " 1033 - "filesystem does not have the feature enabled.\n"); 1034 - goto read_super_error; 1035 - } 1036 - if (osb->s_mount_opt & OCFS2_MOUNT_GRPQUOTA && 1037 - !OCFS2_HAS_RO_COMPAT_FEATURE(sb, 1038 - OCFS2_FEATURE_RO_COMPAT_GRPQUOTA)) { 1039 - status = -EINVAL; 1040 - mlog(ML_ERROR, "Group quotas were requested, but this " 1041 - "filesystem does not have the feature enabled.\n"); 1042 - goto read_super_error; 1043 - } 1044 1024 1045 1025 status = ocfs2_verify_userspace_stack(osb, &parsed_options); 1046 1026 if (status) ··· 1235 1245 .next = NULL 1236 1246 }; 1237 1247 1248 + static int ocfs2_check_set_options(struct super_block *sb, 1249 + struct mount_options *options) 1250 + { 1251 + if (options->mount_opt & OCFS2_MOUNT_USRQUOTA && 1252 + !OCFS2_HAS_RO_COMPAT_FEATURE(sb, 1253 + OCFS2_FEATURE_RO_COMPAT_USRQUOTA)) { 1254 + mlog(ML_ERROR, "User quotas were requested, but this " 1255 + "filesystem does not have the feature enabled.\n"); 1256 + return 0; 1257 + } 1258 + if (options->mount_opt & OCFS2_MOUNT_GRPQUOTA && 1259 + !OCFS2_HAS_RO_COMPAT_FEATURE(sb, 1260 + OCFS2_FEATURE_RO_COMPAT_GRPQUOTA)) { 1261 + mlog(ML_ERROR, "Group quotas were requested, but this " 1262 + "filesystem does not have the feature enabled.\n"); 1263 + return 0; 1264 + } 1265 + if (options->mount_opt & OCFS2_MOUNT_POSIX_ACL && 1266 + !OCFS2_HAS_INCOMPAT_FEATURE(sb, OCFS2_FEATURE_INCOMPAT_XATTR)) { 1267 + mlog(ML_ERROR, "ACL support requested but extended attributes " 1268 + "feature is not enabled\n"); 1269 + return 0; 1270 + } 1271 + /* No ACL setting specified? Use XATTR feature... */ 1272 + if (!(options->mount_opt & (OCFS2_MOUNT_POSIX_ACL | 1273 + OCFS2_MOUNT_NO_POSIX_ACL))) { 1274 + if (OCFS2_HAS_INCOMPAT_FEATURE(sb, OCFS2_FEATURE_INCOMPAT_XATTR)) 1275 + options->mount_opt |= OCFS2_MOUNT_POSIX_ACL; 1276 + else 1277 + options->mount_opt |= OCFS2_MOUNT_NO_POSIX_ACL; 1278 + } 1279 + return 1; 1280 + } 1281 + 1238 1282 static int ocfs2_parse_options(struct super_block *sb, 1239 1283 char *options, 1240 1284 struct mount_options *mopt, ··· 1416 1392 mopt->mount_opt |= OCFS2_MOUNT_INODE64; 1417 1393 break; 1418 1394 case Opt_usrquota: 1419 - /* We check only on remount, otherwise features 1420 - * aren't yet initialized. */ 1421 - if (is_remount && !OCFS2_HAS_RO_COMPAT_FEATURE(sb, 1422 - OCFS2_FEATURE_RO_COMPAT_USRQUOTA)) { 1423 - mlog(ML_ERROR, "User quota requested but " 1424 - "filesystem feature is not set\n"); 1425 - status = 0; 1426 - goto bail; 1427 - } 1428 1395 mopt->mount_opt |= OCFS2_MOUNT_USRQUOTA; 1429 1396 break; 1430 1397 case Opt_grpquota: 1431 - if (is_remount && !OCFS2_HAS_RO_COMPAT_FEATURE(sb, 1432 - OCFS2_FEATURE_RO_COMPAT_GRPQUOTA)) { 1433 - mlog(ML_ERROR, "Group quota requested but " 1434 - "filesystem feature is not set\n"); 1435 - status = 0; 1436 - goto bail; 1437 - } 1438 1398 mopt->mount_opt |= OCFS2_MOUNT_GRPQUOTA; 1439 1399 break; 1440 - #ifdef CONFIG_OCFS2_FS_POSIX_ACL 1441 1400 case Opt_acl: 1442 1401 mopt->mount_opt |= OCFS2_MOUNT_POSIX_ACL; 1402 + mopt->mount_opt &= ~OCFS2_MOUNT_NO_POSIX_ACL; 1443 1403 break; 1444 1404 case Opt_noacl: 1405 + mopt->mount_opt |= OCFS2_MOUNT_NO_POSIX_ACL; 1445 1406 mopt->mount_opt &= ~OCFS2_MOUNT_POSIX_ACL; 1446 1407 break; 1447 - #else 1448 - case Opt_acl: 1449 - case Opt_noacl: 1450 - printk(KERN_INFO "ocfs2 (no)acl options not supported\n"); 1451 - break; 1452 - #endif 1453 1408 default: 1454 1409 mlog(ML_ERROR, 1455 1410 "Unrecognized mount option \"%s\" " ··· 1505 1502 if (opts & OCFS2_MOUNT_INODE64) 1506 1503 seq_printf(s, ",inode64"); 1507 1504 1508 - #ifdef CONFIG_OCFS2_FS_POSIX_ACL 1509 1505 if (opts & OCFS2_MOUNT_POSIX_ACL) 1510 1506 seq_printf(s, ",acl"); 1511 1507 else 1512 1508 seq_printf(s, ",noacl"); 1513 - #endif 1514 1509 1515 1510 return 0; 1516 1511 }
+2
fs/ocfs2/symlink.c
··· 163 163 .getxattr = generic_getxattr, 164 164 .listxattr = ocfs2_listxattr, 165 165 .removexattr = generic_removexattr, 166 + .fiemap = ocfs2_fiemap, 166 167 }; 167 168 const struct inode_operations ocfs2_fast_symlink_inode_operations = { 168 169 .readlink = ocfs2_readlink, ··· 175 174 .getxattr = generic_getxattr, 176 175 .listxattr = ocfs2_listxattr, 177 176 .removexattr = generic_removexattr, 177 + .fiemap = ocfs2_fiemap, 178 178 };
+1 -5
fs/ocfs2/xattr.c
··· 98 98 99 99 struct xattr_handler *ocfs2_xattr_handlers[] = { 100 100 &ocfs2_xattr_user_handler, 101 - #ifdef CONFIG_OCFS2_FS_POSIX_ACL 102 101 &ocfs2_xattr_acl_access_handler, 103 102 &ocfs2_xattr_acl_default_handler, 104 - #endif 105 103 &ocfs2_xattr_trusted_handler, 106 104 &ocfs2_xattr_security_handler, 107 105 NULL ··· 107 109 108 110 static struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = { 109 111 [OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler, 110 - #ifdef CONFIG_OCFS2_FS_POSIX_ACL 111 112 [OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS] 112 113 = &ocfs2_xattr_acl_access_handler, 113 114 [OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT] 114 115 = &ocfs2_xattr_acl_default_handler, 115 - #endif 116 116 [OCFS2_XATTR_INDEX_TRUSTED] = &ocfs2_xattr_trusted_handler, 117 117 [OCFS2_XATTR_INDEX_SECURITY] = &ocfs2_xattr_security_handler, 118 118 }; ··· 6060 6064 * to the extent block, so just calculate a maximum record num. 6061 6065 */ 6062 6066 if (!xv->xr_list.l_tree_depth) 6063 - *num_recs += xv->xr_list.l_next_free_rec; 6067 + *num_recs += le16_to_cpu(xv->xr_list.l_next_free_rec); 6064 6068 else 6065 6069 *num_recs += ocfs2_clusters_for_bytes(sb, 6066 6070 XATTR_SIZE_MAX);
-2
fs/ocfs2/xattr.h
··· 40 40 extern struct xattr_handler ocfs2_xattr_user_handler; 41 41 extern struct xattr_handler ocfs2_xattr_trusted_handler; 42 42 extern struct xattr_handler ocfs2_xattr_security_handler; 43 - #ifdef CONFIG_OCFS2_FS_POSIX_ACL 44 43 extern struct xattr_handler ocfs2_xattr_acl_access_handler; 45 44 extern struct xattr_handler ocfs2_xattr_acl_default_handler; 46 - #endif 47 45 extern struct xattr_handler *ocfs2_xattr_handlers[]; 48 46 49 47 ssize_t ocfs2_listxattr(struct dentry *, char *, size_t);
+2
include/linux/fiemap.h
··· 62 62 #define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively 63 63 * support extents. Result 64 64 * merged for efficiency. */ 65 + #define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other 66 + * files. */ 65 67 66 68 #endif /* _LINUX_FIEMAP_H */