[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-btrfs
Subject: Re: [PATCH v3] btrfs-progs: Return more meaningful value for btrfs_read_deve_super
From: David Sterba <dsterba () suse ! cz>
Date: 2016-09-29 11:59:11
Message-ID: 20160929115911.GB5531 () twin ! jikos ! cz
[Download RAW message or body]
On Mon, Sep 26, 2016 at 12:54:26PM +0800, Qu Wenruo wrote:
> btrfs_read_dev_super() only returns 0 or -1, which doesn't really help,
> caller won't know if it's caused by bad superblock or superblock out of
> range.
>
> Return -errno if pread64() return -1, and return -EOF if none or part of
> the super is read out, and return what check_super() returned.
>
> So caller can get -EIO to catch real corrupted super blocks.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic