Hi Qu, I think it will be a good idea to have corruption log. It should take --log or --verbose btrfs-corrupt-block --log=/path/to/logfile it should record original state of target object before the corruption. For ex: when we try to corrupt nlink field of /data/file.txt Log should have entries like: -- Found /data/file.txt with inode:257 Found field:nlink value:1 Corruption done. -- This will make debugging easier if debug-tree shows same output before and after the corruption. We can check the logs figure-out whether corruption exactly happened on specific object/field or not. > "data" options are: > "--bytenr BYTENR" > Mandatory, logical address > "--length LENGTH" > Optional, default to sectorsize of the fs > "--mirror" > Optional, default to all mirror > --mirror option Is this referring to file-data alone?. If so, including an option to target meta-data from specific mirror will be helpful. For example: Setup: RAID-1 with 3 drives (both data/meta-data mirrored) Corrupt an inode from drive-2. Running Btrfs-check figures out drive-1,drive-3 are valid entries and updates/fixes drive-2 entries. Something like that possible or i miss understood something? Cheers. Lakshmipathi.G -- 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
