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: <20210630095923.GH2610@twin.jikos.cz>
Date:   Wed, 30 Jun 2021 11:59:23 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Johannes Thumshirn <Johannes.Thumshirn@....com>
Cc:     "lijian_8010a29@....com" <lijian_8010a29@....com>,
        "clm@...com" <clm@...com>,
        "josef@...icpanda.com" <josef@...icpanda.com>,
        "dsterba@...e.com" <dsterba@...e.com>,
        "linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        lijian <lijian@...ong.com>
Subject: Re: [PATCH] fs: btrfs: extent_map: removed unneeded variable

On Tue, Jun 29, 2021 at 09:04:40AM +0000, Johannes Thumshirn wrote:
> On 29/06/2021 10:51, lijian_8010a29@....com wrote:
> > From: lijian <lijian@...ong.com>
> > 
> > removed unneeded variable 'ret'.
> 
> Wouldn't it make more sense to return an error (-ENOENT??) in case
> the em lookup fails and handle the error in btrfs_finish_ordered_io()
> as this is the only caller of unpin_extent_cache()?
> 
> I've actually tripped over this a couple of times already when 
> investigating extent map and ordered extent splitting problems
> on zoned filesystems:
> 
> 	em = lookup_extent_mapping(tree, start, len);
> 	WARN_ON(!em || em->start != start);
> 
> Maybe even turn this WARN_ON() into an ASSERT() when introducing proper
> error handling, as we shouldn't really get there unless we have a logical
> error.

If you have real workloads hitting the warning then it really should be
proper error handling, not even an assert.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ