Re: [PATCH v2] Btrfs: fix read_node_slot to return errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 05, 2016 at 12:10:14PM -0700, Liu Bo wrote:
> We use read_node_slot() to read btree node and it has two cases,
> a) slot is out of range, which means 'no such entry'
> b) we fail to read the block, due to checksum fails or corrupted
>    content or not with uptodate flag.
> But we're returning NULL in both cases, this makes it return -ENOENT
> in case a) and return -EIO in case b), and this fixes its callers
> as well as btrfs_search_forward() 's caller to catch the new errors.
> 
> The problem is reported by Peter Becker, and I can manage to
> hit the same BUG_ON by mounting my fuzz image.
> 
> Reported-by: Peter Becker <floyd.net@xxxxxxxxx>
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>

Reviewed-by: David Sterba <dsterba@xxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux