lkml.org 
[lkml]   [2022]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] btrfs: send: fix a bug that sending a link command on existing file path
Date
From: BingJing Chang <bingjingc@synology.com>

btrfs_ioctl_send processes recorded btrfs_keys in a defined order. (First,
we process a btrfs_key with a samller objectid. If btrfs_keys have the same
objectid, then we compare their types and offsets accordingly.) However,
reference paths for an inode can be stored in either BTRFS_INODE_REF_KEY
btrfs_keys or BTRFS_INODE_EXTREF_KEY btrfs_keys. And due to the limitation
of the helper function - iterate_inode_ref, we can only iterate the entries
of ONE btrfs_inode_ref or btrfs_inode_extref. That is, there must be a bug
in processing the same reference paths, which are stored in different ways.

Please see the second commit for the details.

bingjingc (2):
btrfs: send: introduce recorded_ref_alloc and recorded_ref_free
btrfs: send: fix a bug that sending a link command on existing file
path

fs/btrfs/send.c | 194 ++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 180 insertions(+), 14 deletions(-)

--
2.37.0

\
 
 \ /
  Last update: 2022-07-06 15:17    [W:0.082 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site