summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * btrfs-progs: Fix wrong optind re-initialization to allow mixed option and ↵Qu Wenruo2018-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-option In function handle_global_options(), we reset @optind to 1. However according to man page of getopt(3) NOTES section, if we need to rescan options later, @optind should be reset to 0 to initialize the internal variables correctly. This explains the reason why in cmd_check(), getopt_long() doesn't handle the following command correctly: "btrfs check /dev/data/btrfs --check-data-csum" While mkfs.btrfs handles mixed non-option and option correctly: "mkfs.btrfs -f /dev/data/disk1 --data raid1 /dev/data/disk2" Cc: Paul Jones <paul@pauljones.id.au> Cc: Hugo Mills <hugo@carfax.org.uk> Fixes: 010ceab56e06 ("btrfs-progs: rework option parser to use getopt for global options") Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: tests: add fuzzed image that triggers crash in reloc setup on mountDavid Sterba2018-08-06
| | | | | | | | | | Reported-by: Wen Xu <wen.xu@gatech.edu> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: btrfstune: prepare for enhanced mount checkDavid Sterba2018-08-06
| | | | | | | | | | | | | | | | We'll want to pass non-default superblock flags so let's use the other helper that allows that. We can reuse the filesystem handle so it needs to open it read-write, unlike what the plain check_mounted does. Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: add new flag to read superblock with mismatched fsidsDavid Sterba2018-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | New flag that mimics OPEN_CTREE_IGNORE_FSID_MISMATCH but only for reading the superblock. It should be passed around to various helpers like scan or mount checks as they'd fail before we'd get to the final caller that can do something useful with the filesystem. This will be used for an interrupted 'btrfstune -u'. Note to __open_ctree_fd: the RECOVERY mode is not compatible with that flag Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: pass superblock flags to mount check helpersDavid Sterba2018-08-06
| | | | | | | | | | | | | | | | Extend check_mounted_where so we can pass additional flags that would allow us to open filesystem in some specific state. This will be used for a filesystem that has a partially changed uuid. Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: btrfs-list: add rb_entry helpers for root_infoJeff Mahoney2018-08-06
| | | | | | | | | | | | | | | | We use rb_entry all over the place for the root_info pointers. Add a helper to make the code more readable. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: constify pathnames passed as argumentsJeff Mahoney2018-08-06
| | | | | | | | | | | | | | | | | | It's unlikely we're going to modify a pathname argument, so codify that and use const. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: qgroups: fix misleading index checkJeff Mahoney2018-08-06
| | | | | | | | | | | | | | | | | | | | | | | | In print_single_qgroup_table we check the loop index against BTRFS_QGROUP_CHILD, but what we really mean is "last column." Since we have an enum value to indicate the last value, use that instead of assuming that BTRFS_QGROUP_CHILD is always last. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * Btrfs progs v4.17David Sterba2018-06-15
| | | | | | | | Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: update CHANGES for v4.17David Sterba2018-06-07
| | | | | | | | Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Initialize all filed of btrfs_inode_item in ↵Misono Tomohiro2018-06-07
| | | | | | | | | | | | | | | | | | | | insert_inode_item() Initialize all filed of btrfs_inode_item to zero in order to prevent having some garbage, especially for flags field. Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: map-logical: fix spelling of a variableJames Harvey2018-06-07
| | | | | | | | | | | | Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: James Harvey <jamespharvey20@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: tests: fix fsck-tests/031 when on NFSDavid Sterba2018-06-07
| | | | | | | | | | | | | | | | The restore target file does not exist and creating by root does not work on NFS, so precreating will make that work. Also fix the image name to be deleted. Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: fi-usage: fix RAID10 raw disk usageHans van Kranenburg2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | In case of RAID10, fi usage is reporting half the amount of allocated space and twice the amount of unallocated disk space. Let's fix this. For example, a RAID10 chunk of 3GiB with num_stripes 6, half of the stripes (dev extents) are a mirror of the other half, so the 3GiB of actual data has to be divided by 3, and not 6 to get the size of each of those device extents. Signed-off-by: Hans van Kranenburg <hans@knorrie.org> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: mkfs: Fix typos in strings and commentsYevgeny Popovych2018-06-07
| | | | | | | | | | Signed-off-by: Yevgeny Popovych <yevgenyp@pointgrab.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: mkfs: traverse_directory: Reset error code on continueMatthias Benkard2018-06-07
| | | | | | | | | | | | | | | | | | | | | | In case add_inode_items returned -EEXIST, traverse_directory would handle the condition and still continue under certain circumstances, but it would not reset the error code, leading to spurious failure later. This patch fixes that. Pull-request: #124 Author: Matthias Benkard <matthias.benkard@egym.de> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: fix regression preventing send -p with subvolumes mounted on "/"Axel Burri2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | Fix subvol_strip_mountpoint for mnt="/" (len=1). In this case, skip check for trailing slash on full_path (leading slash on full_path is already asserted by strncmp). Issue: #122 Pull-request: #138 Fixes: c5dc299aff6b ("btrfs-progs: prevent incorrect use of subvol_strip_mountpoint") Signed-off-by: Axel Burri <axel@tty0.ch> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: print-tree: remove dead code from btrfs_print_treeLu Fengqi2018-06-07
| | | | | | | | | | | | | | | | | | Since the out label has been deleted, this free_extent_buffer will never be executed. Fixes: f37ae8d275c2 ("btrfs-progs: print-tree: Enhance warning on tree block level mismatch and error handling") Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Fix -D optionNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the -D option is essentially defunct since it's the root, where we are going to corrupt a dir item is always set to the tree root. Fix this by passing the root from the "-r" option. Aditionally convert the interface for this option to the new format. So if one wants to corrupt a dir item in the default fs tree, they should now invoke: btrfs-corrupt-block -r 5 -D <objectid,DIR_ITEM,offset> -f name Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Change format of -d optionNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if we want to delete an item we need to invoke corrupt block like so: btrfs-corrupt-block [-r <numeric id of root>] -K <objectid,type,offset> -d Instead, this patch converts the format to: btrfs-corrupt-block [-r <numeric id of root>] -d <objectid,type,offset> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Add support for handling specific root when ↵Nikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | using -K option Currently the -K option supports corrupting items only in the default root (which is the root tree). This makes it impossible to test the free-space recovery (or any other) code for that matter. Fix it by using the root corresponding to the one passed in -r (if any). Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Factor out common "-r" handling codeNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | Since more and more of the "corrupt XXX" options are going to support combination with -r option, let's extract the common code needed for this. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Convert -K flag argument handling to common functionNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | There is now a common function used to parse btrfs keys triplets so use that one. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Change -I flag parameter formatNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Presently, if we want to corrupt a particular item we need to call corrupt block like so: btrfs-corrupt-block -I -K <objectid,type,offset> -r "numeric rootid" This is problematic because the -K option not only sets the key to the item that the -I option should corrupt but it also signals that we want to corrupt the key itself. This way we cannot really use the program with the following semantics: "Corrupt only the item which corresponds to this key but leave the key intact" This patch aims to fix this by changing the format of the -I flag. So if one wants to corrupt only an item (and leave the key intact) they should use: btrfs-corrupt-block -r <numeric rootid> -I <objectid,type,offset> In addition to this problem, -K doesn't really understand the the "-r" argument, so when using it in conjunction with -I to corrupt an item, not part of the root tree, it will always produce an error: Couldn't find the key to corrupt Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Factor out key parsing functionNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | Currently passing a key with -K handling is open coded. I intend on changing the interface a bit to make the program more usable. To aid in this factor out common code which parses a triplet of the "u64,u8,u64" format, corresponding to a btrfs key. No functional changes. Signed-off-by: Nikolay Borisov <nborisov@suse.com> [ print optarg too ] Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Correctly handle -r when passing -INikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation for the -I option (corrupt an item) states: An item to corrupt (must also specify the field to corrupt and a root+key for the item) The code on the other hand doesn't check whether -r is in fact passed, and even if it is it's not handled at all. This means presently -I is possible to corrupt items only in the root tree. Fix this by correctly checking -r is passed and fail otherwise and passing the correct root to corrupt_btrfs_item. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: corrupt-block: Factor out specific-root codeNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | Some options operate on a specific root so let's extract the code which deals with this. No functional change. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Add DEBUG_CFLAGS_INTERNAL for libbtrfsutilGu JinXiang2018-06-07
| | | | | | | | | | | | | | | | Add DEBUG_CFLAGS_INTERNAL to LIBBTRFSUTIL_CFLAGS for libbtrfsutil's build. Signed-off-by: Gu JinXiang <gujx@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: ins: dump-tree: Print tree name for extent data/tree block backrefMisono Tomohiro2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print tree name instead of number to make output more readable. Example: [before] extent data backref root 5 objectid 257 offset 16384 count 1 tree block backref root 18446744073709551607 [after] extent data backref root FS_TREE objectid 257 offset 16384 count 1 tree block backref root DATA_RELOC_TREE Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: ins: dump-tree: Use %lld for extent data backref offsetMisono Tomohiro2018-06-07
| | | | | | | | | | | | | | | | Offset of extent data backref in extent item can be negative. So, let's use %lld insteand of %llu to output readable value. Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: restore: fix mistake on overwrite_ok() if relative path is givenTing-Chang Hou2018-06-07
| | | | | | | | | | | | | | | | | | | | fstatat will return -1 with errno EBADF if path_name is relative path. This caused an error of the return value of overwrite_ok(). When restoring the subvolume to destination with relative path, it will overwrite the existing file rather than skip it. Signed-off-by: tchou <tchou@synology.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: print-tree: Enhance btrfs_print_tree() check to avoid ↵Qu Wenruo2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | out-of-boundary memory access For btrfs_print_tree(), if nr_items is corrupted, it can easily go beyond extent buffer boundary. Add extra nr_item check, and only print as many valid slots as possible. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Use symbolic names for read ahead behaviorNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | Presently btrfs-progs haven't pulled the enum defining the symbolic names of read ahead constants. This commit adds the enum and simultaneously converts all usages to respective symbolic name. No functional change, just making the code human readable. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: fsck-tests: add test case to check symlinks with bad flagsSu Yue2018-06-07
| | | | | | | | | | | | | | | | There are two bad symlinks in the test case. One is with immutable attribute. Another one is with append attribute. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: lowmem: check symlinks with append/immutable flagsSu Yue2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define new error bit INODE_FLAGS_ERROR to represents invalid inode flags error. Symlinks should never have append/immutable flags set. While checking inodes, if found a symlink with append/immutable flags, report and record the inode flags error. This is for lowmem mode. Issue: #133 Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: check symlinks with append/immutable flagsSu Yue2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define new macro I_ERR_ODD_INODE_FLAGS to represents odd inode flags. Symlinks should never have append/immutable flags. While processing inodes, if found a symlink with append/immutable flags, mark the inode record with I_ERR_ODD_INODE_FLAGS. This is for original mode. Issue: #133 Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Remove fs_info argument from write_ctree_superNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | This function already takes a transaction handle which has a reference to the fs_info, so use that to obtain it. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Remove root argument from write_one_cache_groupNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | It's not needed since we can acquire a reference to the fs_info from the transaction handle already passed. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Remove root argument from btrfs_set_block_flagsNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | It's used only to get a reference to fs_info, which can be obtained from the transaction handle. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Change btrfs_root to btrfs_fs_info argument in ↵Nikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | btrfs_lookup_extent_info That function really wants an fs_info and not a root. Accidentally, this also makes the kernel/user space signatures to be coherent. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Remove unused root argument from btrfs_extent_post_opNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | This is no longer used by the callees of that function so remove it. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: Remove unused argument from clean_tree_blockNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | This function actually uses only the extent_buffer arg but takes 3 arguments. Furthermore, it's current interface doesn't even mirror the kernel counterpart. Just remove the extra arguments. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Make update_pinned_extents take btrfs_fs_infoNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | This function needs btrfs_fs_info and not a root. So make it directly take btrfs_fs_info, Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Remove root argument from finish_current_insertNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | Just reference it directly from trans->fs_info. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Remove root parameter from del_pending_extentsNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | This function always operates on the extent root which can be referenced from trans->fs_info. Do that to simplify function's signature. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Remove root parameter from btrfs_fix_block_accountingNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | It's always set to extent_root and the function already takes a transaction handle where fs_info could be referenced and in turn the extent_tree. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: check: Remove root argument from delete_extent_recordsNikolay Borisov2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | This function is always passed the extent_root as "root" parameter. In turn it uses the root parameter to mostly access fs_info and performs only a single call to btrfs_update_block_group where it passses the passed root. This is all redundant since fs_info can be referenced from the transaction handle and in turn extent_root can be referenced from the fs_info. So do that to simplify the function's signature. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: tests: test mkfs.btrfs fails on small backing size thin ↵Su Yue2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | provision device This tests is most similar to xfstests generic/405. It calls device mapper to create a thin provision device with small backing size and big virtual size. mkfs.btrfs should fail on such devices. This test should pass after commit e805b143a4fe ("btrfs-progs: mkfs: return nozero value on thin provisioned device"). Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: do not merge tree block refs have different root_idSu Yue2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For an extent item which contains many tree block backrefs, like In 020-extent-ref-cases/keyed_block_ref.img item 10 key (29470720 METADATA_ITEM 0) itemoff 3450 itemsize 222 refs 23 gen 10 flags TREE_BLOCK tree block skinny level 0 tree block backref root 278 tree block backref root 277 tree block backref root 276 tree block backref root 275 tree block backref root 274 tree block backref root 273 tree block backref root 272 tree block backref root 271 tree block backref root 270 tree block backref root 269 tree block backref root 268 tree block backref root 267 tree block backref root 266 tree block backref root 265 tree block backref root 264 tree block backref root 263 tree block backref root 262 tree block backref root 261 tree block backref root 260 tree block backref root 259 tree block backref root 258 tree block backref root 257 In find_parent_nodes(), these refs's parents are 0, then __merge_refs will merge refs to one ref. It causes only one root to be returned. So, if both parents are 0, do not merge refs. Lowmem check calls find_parent_nodes frequently to decide whether check an extent buffer or not. The bug affects bytes accounting. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
| * btrfs-progs: remove useless branch in __merge_refsSu Yue2018-06-07
| | | | | | | | | | | | | | | | | | | | | | After call of ref_for_same_block, ref1->parent must equals to ref2->parent, the block of exchange is never reached. So remove the block of exchange. Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>