diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-08-06 22:47:48 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-09-01 14:04:48 +0200 |
commit | ebdad913aa9c86a63d3be28b4610e143204c6f3c (patch) | |
tree | b52306aae4c20dd018b0cfc0760df535b5deac39 /fs/btrfs/ctree.c | |
parent | Btrfs: handle errors when doing slow caching (diff) | |
download | linux-ebdad913aa9c86a63d3be28b4610e143204c6f3c.tar.xz linux-ebdad913aa9c86a63d3be28b4610e143204c6f3c.zip |
Btrfs: check our parent dir when doing a compare send
When doing a send with a parent subvol we will check to see if the file we are
acting on is being overwritten and move it if we think it may be needed further
down the line during the send. We check this by checking its directory and
making sure it existed in the parent and making sure the file existed in the
parent. The problem with this check is that if we create a directory and a file
in that directory, and then snapshot, and then remove and re-create that same
directory and file with different inode numbers and then try to snapshot and
send with the original parent we will try and save the original file inside of
that directory. This is a problem because during the receive we move the
directory out of the way because it is a completely new inode, which makes us
unable to find the old file inside of the directory when we try to move that out
of the way for the overwrite. We fix this by checking the parent directory of
the inode we think we are overwriting. If the parent directory generation in
the send root != the parent directory generation in the parent root then we know
it is a completely new directory and we need not bother with moving the file out
of the way because it would have been completely destroyed. This fixes bz
60673. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
0 files changed, 0 insertions, 0 deletions