From: Andrei Borzenkov <arvidjaar@gmail.com>
To: bo.li.liu@oracle.com
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Inconsistence between sender and receiver
Date: Fri, 9 Mar 2018 09:45:30 +0300 [thread overview]
Message-ID: <060e33f0-e0b7-649d-8696-75e5a1f7ce85@gmail.com> (raw)
In-Reply-To: <20180309053808.GD26754@dhcp-10-211-47-181.usdhcp.oraclecorp.com>
09.03.2018 08:38, Liu Bo пишет:
> On Thu, Mar 08, 2018 at 09:15:50AM +0300, Andrei Borzenkov wrote:
>> 07.03.2018 21:49, Liu Bo пишет:
>>> Hi,
>>>
>>> In the following steps[1], if <parent> on receiver side has got
>>> changed via 'btrfs property set', then after doing incremental
>>> updates, receiver gets a different snapshot from what sender has sent.
>>>
>>> The reason behind it is that there is no change about file 'foo' in
>>> the send stream, such that receiver simply creates a snapshot of
>>> <parent> on its side with nothing to apply from the send stream.
>>>
>>> A possible way to avoid this is to check rtransid and ctranid of
>>> <parent> on receiver side, but I'm not very sure whether the current
>>> behavior is made deliberately, does anyone have an idea?
>>>
>>> Thanks,
>>>
>>> -liubo
>>>
>>> [1]:
>>> $ btrfs sub create /mnt/send/sub
>>> $ touch /mnt/send/sub/foo
>>> $ btrfs sub snap -r /mnt/send/sub /mnt/send/parent
>>>
>>> # send parent out
>>> $ btrfs send /mnt/send/parent | btrfs receive /mnt/recv/
>>>
>>> # change parent and file under it
>>> $ btrfs property set -t subvol /mnt/recv/parent ro false
>>
>> Is removing the ability to modify read-only property an option? What are
>> use cases for it? What can it do that "btrfs sub snap read-only
>> writable" cannot?
>>
>
> Tbh, I don't know any usecase for that, I just wanted to toggle off
> the ro bit in order to change something inside <parent>.
>
>>> $ truncate -s 4096 /mnt/recv/parent/foo
>>>
>>> $ btrfs sub snap -r /mnt/send/sub /mnt/send/update
>>> $ btrfs send -p /mnt/send/parent /mnt/send/update | btrfs receive /mnt/recv
>>>
>>
>> This should fail right away because /mnt/send/parent is not read-only.
>> If it does not, this is really a bug.
>>
>
> It's not '/mnt/send/parent', but '/mnt/recv/parent' got changed.
>
Ah, sorry.
What happened to this patch which clears received_uuid when ro is
flipped off?
https://patchwork.kernel.org/patch/9986521/
next prev parent reply other threads:[~2018-03-09 6:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 18:49 Inconsistence between sender and receiver Liu Bo
2018-03-08 6:15 ` Andrei Borzenkov
2018-03-09 5:38 ` Liu Bo
2018-03-09 6:45 ` Andrei Borzenkov [this message]
2018-03-09 18:09 ` David Sterba
2018-03-08 15:29 ` Filipe Manana
2018-03-09 5:39 ` Liu Bo
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=060e33f0-e0b7-649d-8696-75e5a1f7ce85@gmail.com \
--to=arvidjaar@gmail.com \
--cc=bo.li.liu@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).