linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
To: Sebastian Ochmann <ochmann@informatik.uni-bonn.de>
Cc: linux-btrfs@vger.kernel.org, Duncan <1i5t5.duncan@cox.net>
Subject: Re: Meaning of \"no_csum\" field when scrubbing with -R option
Date: Thu, 20 Feb 2014 20:38:07 +0800	[thread overview]
Message-ID: <5305F72F.9050109@cn.fujitsu.com> (raw)
In-Reply-To: <5305E63B.4000405@informatik.uni-bonn.de>

On 02/20/2014 07:25 PM, Sebastian Ochmann wrote:
> Hello,
>
>>     Sebastian Ochmann posted on Wed, 19 Feb 2014 13:58:17 +0100 as 
>> excerpted:
>>
>>
>>         So my question is, why does scrub show a high (i.e. non-zero) 
>> value for
>>         no_csum? I never enabled nodatasum or a similar option.
>>
>> Did you enable nodatacow option? if  nodatacow option is enabled,
>> data checksums will be also disabled at the same time.
[SNIP]

So i have found why we have such strange things from debugging, you can 
have a try as the
following steps:

# mkfs.btrfs -f /dev/sda9
# mount /dev/sda9 /mnt
# btrfs scrub start -BR /mnt

scrub done for 02dd3326-959f-4602-9baa-aa9ed99ac2e5
     scrub started at Thu Feb 20 20:31:46 2014 and finished after 0 seconds
     data_extents_scrubbed: 1
     tree_extents_scrubbed: 16
     data_bytes_scrubbed: 65536
     tree_bytes_scrubbed: 262144
     read_errors: 0
     csum_errors: 0
     verify_errors: 0
     no_csum: 16 ---------------------->not equal 0 for a newly mkfs.
     csum_discards: 0
     super_errors: 0
     malloc_errors: 0
     uncorrectable_errors: 0
     unverified_errors: 0
     corrected_errors: 0
     last_physical: 467140608

# btrfs-debug-tree /dev/sda9

By debuging tree, we found there is a EXTENT_ITEM in extent tree for newly
mkfs filesystem which we have written anything yet.

  item 2 key (12582912 EXTENT_ITEM 65536) itemoff 16182 itemsize 53
                 extent refs 1 gen 5 flags 1
                 extent data backref root 1 objectid 256 offset 0 count 1
item 3 key (12582912 BLOCK_GROUP_ITEM 8388608) itemoff 16158 itemsize 24

At the same time, Let's see Csum tree debug output:

checksum tree key (CSUM_TREE ROOT_ITEM 0)
leaf 29425664 items 0 free space 16283 generation 4 owner 7
fs uuid 02dd3326-959f-4602-9baa-aa9ed99ac2e5

So there is not corresponding checksum item for that DATA extent item..
This can explain why scrub output no_sum count!

For reasons, It may be reserved data space without checksum for other 
purpose!
So if this is true, i don't think this is harm for common users unless 
it is designed
unexpectedly!

Thanks,
Wang
>
>
> -- 
> 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
>


  reply	other threads:[~2014-02-20 12:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 12:58 Meaning of "no_csum" field when scrubbing with -R option Sebastian Ochmann
2014-02-20 10:31 ` Duncan
2014-02-20 10:51   ` Wang Shilong
2014-02-20 11:16     ` Duncan
2014-02-20 11:25     ` Meaning of \"no_csum\" " Sebastian Ochmann
2014-02-20 12:38       ` Wang Shilong [this message]
2014-02-21  2:30         ` Wang Shilong
2014-02-21  8:00           ` Duncan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5305F72F.9050109@cn.fujitsu.com \
    --to=wangsl.fnst@cn.fujitsu.com \
    --cc=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=ochmann@informatik.uni-bonn.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).