summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@gmail.com>2014-03-22 17:15:24 +0000
committerChris Mason <clm@fb.com>2014-06-09 17:20:38 -0700
commitc992ec94f24c3e7135d6c23860615f269f0b1d87 (patch)
treec927bac013f58152fc5262c012ce02a684f1b461 /fs/binfmt_misc.c
parentb46ab97bcd4ae7954b3a150f642a82cdd1434f40 (diff)
downloadop-kernel-dev-c992ec94f24c3e7135d6c23860615f269f0b1d87.zip
op-kernel-dev-c992ec94f24c3e7135d6c23860615f269f0b1d87.tar.gz
Btrfs: send, account for orphan directories when building path strings
If we have directories with a pending move/rename operation, we must take into account any orphan directories that got created before executing the pending move/rename. Those orphan directories are directories with an inode number higher then the current send progress and that don't exist in the parent snapshot, they are created before current progress reaches their inode number, with a generated name of the form oN-M-I and at the root of the filesystem tree, and later when progress matches their inode number, moved/renamed to their final location. Reproducer: $ mkfs.btrfs -f /dev/sdd $ mount /dev/sdd /mnt $ mkdir -p /mnt/a/b/c/d $ mkdir /mnt/a/b/e $ mv /mnt/a/b/c /mnt/a/b/e/CC $ mkdir /mnt/a/b/e/CC/d/f $ mkdir /mnt/a/g $ btrfs subvolume snapshot -r /mnt /mnt/snap1 $ btrfs send /mnt/snap1 -f /tmp/base.send $ mkdir /mnt/a/g/h $ mv /mnt/a/b/e /mnt/a/g/h/EE $ mv /mnt/a/g/h/EE/CC/d /mnt/a/g/h/EE/DD $ btrfs subvolume snapshot -r /mnt /mnt/snap2 $ btrfs send -p /mnt/snap1 /mnt/snap2 -f /tmp/incremental.send The second receive command failed with the following error: ERROR: rename a/b/e/CC/d -> o264-7-0/EE/DD failed. No such file or directory A test case for xfstests follows soon. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/binfmt_misc.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud