Re: [PATCH v2] btrfs-progs: fi resize: fix false 0.00B sized output

2021-04-19 Thread Boris Burkov
Personally, I think it would be cleaner to do something like: if (mod == 0) { new_size = diff; } else if (mod < 0) { // >0 check new_size = old_size - diff } else { // overflow check new_size = old_size + diff } At this point, new_size is set correctly in all cases and we can do the print. I tested this version on some simple cases, and it seems to work ok as well. Thanks for the fix, Boris > -- > 2.30.1 >

Re: [PATCH v2] btrfs-progs: mkfs: only output the warning if the sectorsize is not supported

2021-04-19 Thread Boris Burkov
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

Re: [PATCH] btrfs-progs: mkfs: only output the warning if the sectorsize is not supported

2021-04-16 Thread Boris Burkov
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

Re: [PATCH] btrfs-progs: mkfs: only output the warning if the sectorsize is not supported

2021-04-16 Thread Boris Burkov
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

Re: [PATCH] btrfs-progs: tests: add misc test for enqueue parameter

2021-04-16 Thread Boris Burkov
> & > +test_run_commands > +wait > + > +run_check_umount_test_dev "$TEST_MNT" > +cleanup_loopdevs > -- > 2.26.2 > I applied this patch to progs v5.11.1 and ran it on a vm running a kernel built from e5ff2239e143 (kdave/misc-next rebased today) and each of the enqueued commands fails without any useful diagnostic information, nor anything interesting in dmesg as far as I can tell. e.g.: "failed: /home/vmuser/btrfs-progs/btrfs filesystem resize --enqueue -100M /home/vmuser/btrfs-progs/tests/mnt" I am able to pass other misc tests on this setup. Is there anything else I need to do to be able to run this test? Thanks, Boris

Re: [PATCH] btrfs: Annotate unlocked accesses to transaction state

2021-04-13 Thread 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

Re: [PATCH-next] fs/btrfs: Fix uninitialized variable

2021-04-13 Thread Boris Burkov
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 > ---

Re: [PATCH v3 2/5] btrfs: initial fsverity support

2021-04-09 Thread Boris Burkov
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

Re: [PATCH v3 1/5] btrfs: add compat_flags to btrfs_inode_item

2021-04-09 Thread Boris Burkov
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

Re: [PATCH v3 2/5] btrfs: initial fsverity support

2021-04-09 Thread Boris Burkov
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

Re: [PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
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: > > > >

[PATCH v3 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
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

[PATCH v3 1/3] btrfs: test btrfs specific fsverity corruption

2021-04-08 Thread Boris Burkov
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

[PATCH v3 3/3] btrfs: test verity orphans with dmlogwrites

2021-04-08 Thread Boris Burkov
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

[PATCH v3 0/3] tests for btrfs fsverity

2021-04-08 Thread Boris Burkov
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

Re: [PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
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

Re: [PATCH v2 0/3] tests for btrfs fsverity

2021-04-08 Thread Boris Burkov
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 >

[PATCH v3 2/5] btrfs: initial fsverity support

2021-04-08 Thread Boris Burkov
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

[PATCH v3 3/5] btrfs: check verity for reads of inline extents and holes

2021-04-08 Thread Boris Burkov
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

[PATCH v3 4/5] btrfs: fallback to buffered io for verity files

2021-04-08 Thread Boris Burkov
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

[PATCH v3 5/5] btrfs: verity metadata orphan items

2021-04-08 Thread Boris Burkov
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

[PATCH v3 0/5] btrfs: support fsverity

2021-04-08 Thread Boris Burkov
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

[PATCH v3 1/5] btrfs: add compat_flags to btrfs_inode_item

2021-04-08 Thread Boris Burkov
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

[PATCH v2 3/3] btrfs: test verity orphans with dmlogwrites

2021-04-08 Thread Boris Burkov
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 v2 1/3] btrfs: test btrfs specific fsverity corruption

2021-04-08 Thread Boris Burkov
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

[PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
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

[PATCH v2 0/3] tests for btrfs fsverity

2021-04-08 Thread Boris Burkov
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

Re: [PATCH v2] generic: test fiemap offsets and < 512 byte ranges

2021-04-07 Thread Boris Burkov
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 >

[PATCH v3] generic: test fiemap offsets and < 512 byte ranges

2021-04-07 Thread Boris Burkov
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

[PATCH v2] generic: test fiemap offsets and < 512 byte ranges

2021-04-06 Thread Boris Burkov
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

[PATCH] generic: test fiemap offsets and < 512 byte ranges

2021-04-06 Thread Boris Burkov
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

[PATCH] btrfs: return whole extents in fiemap

2021-04-06 Thread Boris Burkov
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..

Re: [PATCH v2 2/5] btrfs: initial fsverity support

2021-03-15 Thread Boris Burkov
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

Re: [PATCH v2 0/5] btrfs: support fsverity

2021-03-15 Thread Boris Burkov
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

Re: [PATCH v2 1/5] btrfs: add compat_flags to btrfs_inode_item

2021-03-15 Thread Boris Burkov
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 > >

[PATCH v2 3/5] btrfs: check verity for reads of inline extents and holes

2021-03-05 Thread Boris Burkov
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

[PATCH v2 5/5] btrfs: verity metadata orphan items

2021-03-05 Thread Boris Burkov
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

[PATCH v2 4/5] btrfs: fallback to buffered io for verity files

2021-03-05 Thread Boris Burkov
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

[PATCH v2 2/5] btrfs: initial fsverity support

2021-03-05 Thread Boris Burkov
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

[PATCH v2 1/5] btrfs: add compat_flags to btrfs_inode_item

2021-03-05 Thread Boris Burkov
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

[PATCH v2 0/5] btrfs: support fsverity

2021-03-05 Thread Boris Burkov
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

[PATCH] btrfs: fix spurious free_space_tree remount warning

2021-02-23 Thread Boris Burkov
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

Re: 5.11 free space tree remount warning

2021-02-22 Thread Boris Burkov
mnt At first I assumed I just completely ignored this case, but reading the code now, it looks like it should have handled it. I assume I messed up the value of the mount option during a remount when it isn't set by the mount command. Apologies for the noise, and I should hopefully have a fix soon. Boris

Re: [PATCH RFC] btrfs-progs: check: continue to check space cache if sb cache_generation is 0

2021-02-17 Thread Boris Burkov
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

Re: [PATCH 0/5] btrfs: support fsverity

2021-02-12 Thread Boris Burkov
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: > > > >

Re: [PATCH 1/2] btrfs-progs: corrupt generic item data with btrfs-corrupt-block

2021-02-09 Thread Boris Burkov
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

Re: [PATCH 2/5] btrfs: initial fsverity support

2021-02-09 Thread Boris Burkov
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

Re: [PATCH 0/5] btrfs: support fsverity

2021-02-04 Thread Boris Burkov
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. >

Re: [PATCH] btrfs: add a test for btrfs fsverity

2021-02-04 Thread Boris Burkov
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

[PATCH] btrfs: add a test for btrfs fsverity

2021-02-04 Thread Boris Burkov
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

[PATCH 5/5] btrfs: add sysfs feature for fsverity

2021-02-04 Thread Boris Burkov
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

[PATCH 2/5] btrfs: initial fsverity support

2021-02-04 Thread Boris Burkov
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

[PATCH 3/5] btrfs: check verity for reads of inline extents and holes

2021-02-04 Thread Boris Burkov
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

[PATCH 1/5] btrfs: add compat_flags to btrfs_inode_item

2021-02-04 Thread Boris Burkov
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

[PATCH 0/5] btrfs: support fsverity

2021-02-04 Thread Boris Burkov
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

[PATCH 4/5] btrfs: fallback to buffered io for verity files

2021-02-04 Thread Boris Burkov
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

[PATCH 1/2] btrfs-progs: corrupt generic item data with btrfs-corrupt-block

2021-02-04 Thread Boris Burkov
--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

[PATCH 0/2] btrfs-corrupt-block btree data corruption

2021-02-04 Thread Boris Burkov
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

[PATCH 2/2] btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block

2021-02-04 Thread Boris Burkov
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

Re: Snapshots slowing system

2016-03-11 Thread boris
I wondered whether you had elimated fragmentation, or any other known gotchas, as a cause? Out of curiosity, what is/was the utilisation of the disk? Were the snapshots read-only or read-write? Apropos Nada: quick shout out to Qu to wish him luck for the 4.6 merge. [Also, damn you autocorrecti

[btrfs-progs suspected BUG] Scrub info with Ubuntu-style subvol-as-root setup

2016-03-03 Thread boris
Hi, Setup: btrfs root but Ubuntu style: /@/ with root=@ as a kernel boot option. Been using it happily for years; not even sure if Ubuntu still uses this system for btrfs installs. btrfs fs is a partition on my GPT HDD. My fstab contains subvol=@ as option on the btrfs line, and adding/subtracting

Re: Changing label few times killed filesystem?

2014-11-27 Thread Boris Chernov
Since nobody had any other suggestions, I decided to attempt to run modified btrfsck with --repair option (without BUG_ON(rec->is_root) assertion). Surprisingly modified btrfsck --repair fixed all errors but one (according to btrfsck), but btrfsck asked me to run btrfsck --repair one

Re: Changing label few times killed filesystem?

2014-11-25 Thread Boris Chernov
In attempt to get more information, I have commented out BUG_ON(rec->is_root) in cmds-check.c to let btrfsck check my file system without failing on this assertion. Below you can see the output. I would appreciate any help or ideas... # btrfsck /dev/sdb1 # Full log can be downloaded her

Re: Changing label few times killed filesystem?

2014-11-25 Thread Boris Chernov
On 2014-11-24 02:46, Duncan wrote > if you were using gmane's web service, that explains things as weaverd, the process > that does the threading on the web side, was down for some days Yes, I have used gmane blog. Good to know it is not down anymore. Back on topic. Even after updating

File test operator for subvols; possible bug in 'btrfs show '

2014-11-24 Thread boris
Hi all, I was looking for a quick method of testing whether a working directory is a subvolume. Couldn't see an obvious one, so tried 'btrfs show http://tldp.org/LDP/abs/html/fto.html . The letter v (for volume, both upper and lower case forms; one for subvol, other for snapshots) is unused af

Re: Changing label few times killed filesystem?

2014-11-23 Thread Boris Chernov
> I suggest upgrading and just posting the results from 'btrfs check ' > without any options and see what you get. OK, I have upgraded to 3.17.0 kernel and I also have upgraded btrfs-tools: # btrfs --version Btrfs v3.17 # btrfs check /dev/sdb1 Checking filesystem on /dev/sdb1 UUID: 787e3

Re: Changing label few times killed filesystem?

2014-11-21 Thread Boris Chernov
On 2014-11-21 04:35, Roman Mamedov wrote: On Fri, 21 Nov 2014 01:27:17 + Boris Chernov wrote: I have changed file system label few times in total. When I tried to mount it after that, it became not mountable: # mount /dev/sdb1 /mnt mount: Not a directory I'd say that im

Changing label few times killed filesystem?

2014-11-20 Thread Boris Chernov
I have changed file system label few times in total. When I tried to mount it after that, it became not mountable: # mount /dev/sdb1 /mnt mount: Not a directory In dmesg I see the following after above command: [ 5198.413202] BTRFS info (device sdb1): disk space caching is enabled [

Re: Massive BTRFS performance degradation

2014-03-09 Thread boris
Swâmi Petaramesh petaramesh.org> writes: > Actually deduplication WAS the reason why I recently made the move to BTRFS > again, for deduplication in ZFS is working, but *SO* memory hungry and > performance killer unless you have *lots* of RAM... > If you think about what dedup is has to do i