On 17/05/2017 18:24, Andriy Gapon wrote: > Relevant records from the stream: > OBJECT object = 357 type = 19 bonustype = 44 blksz = 512 bonuslen = 204 > FREE object = 357 offset = 512 length = -1 > WRITE object = 357 type = 20 checksum type = 2 compression type = 0 > I wonder how this could be... > > According to zdb the object is a plain file carrying a symbolic link and it > has > some content in an embedded block pointer: > > Object lvl iblk dblk dsize lsize %full type > 357 1 16K 512 0 512 100.00 ZFS plain file > 204 bonus System attributes > dnode flags: USED_BYTES USERUSED_ACCOUNTED > dnode maxblkid: 0 > path /cache/pkg/libxcb-1.10_2.txz > ... > mode 120755 > size 28 > parent 149 > links 1 > pflags 40800000104 > Indirect blocks: > 0 L0 EMBEDDED et=0 200L/1cP B=1158 > > I think that it's strange that the object has any data at all as the link > target > is in the system attributes.
After staring at the data for some time I believe that this is an inconsistent dnode (mostly harmlessly) that resulted from converting a dnode for an empty directory (which had the well compressed embedded data) to a dnode for a symbolic link (which should not have any data, only attributes). Most likely this was caused by an incremental receive. As far as I can tell, dmu_object_reclaim() -> dnode_reallocate() would not reset the BP if the original dnode has embedded data and the new dnode has no data at all. > Here is a hex dump of the dnode physical data: > > 00000a00 13 0e 01 01 2c 00 00 03 01 00 cc 00 00 00 00 00 |....,...........| > 00000a10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000a20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000a30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000a40 00 00 00 18 21 03 00 01 00 51 80 cb a6 c7 e2 0a |....!....Q......| > 00000a50 00 0f 02 00 ff d8 50 00 00 00 00 00 00 00 00 00 |......P.........| > 00000a60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000a70 ff 01 00 36 8f 00 14 80 00 00 00 00 00 00 00 00 |...6............| > 00000a80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000a90 86 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000aa0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000ab0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000ac0 5a 50 2f 00 03 08 18 00 1c 00 00 00 00 00 00 00 |ZP/.............| > 00000ad0 ed a1 00 00 00 00 00 00 1c 00 00 00 00 00 00 00 |................| > 00000ae0 12 ad 23 00 00 00 00 00 00 00 00 00 00 00 00 00 |..#.............| > 00000af0 00 00 00 00 00 00 00 00 95 00 00 00 00 00 00 00 |................| > 00000b00 04 01 00 00 08 04 00 00 b1 f2 f4 53 00 00 00 00 |...........S....| > 00000b10 bb 57 87 3a 00 00 00 00 b1 f2 f4 53 00 00 00 00 |.W.:.......S....| > 00000b20 bb 57 87 3a 00 00 00 00 b1 f2 f4 53 00 00 00 00 |.W.:.......S....| > 00000b30 bb 57 87 3a 00 00 00 00 b1 f2 f4 53 00 00 00 00 |.W.:.......S....| > 00000b40 bb 57 87 3a 00 00 00 00 01 00 00 00 00 00 00 00 |.W.:............| > 00000b50 03 00 00 00 00 00 00 00 00 00 00 10 bf 01 1e 00 |................| > 00000b60 00 00 40 20 a9 00 12 00 00 00 00 40 a9 00 12 00 |..@ .......@....| > 00000b70 6c 69 62 78 63 62 2d 31 2e 31 30 5f 32 2d 36 39 |libxcb-1.10_2-69| > 00000b80 32 63 38 62 30 34 32 36 2e 74 78 7a 00 00 00 00 |2c8b0426.txz....| > 00000b90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000ba0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000bb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000bc0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000bd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000be0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > 00000bf0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| > > If I am not mistaken the block pointer is in bytes 0xa40 - 0xabf. > So, the BP properties must be ff 01 00 36 8f 00 14 80 or 0x8014008f360001ff > They look sane, except that the BP type is 0x14 (20) instead of the expected > 0x13 (19) which is the dnode type. -- Andriy Gapon ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox-beta.com/groups/developer/ Powered by Topicbox: https://topicbox-beta.com
