[TRUSTY][SRU][PATCH 0/1] inline_data option on ext4 truncates symlinks

Luis Henriques luis.henriques at canonical.com
Fri Aug 8 09:31:34 UTC 2014


BugLink: http://bugs.launchpad.net/bugs/1349020

== SRU Justification ==

The impact of this bug is currently 'low' as it requires using a
version of e2fsprogs that includes support for the inline_data option
for creating the ext4 filesystem, which is currently not available in
Trusty.  However, the kernel is affected by this bug and can impact
users.

== Fix ==

The following upstream commit fixes the issue:

commit bd9db175dde14b606265e0d37e8319d96fe1a58f
Author: Zheng Liu <wenqing.lz at taobao.com>
Date:   Mon Jun 2 10:48:22 2014 -0400

    ext4: handle symlink properly with inline_data

== Test Case ==

The bug reporter presents a test case I was able to use to reproduce
the issue:

To replicate the bug, create two filesystems, one with `mkfs.ext4 -I
256`, one with `mkfs.ext4 -I 256 -O inline_data`. An inode size of 256
bytes is the default, but included here for clarity. To do this, you
are going to need an `e2fsprogs` from trunk, or version 1.43 if it has
been released.

Mount the two filesystems, in each of them do:
    $ ln -s $(for i in {1..64}; do echo -n .; done) 64
    $ ln -s $(for i in {1..128}; do echo -n .; done) 128
    $ ln -s $(for i in {1..192}; do echo -n .; done) 192
    $ ls -l 64 128 192

Both directory listings will show symlinks named `64`, `128` and
`256`, each pointing to a filename with the corresponding amount of
dots. This is the expected behavior.

Unmount both filesystems, mount them again. Do the `ls -l` again.

The default filesystem will show the same output as previously, the
one with inline_data activated will show the `128` symlink pointing to
a filename of only 64 dots.


Zheng Liu (1):
  ext4: handle symlink properly with inline_data

 fs/ext4/inode.c | 3 +++
 1 file changed, 3 insertions(+)

-- 
1.9.1





More information about the kernel-team mailing list