Thread (4 messages) 4 messages, 3 authors, 2021-06-30

Re: [PATCH] fs: btrfs: extent_map: removed unneeded variable

From: Johannes Thumshirn <hidden>
Date: 2021-06-29 09:04:48
Also in: lkml

On 29/06/2021 10:51, lijian_8010a29@163.com wrote:
From: lijian <redacted>

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help