lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09f08d98-a615-4952-9949-daf4a7119b96@wdc.com>
Date: Tue, 9 Jul 2024 07:30:56 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: Qu Wenruo <quwenruo.btrfs@....com>, Johannes Thumshirn <jth@...nel.org>,
	Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>, David Sterba
	<dsterba@...e.com>
CC: "linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Qu Wenru
	<wqu@...e.com>, Filipe Manana <fdmanana@...e.com>
Subject: Re: [PATCH 2/2] btrfs: replace stripe extents

On 09.07.24 09:18, Qu Wenruo wrote:
> 
> 
> 在 2024/7/9 16:02, Johannes Thumshirn 写道:
>> From: Johannes Thumshirn <johannes.thumshirn@....com>
>>
>> Update stripe extents in case a write to an already existing address
>> incoming.
>>
>> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@....com>
> 
> Looks good to me.
> 
> Reviewed-by: Qu Wenruo <wqu@...e.com>
> 
> But still as I mentioned in the original thread, I'm wondering why
> dev-replace of RST needs to update RST entry.
> 
> I'd prefer to do a dev-extent level copy so that no RST/chunk needs to
> be updated, just like what we did for non-RST cases.
> 
> But so far the change should be good enough for us to continue the testing.

I /think/ I have a fix for the ASSERT() as well. It survived btrfs/060 
once already (which it hasn't before) and it's trivial and I feel stupid 
for it:

diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index fd56535b2289..6b1c6004f94c 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -57,6 +57,9 @@ int btrfs_delete_raid_extent(struct btrfs_trans_handle 
*trans, u64 start, u64 le
                 /* That stripe ends before we start, we're done. */
                 if (found_end <= start)
                         break;
+               /* That stripe starts after we end, we're done as well */
+               if (found_start >= end)
+                       break;

                 trace_btrfs_raid_extent_delete(fs_info, start, end,
                                                found_start, found_end);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ