public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: send: fix a bug that sending a link command on existing file path
@ 2022-07-06 13:09 bingjingc
  2022-07-06 13:09 ` [PATCH 1/2] btrfs: send: introduce recorded_ref_alloc and recorded_ref_free bingjingc
  2022-07-06 13:09 ` [PATCH 2/2] btrfs: send: fix a bug that sending a link command on existing file path bingjingc
  0 siblings, 2 replies; 7+ messages in thread
From: bingjingc @ 2022-07-06 13:09 UTC (permalink / raw)
  To: josef, dsterba, clm, linux-btrfs, linux-kernel
  Cc: bingjingc, robbieko, bxxxjxxg

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-12  1:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06 13:09 [PATCH 0/2] btrfs: send: fix a bug that sending a link command on existing file path bingjingc
2022-07-06 13:09 ` [PATCH 1/2] btrfs: send: introduce recorded_ref_alloc and recorded_ref_free bingjingc
2022-07-06 13:09 ` [PATCH 2/2] btrfs: send: fix a bug that sending a link command on existing file path bingjingc
2022-07-06 16:03   ` Filipe Manana
2022-07-10 15:07     ` bingjing chang
2022-07-11 14:10       ` Filipe Manana
2022-07-12  1:37         ` bingjing chang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox