<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/send.h, branch linux-6.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-12-05T17:00:41Z</updated>
<entry>
<title>btrfs: send add define for v2 buffer size</title>
<updated>2022-12-05T17:00:41Z</updated>
<author>
<name>Wang Yugui</name>
</author>
<published>2022-10-19T08:10:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=875c627c5f2045e2b5f0ad6692799e8fb931f3cb'/>
<id>urn:sha1:875c627c5f2045e2b5f0ad6692799e8fb931f3cb</id>
<content type='text'>
Add a define for the data buffer size (though the maximum size is not
limited by it) BTRFS_SEND_BUF_SIZE_V2 so it's more visible.

Signed-off-by: Wang Yugui &lt;wangyugui@e16-tech.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: allow protocol version 3 with CONFIG_BTRFS_DEBUG</title>
<updated>2022-10-11T12:46:55Z</updated>
<author>
<name>Boris Burkov</name>
</author>
<published>2022-09-27T16:30:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9971a741c5f44fd72e664c35be9bc6fedb8a3498'/>
<id>urn:sha1:9971a741c5f44fd72e664c35be9bc6fedb8a3498</id>
<content type='text'>
We haven't finalized send stream v3 yet, so gate the send stream version
behind CONFIG_BTRFS_DEBUG as we want some way to test it.

The original verity send did not check the protocol version, so add that
actual protection as well.

Reviewed-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Signed-off-by: Boris Burkov &lt;boris@bur.io&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: add support for fs-verity</title>
<updated>2022-09-26T10:27:55Z</updated>
<author>
<name>Boris Burkov</name>
</author>
<published>2022-08-15T20:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38622010a6de3a62cc72688348548854ed82dcf5'/>
<id>urn:sha1:38622010a6de3a62cc72688348548854ed82dcf5</id>
<content type='text'>
Preserve the fs-verity status of a btrfs file across send/recv.

There is no facility for installing the Merkle tree contents directly on
the receiving filesystem, so we package up the parameters used to enable
verity found in the verity descriptor. This gives the receive side
enough information to properly enable verity again. Note that this means
that receive will have to re-compute the whole Merkle tree, similar to
how compression worked before encoded_write.

Since the file becomes read-only after verity is enabled, it is
important that verity is added to the send stream after any file writes.
Therefore, when we process a verity item, merely note that it happened,
then actually create the command in the send stream during
'finish_inode_if_needed'.

This also creates V3 of the send stream format, without any format
changes besides adding the new commands and attributes.

Signed-off-by: Boris Burkov &lt;boris@bur.io&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: add new command FILEATTR for file attributes</title>
<updated>2022-07-25T15:45:38Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2022-05-18T16:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4824735918a1b7f79cdb310aa365c239be10ae5d'/>
<id>urn:sha1:4824735918a1b7f79cdb310aa365c239be10ae5d</id>
<content type='text'>
There are file attributes inherited from previous ext2 SETFLAGS/GETFLAGS
and later from XFLAGS interfaces, now commonly found under the
'fileattr' API. This corresponds to the individual inode bits and that's
part of the on-disk format, so this is suitable for the protocol. The
other interfaces contain a lot of cruft or bits that btrfs does not
support yet.

Currently the value is u64 and matches btrfs_inode_item. Not all the
bits can be set by ioctls (like NODATASUM or READONLY), but we can send
them over the protocol and leave it up to the receiving side what and
how to apply.

As some of the flags, eg. IMMUTABLE, can prevent any further changes,
the receiving side needs to understand that and apply the changes in the
right order, or possibly with some intermediate steps. This should be
easier, future proof and simpler on the protocol layer than implementing
in kernel.

Reviewed-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: simplify includes</title>
<updated>2022-07-25T15:45:37Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2022-06-02T13:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8234d3f658b65584f1298960fc96a62f9e2a9f38'/>
<id>urn:sha1:8234d3f658b65584f1298960fc96a62f9e2a9f38</id>
<content type='text'>
We don't need the whole ctree.h in send.h, none of the data types
defined there are used.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: drop __KERNEL__ ifdef from send.h</title>
<updated>2022-07-25T15:45:37Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2022-06-02T13:25:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3b4b9040b0f59a27cdd3db31417aeced473f345'/>
<id>urn:sha1:e3b4b9040b0f59a27cdd3db31417aeced473f345</id>
<content type='text'>
We don't need this ifdef as the header file is not shared, the protocol
definition used by userspace should be from libbtrfs or libbtrfsutil.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: enable support for stream v2 and compressed writes</title>
<updated>2022-07-25T15:45:32Z</updated>
<author>
<name>Omar Sandoval</name>
</author>
<published>2022-03-17T17:25:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6815592806f481244d0e3435ca1f5383d90a14c'/>
<id>urn:sha1:d6815592806f481244d0e3435ca1f5383d90a14c</id>
<content type='text'>
Now that the new support is implemented, allow the ioctl to accept v2
and the compressed flag, and update the version in sysfs.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: add stream v2 definitions</title>
<updated>2022-07-25T15:45:32Z</updated>
<author>
<name>Omar Sandoval</name>
</author>
<published>2022-03-17T17:25:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7c14f23fb604fc66edae7514ed9b4b93930b5ba'/>
<id>urn:sha1:b7c14f23fb604fc66edae7514ed9b4b93930b5ba</id>
<content type='text'>
This adds the definitions of the new commands for send stream version 2
and their respective attributes: fallocate, FS_IOC_SETFLAGS (a.k.a.
chattr), and encoded writes. It also documents two changes to the send
stream format in v2: the receiver shouldn't assume a maximum command
size, and the DATA attribute is encoded differently to allow for writes
larger than 64k. These will be implemented in subsequent changes, and
then the ioctl will accept the new version and flag.

Reviewed-by: Josef Bacik &lt;josef@toxicpanda.com&gt;
Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: send: explicitly number commands and attributes</title>
<updated>2022-07-25T15:45:32Z</updated>
<author>
<name>Omar Sandoval</name>
</author>
<published>2022-03-17T17:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54cab6aff811d328c5add37e0faf32f6328741ea'/>
<id>urn:sha1:54cab6aff811d328c5add37e0faf32f6328741ea</id>
<content type='text'>
Commit e77fbf990316 ("btrfs: send: prepare for v2 protocol") added
_BTRFS_SEND_C_MAX_V* macros equal to the maximum command number for the
version plus 1, but as written this creates gaps in the number space.

The maximum command number is currently 22, and __BTRFS_SEND_C_MAX_V1 is
accordingly 23. But then __BTRFS_SEND_C_MAX_V2 is 24, suggesting that v2
has a command numbered 23, and __BTRFS_SEND_C_MAX is 25, suggesting that
23 and 24 are valid commands.

Instead, let's explicitly number all of the commands, attributes, and
sentinel MAX constants.

Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: reuse existing inode from btrfs_ioctl</title>
<updated>2022-03-14T12:13:46Z</updated>
<author>
<name>Sahil Kang</name>
</author>
<published>2022-01-16T02:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9ad1230533efb6d9f5865a351eca8f0617cf5b74'/>
<id>urn:sha1:9ad1230533efb6d9f5865a351eca8f0617cf5b74</id>
<content type='text'>
btrfs_ioctl extracts inode from file so we can pass that into the
callbacks.

Signed-off-by: Sahil Kang &lt;sahil.kang@asilaycomputing.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
</feed>
