summaryrefslogtreecommitdiff
path: root/arch/mips/netlogic/xlp/usb-init.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2013-07-04 14:14:23 (GMT)
committerJosef Bacik <jbacik@fusionio.com>2013-07-19 19:07:26 (GMT)
commit115930cb2d444a684975cf2325759cb48ebf80cc (patch)
tree7c4d95522982008bfbfa7236039f52e0fefda0d3 /arch/mips/netlogic/xlp/usb-init.c
parentd29a9f629e009c9b90e5859bce581070fd6247fc (diff)
downloadlinux-115930cb2d444a684975cf2325759cb48ebf80cc.tar.xz
Btrfs: fix wrong write offset when replacing a device
Miao Xie reported the following issue: The filesystem was corrupted after we did a device replace. Steps to reproduce: # mkfs.btrfs -f -m single -d raid10 <device0>..<device3> # mount <device0> <mnt> # btrfs replace start -rfB 1 <device4> <mnt> # umount <mnt> # btrfsck <device4> The reason for the issue is that we changed the write offset by mistake, introduced by commit 625f1c8dc. We read the data from the source device at first, and then write the data into the corresponding place of the new device. In order to implement the "-r" option, the source location is remapped using btrfs_map_block(). The read takes place on the mapped location, and the write needs to take place on the unmapped location. Currently the write is using the mapped location, and this commit changes it back by undoing the change to the write address that the aforementioned commit added by mistake. Reported-by: Miao Xie <miaox@cn.fujitsu.com> Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'arch/mips/netlogic/xlp/usb-init.c')
0 files changed, 0 insertions, 0 deletions