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: fdmanana@kernel.org, bingjingc@synology.com,
robbieko@synology.com, bxxxjxxg@gmail.com
Subject: [PATCH v2 0/2] btrfs: send: fix sending link commands for existing file paths
Date: Tue, 12 Jul 2022 09:36:30 +0800 [thread overview]
Message-ID: <20220712013632.7042-1-bingjingc@synology.com> (raw)
From: BingJing Chang <bingjingc@synology.com>
There is a bug sending link commands for existing file paths. When we're
processing an inode, we go over all references. All the new file paths are
added to the "new_refs" list. And all the deleted file paths are added to
the "deleted_refs" list. In the end, when we finish processing the inode,
we iterate over all the items in the "new_refs" list and send link commands
for those file paths. After that, we go over all the items in the
"deleted_refs" list and send unlink commands for them. If there are
duplicated file paths in both lists, we will try to create them before we
remove them. Then the receiver gets an -EEXIST error when trying the link
operations.
BingJing Chang (2):
btrfs: send: introduce recorded_ref_alloc and recorded_ref_free
btrfs: send: fix sending link commands for existing file paths
fs/btrfs/send.c | 195 ++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 181 insertions(+), 14 deletions(-)
--
2.37.0
next reply other threads:[~2022-07-12 1:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 1:36 bingjingc [this message]
2022-07-12 1:36 ` [PATCH v2 1/2] btrfs: send: introduce recorded_ref_alloc and recorded_ref_free bingjingc
2022-07-12 1:36 ` [PATCH v2 2/2] btrfs: send: fix sending link commands for existing file paths bingjingc
2022-07-12 20:14 ` David Sterba
2022-07-12 14:52 ` [PATCH v2 0/2] " Filipe Manana
2022-07-18 10:39 ` 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=20220712013632.7042-1-bingjingc@synology.com \
--to=bingjingc@synology.com \
--cc=bxxxjxxg@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=fdmanana@kernel.org \
--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®