You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function calls ext4_fread that implements the special case for symlinks less than 60 bytes. However, this case incorrectly assumes that block count on the inode will be set to 0. In some cases, the blocks_count_lo appears to be non-zero, yet the symlink is still stored in the inode itself when the size is less than 60. Specific test case was the /etc/grub.conf file on a CentOs 5.3 installation where the block_count_lo was 8. I couldn't see any place in the EXT specification where block_count_lo has to be set to 0 for a symlink, so I removed the call to ext4_get_blocks_count in ext4_fread, but there may be other places where this is used as well.
The text was updated successfully, but these errors were encountered:
No, that appears to be writing symlinks over 60 bytes. I was trying to read symlinks on an existing filesystem that were under 60 bytes, lwext4 was not used to create the symlink.
if (softlink&&file->fsize<sizeof(ref.inode->blocks)
checks that small links have no blocks associated with them via !ext4_inode_get_blocks_count(sb, ref.inode), but this check doesn't hold on some OSes, and I couldn't find where the EXT specification mandates it. I just removed that check to fix the specific problem I was seeing.
The function calls ext4_fread that implements the special case for symlinks less than 60 bytes. However, this case incorrectly assumes that block count on the inode will be set to 0. In some cases, the blocks_count_lo appears to be non-zero, yet the symlink is still stored in the inode itself when the size is less than 60. Specific test case was the /etc/grub.conf file on a CentOs 5.3 installation where the block_count_lo was 8. I couldn't see any place in the EXT specification where block_count_lo has to be set to 0 for a symlink, so I removed the call to ext4_get_blocks_count in ext4_fread, but there may be other places where this is used as well.
The text was updated successfully, but these errors were encountered: