Re: [PATCH 6/6] Btrfs: add sanity check of extent item in scrub

2017-05-29 Thread David Sterba
On Mon, May 29, 2017 at 09:48:19AM +0800, Qu Wenruo wrote: > > > At 05/27/2017 04:20 AM, Liu Bo wrote: > > On Fri, May 26, 2017 at 08:33:16PM +0200, David Sterba wrote: > >> On Thu, May 25, 2017 at 06:26:31PM -0600, Liu Bo wrote: > >>> Currently scrub only verify checksum of both metadata and

Re: [PATCH 6/6] Btrfs: add sanity check of extent item in scrub

2017-05-28 Thread Qu Wenruo
At 05/27/2017 04:20 AM, Liu Bo wrote: On Fri, May 26, 2017 at 08:33:16PM +0200, David Sterba wrote: On Thu, May 25, 2017 at 06:26:31PM -0600, Liu Bo wrote: Currently scrub only verify checksum of both metadata and data and couldn't detect an invalid extent_item. This is a different kind of

Re: [PATCH 6/6] Btrfs: add sanity check of extent item in scrub

2017-05-26 Thread Liu Bo
On Fri, May 26, 2017 at 08:33:16PM +0200, David Sterba wrote: > On Thu, May 25, 2017 at 06:26:31PM -0600, Liu Bo wrote: > > Currently scrub only verify checksum of both metadata and data and > > couldn't detect an invalid extent_item. > > This is a different kind of check that scrub was never

Re: [PATCH 6/6] Btrfs: add sanity check of extent item in scrub

2017-05-26 Thread David Sterba
On Thu, May 25, 2017 at 06:26:31PM -0600, Liu Bo wrote: > Currently scrub only verify checksum of both metadata and data and > couldn't detect an invalid extent_item. This is a different kind of check that scrub was never designed to do. Scrub just verifies the checksums, not the sructural

[PATCH 6/6] Btrfs: add sanity check of extent item in scrub

2017-05-25 Thread Liu Bo
Currently scrub only verify checksum of both metadata and data and couldn't detect an invalid extent_item. This adds sanity check for extent item, now it can check if extent_inline_ref_type is valid. Signed-off-by: Liu Bo --- fs/btrfs/scrub.c | 43