>> To cut a long story short, we were using libext2fs to create >> filesystems where short symlinks (< 60 bytes) were stored the same way >> as long symlinks, ie. stored as an ordinary file instead of being >> stored in the inode. > > As a further data point, e2fsck does not complain about these > filesystems. This sounds bad. We may have to revert back to i_blocks based logic. As an example, lets say inode's EXT4_INODE_EXTENTS flag is clear, i_size is 2 and i_data[0] contains 0x00004141. Without inspecting xattrs and i_blocks, we can't determine whether a) the target is "AA" or b) block 0x4141 contains two bytes that is the actual symlink target.