corrupting holes and prealloc in extent data.
Boris Burkov (2):
btrfs-progs: corrupt generic item data with btrfs-corrupt-block
btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
btrfs-corrupt-block.c | 93 +++
1 file changed, 85 insertions(+), 8
--metadata item data which
is an opaque blob to btrfs.
Signed-off-by: Boris Burkov
---
btrfs-corrupt-block.c | 71 +--
1 file changed, 68 insertions(+), 3 deletions(-)
diff --git a/btrfs-corrupt-block.c b/btrfs-corrupt-block.c
index 0c022a8e..bf1ce9c5 100644
To corrupt holes/prealloc/inline extents, we need to mess with
extent data items. This patch makes it possible to modify
disk_bytenr with a specific value (useful for hole corruptions)
and to modify the type field (useful for prealloc corruptions)
Signed-off-by: Boris Burkov
---
btrfs-corrupt
le by falling back to
buffered io.
The fifth patch adds a feature file in sysfs for verity.
Boris Burkov (4):
btrfs: add compat_flags to btrfs_inode_item
btrfs: check verity for reads of inline extents and holes
btrfs: fallback to buffered io for verity files
btrfs: add sysfs feature for fsv
Reading the contents with direct IO would circumvent verity checks, so
fallback to buffered reads. For what it's worth, this is how ext4
handles it as well.
Signed-off-by: Boris Burkov
---
fs/btrfs/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/file.c b/fs/btrfs/f
flags". These flags are zero on inode creation in btrfs and
mkfs and are ignored by an older kernel, so it should be safe to use
them in this way.
Signed-off-by: Boris Burkov
---
fs/btrfs/btrfs_inode.h | 1 +
fs/btrfs/ctree.h| 2 ++
fs/btrfs/delayed-inode.c
ore it.
Signed-off-by: Boris Burkov
---
fs/btrfs/extent_io.c | 24 +---
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 7254387200a2..16e3f4304d2e 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -1
From: Chris Mason
Add support for fsverity in btrfs. To support the generic interface in
fs/verity, we add two new item types in the fs tree for inodes with
verity enabled. One stores the per-file verity descriptor and the other
stores the Merkle tree data itself.
Verity checking is done at the
Now that we support fsverity, enable a feature flag for it in sysfs.
Signed-off-by: Boris Burkov
---
fs/btrfs/sysfs.c | 6 ++
include/uapi/linux/btrfs.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 19b9fffa2c9c..40e780724c03
iles
btrfs: add sysfs feature for fsverity
and it relies on btrfs-corrupt-block for corruption, with the patches:
btrfs-progs: corrupt generic item data with btrfs-corrupt-block
btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
Signed-off-by: Boris Burkov
---
common/config
Thu, Feb 04, 2021 at 10:04:07PM -0800, Eric Biggers wrote:
> Thanks for writing a test for this!
>
> On Thu, Feb 04, 2021 at 03:24:26PM -0800, Boris Burkov wrote:
> > There are some btrfs specific fsverity scenarios that don't map
> > neatly onto the tests in gener
On Thu, Feb 04, 2021 at 10:13:54PM -0800, Eric Biggers wrote:
> On Thu, Feb 04, 2021 at 03:21:36PM -0800, Boris Burkov wrote:
> > This patchset provides support for fsverity in btrfs.
>
> Very interested to see this! It generally looks good, but I have some
> comments.
>
On Fri, Feb 05, 2021 at 10:06:07AM +0200, Nikolay Borisov wrote:
>
>
> On 5.02.21 г. 1:21 ч., Boris Burkov wrote:
> > From: Chris Mason
> >
> > Add support for fsverity in btrfs. To support the generic interface in
> > fs/verity, we add two new item typ
On Tue, Feb 09, 2021 at 06:22:47AM +, Sidong Yang wrote:
> On Thu, Feb 04, 2021 at 12:09:31PM -0800, Boris Burkov wrote:
>
> Hi Boris, I have a question for this code.
>
> > btrfs-corrupt-block already has a mix of generic and specific corruption
> > options, but curr
On Thu, Feb 11, 2021 at 08:19:45PM -0500, Zygo Blaxell wrote:
> On Thu, Feb 04, 2021 at 10:58:19PM -0800, Boris Burkov wrote:
> > On Thu, Feb 04, 2021 at 10:13:54PM -0800, Eric Biggers wrote:
> > > On Thu, Feb 04, 2021 at 03:21:36PM -0800, Boris Burkov wrote:
> > > >
n if sb cache_generation is 0 in
> validate_free_space_cache() as it's valid now since the kernel commit
> mentioned above.
Sorry that I didn't notice the fsck issue.
The fix looks good to me.
>
> Link: https://github.com/kdave/btrfs-progs/issues/338
> Signed-off-by: Su Yue
On Fri, Feb 19, 2021 at 07:01:41PM -0700, Chris Murphy wrote:
> Hi,
>
> systemd does remount ro at reboot/shutdown time, and if free space
> tree exists, this is always logged:
>
> [ 27.476941] systemd-shutdown[1]: Unmounting file systems.
> [ 27.479756] [1601]: Remounting '/' read-only in wi
remount,ro mnt
(no warning, no fst change)
sudo mount -o remount,rw,space_cache=v2 mnt
(no warning, no fst change)
Reported-by: Chris Murphy
Signed-off-by: Boris Burkov
---
fs/btrfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
inde
a new patch that handles orphaned
verity data.
Boris Burkov (4):
btrfs: add compat_flags to btrfs_inode_item
btrfs: check verity for reads of inline extents and holes
btrfs: fallback to buffered io for verity files
btrfs: verity metadata orphan items
Chris Mason (1):
btrfs: initial fsv
From: Chris Mason
Add support for fsverity in btrfs. To support the generic interface in
fs/verity, we add two new item types in the fs tree for inodes with
verity enabled. One stores the per-file verity descriptor and the other
stores the Merkle tree data itself.
Verity checking is done at the
flags". These flags are zero on inode creation in btrfs and
mkfs and are ignored by an older kernel, so it should be safe to use
them in this way.
Signed-off-by: Boris Burkov
---
fs/btrfs/btrfs_inode.h | 1 +
fs/btrfs/ctree.h| 2 ++
fs/btrfs/delayed-inode.c
makes the
comment discussing deprecating that concept a bit messy in full context.
Signed-off-by: Boris Burkov
---
fs/btrfs/inode.c | 15 +++--
fs/btrfs/verity.c | 80 +--
2 files changed, 83 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/in
Reading the contents with direct IO would circumvent verity checks, so
fallback to buffered reads. For what it's worth, this is how ext4
handles it as well.
Signed-off-by: Boris Burkov
---
fs/btrfs/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/file.c b/fs/btrfs/f
ore it.
Signed-off-by: Boris Burkov
---
fs/btrfs/extent_io.c | 26 +++---
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0d6f8b33830f..653b066f3043 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_i
On Mon, Mar 15, 2021 at 04:07:24PM -0700, Eric Biggers wrote:
> On Fri, Mar 05, 2021 at 11:26:29AM -0800, Boris Burkov wrote:
> > The tree checker currently rejects unrecognized flags when it reads
> > btrfs_inode_item. Practically, this means that adding a new flag makes
> >
On Mon, Mar 15, 2021 at 04:09:41PM -0700, Eric Biggers wrote:
> On Fri, Mar 05, 2021 at 11:26:28AM -0800, Boris Burkov wrote:
> > This patchset provides support for fsverity in btrfs.
> >
> > At a high level, we store the verity descriptor and Merkle tree data
> > in
On Mon, Mar 15, 2021 at 04:17:17PM -0700, Eric Biggers wrote:
> On Fri, Mar 05, 2021 at 11:26:30AM -0800, Boris Burkov wrote:
> > +static int end_page_read(struct page *page, bool uptodate, u64 start, u32
> > len)
> > {
> > - struct btrfs_fs_info *fs_info = btrfs_s
en a new xfstest for checking we don't have backwards or
zero-length fiemaps for cases like those above.
Signed-off-by: Boris Burkov
---
fs/btrfs/extent_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 7ad2169e7487..
btrfs by:
btrfs: return whole extents in fiemap
(https://lore.kernel.org/linux-btrfs/274e5bcebdb05a8969fc300b4802f33da2fbf218.1617746680.git.bo...@bur.io/)
Signed-off-by: Boris Burkov
---
tests/generic/623 | 93 +++
tests/generic/623.out | 2 +
tests/ge
btrfs by:
btrfs: return whole extents in fiemap
(https://lore.kernel.org/linux-btrfs/274e5bcebdb05a8969fc300b4802f33da2fbf218.1617746680.git.bo...@bur.io/)
Signed-off-by: Boris Burkov
--
v2: fill out copyright and test description
---
tests/generic/623
btrfs by:
btrfs: return whole extents in fiemap
(https://lore.kernel.org/linux-btrfs/274e5bcebdb05a8969fc300b4802f33da2fbf218.1617746680.git.bo...@bur.io/)
Signed-off-by: Boris Burkov
---
v3: make the block size more generic, use test dev instead of scratch,
cleanup style issues.
v2: fill out copy
On Wed, Apr 07, 2021 at 09:10:46AM -0700, Darrick J. Wong wrote:
> On Tue, Apr 06, 2021 at 03:54:29PM -0700, Boris Burkov wrote:
> > btrfs trims fiemap extents to the inputted offset, which leads to
> > inconsistent results for most inputs, and downright bizarre outputs like
>
block
btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
Signed-off-by: Boris Burkov
---
common/config | 1 +
common/verity | 7 ++
tests/btrfs/290 | 190
tests/btrfs/290.out | 17
tests/btrfs/group | 1 +
5
fs: return whole extents in fiemap
and it relies on btrfs-corrupt-block for corruption, with the
following btrfs-progs patches:
btrfs-progs: corrupt generic item data with btrfs-corrupt-block
btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
Signed-off-by: Boris Burkov
---
common/v
This patchset provides tests for fsverity support in btrfs.
It includes modifications for generic tests to pass with btrfs as well
as new btrfs specific tests.
Boris Burkov (3):
btrfs: test btrfs specific fsverity corruption
generic/574: corrupt btrfs merkle tree data
btrfs: test verity
relies on btrfs-corrupt-block for corruption, with the
following btrfs-progs patches:
btrfs-progs: corrupt generic item data with btrfs-corrupt-block
btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block
Signed-off-by: Boris Burkov
---
tests/btrfs/291 | 156
patch that handles orphaned
verity data.
Boris Burkov (4):
btrfs: add compat_flags to btrfs_inode_item
btrfs: check verity for reads of inline extents and holes
btrfs: fallback to buffered io for verity files
btrfs: verity metadata orphan items
Chris Mason (1):
btrfs: initial fsverity su
flags". These flags are zero on inode creation in btrfs and
mkfs and are ignored by an older kernel, so it should be safe to use
them in this way.
Signed-off-by: Boris Burkov
---
fs/btrfs/btrfs_inode.h | 1 +
fs/btrfs/ctree.h| 2 ++
fs/btrfs/delayed-inode.c
that this is a resurrection of using orphans to
signal orphaned metadata that isn't the inode itself. This makes the
comment discussing deprecating that concept a bit messy in full context.
Signed-off-by: Boris Burkov
---
fs/btrfs/inode.c | 15 ++--
fs/btrfs/ver
ore it.
Signed-off-by: Boris Burkov
---
fs/btrfs/extent_io.c | 26 +++---
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index bf784c10040b..a15f289e29e6 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_i
Reading the contents with direct IO would circumvent verity checks, so
fallback to buffered reads. For what it's worth, this is how ext4
handles it as well.
Signed-off-by: Boris Burkov
---
fs/btrfs/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/file.c b/fs/btrfs/f
From: Chris Mason
Add support for fsverity in btrfs. To support the generic interface in
fs/verity, we add two new item types in the fs tree for inodes with
verity enabled. One stores the per-file verity descriptor and the other
stores the Merkle tree data itself.
Verity checking is done at the
On Thu, Apr 08, 2021 at 11:36:30AM -0700, Eric Biggers wrote:
> On Thu, Apr 08, 2021 at 11:30:10AM -0700, Boris Burkov wrote:
> > This patchset provides tests for fsverity support in btrfs.
> >
> > It includes modifications for generic tests to pass with btrfs as well
>
On Thu, Apr 08, 2021 at 11:41:42AM -0700, Eric Biggers wrote:
> On Thu, Apr 08, 2021 at 11:30:12AM -0700, Boris Burkov wrote:
> >
> > Note that there is a bit of a kludge here: since btrfs_corrupt_block
> > doesn't handle streaming corruption bytes from stdin (I cou
k for corruption, with the patches:
Signed-off-by: Boris Burkov
---
common/config | 1 +
common/verity | 7 ++
tests/btrfs/290 | 190
tests/btrfs/290.out | 17
tests/btrfs/group | 1 +
5 files changed, 216 insertions(+)
c
UNKNOWN.36/37.
Signed-off-by: Boris Burkov
---
tests/btrfs/291 | 156
tests/btrfs/291.out | 2 +
tests/btrfs/group | 1 +
3 files changed, 159 insertions(+)
create mode 100755 tests/btrfs/291
create mode 100644 tests/btrfs/291.out
diff --git a
This patchset provides tests for fsverity support in btrfs.
It includes modifications for generic tests to pass with btrfs as well
as new btrfs specific tests.
--
v3: rebase onto xfstests master branch
v2: pass generic tests, add logwrites test
Boris Burkov (3):
btrfs: test btrfs specific
way.
This relies on the following kernel patch for btrfs verity support:
And the following btrfs-progs patch for btrfs_corrupt_block support:
Signed-off-by: Boris Burkov
---
common/verity | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/common/verity b/com
On Thu, Apr 08, 2021 at 04:16:28PM -0700, Eric Biggers wrote:
> On Thu, Apr 08, 2021 at 11:49:37AM -0700, Boris Burkov wrote:
> > On Thu, Apr 08, 2021 at 11:41:42AM -0700, Eric Biggers wrote:
> > > On Thu, Apr 08, 2021 at 11:30:12AM -0700, Boris Burkov wrote:
> > > >
On Thu, Apr 08, 2021 at 03:50:08PM -0700, Eric Biggers wrote:
> On Thu, Apr 08, 2021 at 11:33:53AM -0700, Boris Burkov wrote:
> > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> > index f7a4ad86adee..e5282a8f566a 100644
> > --- a/fs/btrfs/super.c
> > +++ b/fs/b
On Fri, Apr 09, 2021 at 07:40:44AM +0800, Anand Jain wrote:
> On 09/04/2021 02:33, Boris Burkov wrote:
> > The tree checker currently rejects unrecognized flags when it reads
> > btrfs_inode_item. Practically, this means that adding a new flag makes
> > the change backward
On Thu, Apr 08, 2021 at 03:50:08PM -0700, Eric Biggers wrote:
> On Thu, Apr 08, 2021 at 11:33:53AM -0700, Boris Burkov wrote:
> > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> > index f7a4ad86adee..e5282a8f566a 100644
> > --- a/fs/btrfs/super.c
> > +++ b/fs/b
On Tue, Apr 13, 2021 at 02:06:04PM +0100, Khaled ROMDHANI wrote:
> The variable zone is not initialized. It
> may causes a failed assertion.
>
> Addresses-Coverity: ("Uninitialized variables")
>
> Signed-off-by: Khaled ROMDHANI
Reviewed-by: Boris Burkov
> ---
On Tue, Nov 24, 2020 at 04:44:13PM +0200, Nikolay Borisov wrote:
> btrfs_transaction::state is protected by btrfs_fs_info::trans_lock and
> all accesses to this variable should be synchornized by it. However,
> there are 2 exceptions, namely checking if currently running transaction
> has entered i
On Wed, Apr 14, 2021 at 03:49:06PM +0800, An Long wrote:
> The exclusive ops will not start if there's one already running. The
> enqueue parameter allows operations to be queued.
>
> Signed-off-by: An Long
> ---
> .../misc-tests/048-enqueue-parameter/test.sh | 52 +++
> 1 file
On Thu, Apr 15, 2021 at 01:30:11PM +0800, Qu Wenruo wrote:
> Currently mkfs.btrfs will output a warning message if the sectorsize is
> not the same as page size:
> WARNING: the filesystem may not be mountable, sectorsize 4096 doesn't match
> page size 65536
>
> But since btrfs subpage support f
On Fri, Apr 16, 2021 at 10:07:09PM +0200, David Sterba wrote:
> On Fri, Apr 16, 2021 at 11:14:08AM -0700, Boris Burkov wrote:
> > On Thu, Apr 15, 2021 at 01:30:11PM +0800, Qu Wenruo wrote:
> > > +/*
> > > + * The buffer size if strlen("4096 8192 16384 32768 6553
On Mon, Apr 19, 2021 at 02:45:12PM +0800, Qu Wenruo wrote:
> Currently mkfs.btrfs will output a warning message if the sectorsize is
> not the same as page size:
> WARNING: the filesystem may not be mountable, sectorsize 4096 doesn't match
> page size 65536
>
> But since btrfs subpage support f
On Mon, Apr 19, 2021 at 09:05:49PM +0800, Su Yue wrote:
> Resize to nums without sign prefix makes false output:
> btrfs fi resize 1:150g /srv/extra
> Resize device id 1 (/dev/sdb1) from 298.09GiB to 0.00B
>
> The resize operation would take effect though.
>
> Fix it by handling the case if mod
59 matches
Mail list logo