From: Theodore Ts'o Date: Sun, 3 Aug 2014 02:05:03 +0000 (-0400) Subject: Merge branch 'maint' into next X-Git-Tag: v1.43-WIP-2015-05-18~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14207cf60e0f53b57ef8252a8ae3f6a124465b64;p=thirdparty%2Fe2fsprogs.git Merge branch 'maint' into next Conflicts: configure misc/Makefile.in --- 14207cf60e0f53b57ef8252a8ae3f6a124465b64 diff --cc configure index 6c503aaf7,f0af1d531..8ad1408f6 --- a/configure +++ b/configure @@@ -13071,7 -12994,7 +13071,7 @@@ if test "$ac_res" != no; then fi fi - for ac_func in __secure_getenv backtrace blkid_probe_get_topology blkid_probe_enable_partitions chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getcwd getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llistxattr llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl secure_getenv setmntent setresgid setresuid snprintf srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc -for ac_func in __secure_getenv backtrace blkid_probe_get_topology blkid_probe_enable_partitions chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getcwd getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl pread pwrite secure_getenv setmntent setresgid setresuid snprintf srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc ++for ac_func in __secure_getenv backtrace blkid_probe_get_topology blkid_probe_enable_partitions chflags fadvise64 fallocate fallocate64 fchown fdatasync fstat64 ftruncate64 futimes getcwd getdtablesize getmntinfo getpwuid_r getrlimit getrusage jrand48 llistxattr llseek lseek64 mallinfo mbstowcs memalign mempcpy mmap msync nanosleep open64 pathconf posix_fadvise posix_fadvise64 posix_memalign prctl pread pwrite secure_getenv setmntent setresgid setresuid snprintf srandom stpcpy strcasecmp strdup strnlen strptime strtoull sync_file_range sysconf usleep utime valloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" diff --cc lib/ext2fs/extent.c index 30673b549,c12bc9300..c0b34a7df --- a/lib/ext2fs/extent.c +++ b/lib/ext2fs/extent.c @@@ -919,13 -954,18 +977,16 @@@ static errcode_t extent_node_split(ext2 if (handle->level == 0) { new_root = 1; tocopy = ext2fs_le16_to_cpu(eh->eh_entries); - retval = ext2fs_get_mem(((handle->max_depth+2) * - sizeof(struct extent_path)), - &newpath); + retval = ext2fs_get_memzero((handle->max_paths + 1) * + sizeof(struct extent_path), + &newpath); if (retval) goto done; - memset(newpath, 0, - ((handle->max_depth+2) * sizeof(struct extent_path))); } else { - tocopy = ext2fs_le16_to_cpu(eh->eh_entries) / 2; + if (no_balance) + tocopy = 1; + else + tocopy = ext2fs_le16_to_cpu(eh->eh_entries) / 2; } #ifdef DEBUG diff --cc misc/Makefile.in index d3c8f5b5e,a68edffb5..925846e8d --- a/misc/Makefile.in +++ b/misc/Makefile.in @@@ -63,7 -62,7 +63,8 @@@ PROFILED_TUNE2FS_OBJS= profiled/tune2fs PROFILED_MKLPF_OBJS= profiled/mklost+found.o PROFILED_MKE2FS_OBJS= profiled/mke2fs.o profiled/util.o profiled/profile.o \ profiled/prof_err.o profiled/default_profile.o \ - profiled/create_inode.o - profiled/mk_hugefiles.o ++ profiled/mk_hugefiles.o profiled/create_inode.o ++ PROFILED_CHATTR_OBJS= profiled/chattr.o PROFILED_LSATTR_OBJS= profiled/lsattr.o PROFILED_UUIDGEN_OBJS= profiled/uuidgen.o diff --cc misc/tune2fs.c index 5aaea5eac,b65dab9df..75a273586 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@@ -2785,9 -2278,10 +2789,9 @@@ retry_open int set_csum = 0; dgrp_t i; char buf[SUPERBLOCK_SIZE]; - char old_uuid[UUID_SIZE]; + __u8 old_uuid[UUID_SIZE]; - if (sb->s_feature_ro_compat & - EXT4_FEATURE_RO_COMPAT_GDT_CSUM) { + if (ext2fs_has_group_desc_csum(fs)) { /* * Changing the UUID requires rewriting all metadata, * which can race with a mounted fs. Don't allow that.