On Thu, Jan 31, 2019 at 04:22:23PM +0200, Nikolay Borisov wrote: > > > On 31.01.19 г. 16:20 ч., David Sterba wrote: > > On Thu, Jan 31, 2019 at 08:03:36AM +0800, Qu Wenruo wrote: > >> On 2019/1/30 下午10:59, Nikolay Borisov wrote: > >>> On 30.01.19 г. 16:57 ч., David Sterba wrote: > >>>> On Fri, Jan 25, 2019 at 01:09:16PM +0800, Qu Wenruo wrote: > >>>>> Just add one extra line to show when the corruption is detected. > >>>>> Currently only read time detection is possible. > >>>>> > >>>>> Signed-off-by: Qu Wenruo <w...@suse.com> > >>>>> Reviewed-by: Nikolay Borisov <nbori...@suse.com> > >>>>> --- > >>>>> fs/btrfs/disk-io.c | 2 ++ > >>>>> 1 file changed, 2 insertions(+) > >>>>> > >>>>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > >>>>> index 794d5bb7fe33..426e9f450f70 100644 > >>>>> --- a/fs/btrfs/disk-io.c > >>>>> +++ b/fs/btrfs/disk-io.c > >>>>> @@ -658,6 +658,8 @@ static int btree_readpage_end_io_hook(struct > >>>>> btrfs_io_bio *io_bio, > >>>>> > >>>>> if (!ret) > >>>>> set_extent_buffer_uptodate(eb); > >>>>> + else > >>>>> + btrfs_err(fs_info, "read time tree block corrupted > >>>>> detected"); > >>>> > >>>> I'm not sure the 'read time' is clear enoug, my suggestion is to use > >>>> 'post-read' (and pre-write analogicaly). What do you think? > >>> > >>> > >>> How about "error during tree block reading" or "error reading treeblock"? > >> > >> Nikolay's suggestion looks more straightforward to me. > >> > >> +1 for his idea. > >> > >> The 'post-read' still could confuse end-user IMHO. > > > > The idea is to distinguish if the error was because the block can't be > > read or because the data it contains are wrong. > > In this case we can say "Read corrupted block"
That's IMHO not better, so I'll stick with the first version 'read time' and 'write time'.