[Libguestfs] [PATCH supermin v2] ext2: Create symlinks properly (RHBZ#1470157).

Pino Toscano ptoscano at redhat.com
Thu Jul 13 08:04:12 UTC 2017


On Thursday, 13 July 2017 09:54:09 CEST Richard W.M. Jones wrote:
> The ext2 filesystem on disk format has two ways to store symlinks.
> For symlinks >= 60 bytes in length, they are stored as files
> (so-called "slow symlinks").  For shorter symlinks the symlink is
> stored in the inode ("fast symlinks").
> 
> Previously we only created slow symlinks even if they are shorter than
> 60 bytes.  This didn't matter until recently, when a change went into
> the upstream kernel which assumes that symlinks shorter than 60 bytes
> are always stored in the inode, thus breaking the filesystems that we
> created before:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=1470157#c4
> 
> This changes the code to use the ext2fs_symlink function instead which
> creates fast and slow symlinks properly.  It also removes use of
> PATH_MAX so this should work with symbolic link targets of any length.
> 
> This fix is required if you use supermin with any Linux kernel >= 4.13.
> 
> Thanks: Eric Sandeen
> ---

LGTM.

Thanks,
-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170713/63c5e70f/attachment.sig>


More information about the Libguestfs mailing list