mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bingjingc <bingjingc@synology.com>
To: josef@toxicpanda.com, dsterba@suse.com, clm@fb.com,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: bingjingc@synology.com, robbieko@synology.com, bxxxjxxg@gmail.com
Subject: [PATCH 0/2] btrfs: send: fix a bug that sending a link command on existing file path
Date: Wed,  6 Jul 2022 21:09:01 +0800	[thread overview]
Message-ID: <20220706130903.1661-1-bingjingc@synology.com> (raw)

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


             reply	other threads:[~2022-07-06 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 13:09 bingjingc [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220706130903.1661-1-bingjingc@synology.com \
    --to=bingjingc@synology.com \
    --cc=bxxxjxxg@gmail.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robbieko@synology.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®