From: David Sterba <dsterba@suse.cz>
To: Omar Sandoval <osandov@osandov.com>
Cc: David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org, nborisov@suse.com
Subject: Re: [PATCH RFC] btrfs: send: v2 protocol and example OTIME changes
Date: Tue, 19 Oct 2021 22:25:34 +0200 [thread overview]
Message-ID: <20211019202534.GW30611@twin.jikos.cz> (raw)
In-Reply-To: <YW8Ck9pk6JGvq8V1@relinquished.localdomain>
On Tue, Oct 19, 2021 at 10:38:27AM -0700, Omar Sandoval wrote:
> On Mon, Oct 18, 2021 at 04:41:09PM +0200, David Sterba wrote:
> Why do we need new commands for otime? I think it would make the most
> sense to include the BTRFS_SEND_A_OTIME attribute with an existing
> command: either the BTRFS_SEND_C_MK{DIR,FILE,NOD,FIFO,SOCK} command, or
> the first BTRFS_SEND_C_UTIME command after creation. We might as well
> take advantage of the TLV protocol, which allows us to add or remove
> attributes for commands as needed.
Yes there are more ways to extend the protocol, the patch demonstrated
two, and partially it was for me to refresh how the bits are put
together.
As long as the changes are hidden behind the version, we can insert the
attributes to existing commands, like the MKFILE group, that's a nice
trick.
On the receiving side the raw protocol is translated to the callbacks.
I've decoupled the libbtrfs implementation from the internal one, so
we're now free to do any changes to the callback prototypes without
worries to break snapper. Which means either mapping new attributes to
parameters (where we can sensibly detect "n/a") or add new callbacks
with more parameters.
I've found out that eg. the mkfile sends the inode number but it's never
parsed in receive. So for one I'd like to audit such things and write a
machine readable spec of the protocol.
prev parent reply other threads:[~2021-10-19 20:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 14:41 [PATCH RFC] btrfs: send: v2 protocol and example OTIME changes David Sterba
2021-10-18 14:47 ` [PATCH RFC] btrfs-progs: send protocol v2 stub, UTIMES2, OTIME David Sterba
2021-10-18 21:42 ` Omar Sandoval
2021-10-19 12:53 ` David Sterba
2021-10-19 14:11 ` Josef Bacik
2021-10-19 17:27 ` Omar Sandoval
2021-10-18 15:36 ` [PATCH RFC] btrfs: send: v2 protocol and example OTIME changes Filipe Manana
2021-10-18 21:26 ` Omar Sandoval
2021-10-19 10:51 ` David Sterba
2021-10-19 7:30 ` Nikolay Borisov
2021-10-19 17:38 ` Omar Sandoval
2021-10-19 20:25 ` David Sterba [this message]
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=20211019202534.GW30611@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=osandov@osandov.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.