inline_data option on ext4 truncates symlinks

Bug #1349020 reported by Claes Wallin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Luis Henriques
Trusty
Fix Released
Undecided
Luis Henriques
Utopic
Fix Released
Medium
Luis Henriques

Bug Description

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.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-32-generic 3.13.0-32.57
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: clacke 3532 F.... pulseaudio
CurrentDesktop: GNOME
Date: Sun Jul 27 00:47:06 2014
EcryptfsInUse: Yes
MachineType: LENOVO IdeaPad Z370
ProcFB:
 0 inteldrmfb
 1 nouveaufb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.13.0-32-generic root=/dev/mapper/hostname-trusty_root ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-32-generic N/A
 linux-backports-modules-3.13.0-32-generic N/A
 linux-firmware 1.127.5
SourcePackage: linux
StagingDrivers: rts5139
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/29/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 4ACN35WW
dmi.board.name: KL5
dmi.board.vendor: LENOVO
dmi.board.version: Rev 1.0
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Rev 1.0
dmi.modalias: dmi:bvnLENOVO:bvr4ACN35WW:bd08/29/2011:svnLENOVO:pnIdeaPadZ370:pvrRev1.0:rvnLENOVO:rnKL5:rvrRev1.0:cvnLENOVO:ct10:cvrRev1.0:
dmi.product.name: IdeaPad Z370
dmi.product.version: Rev 1.0
dmi.sys.vendor: LENOVO

Revision history for this message
Claes Wallin (clacke) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Claes Wallin (clacke)
description: updated
Revision history for this message
Luis Henriques (henrix) wrote :

It looks like this is a bug that has already been fixed upstream by commit

commit bd9db175dde14b606265e0d37e8319d96fe1a58f
Author: Zheng Liu <email address hidden>
Date: Mon Jun 2 10:48:22 2014 -0400

    ext4: handle symlink properly with inline_data

I've uploaded a Trusty test kernel containing this commit here:

http://people.canonical.com/~henrix/lp1349020/amd64/

Could you please verify if it fixes the bug for you? Thanks!

Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Claes Wallin (clacke) wrote :

That fixes the bug. Even symlinks created by the faulty kernel will be interpreted correctly by the fixed kernel, as the fault is in reading, not in writing.

Luis Henriques (henrix)
Changed in linux (Ubuntu):
assignee: nobody → Luis Henriques (henrix)
status: Confirmed → In Progress
Luis Henriques (henrix)
Changed in linux (Ubuntu Trusty):
status: New → In Progress
assignee: nobody → Luis Henriques (henrix)
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Trusty):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Utopic):
status: In Progress → Fix Released
Revision history for this message
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-trusty' to 'verification-done-trusty'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-trusty
Claes Wallin (clacke)
tags: added: verification-done-trusty
removed: verification-needed-trusty
Revision history for this message
Claes Wallin (clacke) wrote :

The bug has been fixed in -proposed.

Performed the test in the bug description. The `128` file accurately points to a 128 bytes long filename. Double-checked that the file system was actually using -O inline_data. Disk usage reflects it as well:

# du ext4{,_inline}/test{/*,}
4 ext4/test/128
4 ext4/test/192
4 ext4/test/64
4 ext4/test
0 ext4_inline/test/128
4 ext4_inline/test/192
0 ext4_inline/test/64
0 ext4_inline/test

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (38.9 KiB)

This bug was fixed in the package linux - 3.13.0-35.62

---------------
linux (3.13.0-35.62) trusty; urgency=low

  [ Joseph Salisbury ]

  * Release Tracking Bug
    - LP: #1357148

  [ Brad Figg ]

  * Start new release

  [ dann frazier ]

  * SAUCE: (no-up) Fix build failure on arm64
    - LP: #1353657
  * [debian] Allow for package revisions condusive for branching

  [ David Henningsson ]

  * SAUCE: Call broadwell specific functions from the hda driver
    - LP: #1317865

  [ Edward Lin ]

  * SAUCE: (no-up) Add use native backlight quirk for Dell Inspiron
    5547/5447
    - LP: #1332437

  [ Imre Deak ]

  * SAUCE: drm/i915: move power domain init earlier during system resume
    - LP: #1353405

  [ Jani Nikula ]

  * SAUCE: drm/i915: use lane count and link rate from VBT as minimums for
    eDP
    - LP: #1338582
  * SAUCE: drm/i915/dp: force eDP lane count to max available lanes on BDW
    - LP: #1338582
  * SAUCE: drm/i915: provide interface for audio driver to query cdclk
    - LP: #1188091
  * SAUCE: drm/i915: demote opregion excessive timeout WARN_ONCE to
    DRM_INFO_ONCE
    - LP: #1351014

  [ Joseph Salisbury ]

  * [Config] updateconfigs after Linux 3.13.11.6 updates

  [ Luis Henriques ]

  * Revert "[Packaging] linux-udeb-flavour -- standardise on linux prefix"

  [ Ming Lei ]

  * Revert "SAUCE: (no-up) ata: Fix the dma state machine lockup for the
    IDENTIFY DEVICE PIO mode command."
    - LP: #1335645

  [ Paulo Zanoni ]

  * SAUCE: drm/i915: consider the source max DP lane count too
    - LP: #1338582

  [ Tim Gardner ]

  * [Config] CONFIG_GPIO_SYSFS=y
    - LP: #1342153
  * [Config] CONFIG_KEYS_DEBUG_PROC_KEYS=y
    - LP: #1344405
  * [Config] updateconfigs
  * [Config] CONFIG_SCSI_IPR_TRACE=y, CONFIG_SCSI_IPR_DUMP=y
    - LP: #1343109
  * [Config] CONFIG_CONTEXT_TRACKING_FORCE=n
    - LP: #1349028

  [ Timo Aaltonen ]

  * SAUCE: Fix a typo in hda i915_bdw support.
    - LP: #1343140

  [ Upstream Kernel Changes ]

  * Revert "net/mlx4_en: Fix bad use of dev_id"
    - LP: #1347012
  * Revert "ACPI / AC: Remove AC's proc directory."
    - LP: #1356913
  * Revert "mac80211: move "bufferable MMPDU" check to fix AP mode scan"
    - LP: #1356913
  * mm, pcp: allow restoring percpu_pagelist_fraction default
    - LP: #1347088
  * net: Fix permission check in netlink_connect()
    - LP: #1312989
  * netlink: Rename netlink_capable netlink_allowed
    - LP: #1312989
  * net: Move the permission check in sock_diag_put_filterinfo to
    packet_diag_dump
    - LP: #1312989
  * net: Add variants of capable for use on on sockets
    - LP: #1312989
  * net: Add variants of capable for use on netlink messages
    - LP: #1312989
  * net: Use netlink_ns_capable to verify the permisions of netlink
    messages
    - LP: #1312989
  * netlink: Only check file credentials for implicit destinations
    - LP: #1312989
  * igb: fix stats for i210 rx_fifo_errors
    - LP: #1338893
  * HID: use multi input quirk for 22b9:2968
    - LP: #1339567
  * crypto/nx: disable NX on little endian builds
    - LP: #1338666
  * ACPI / video: Add Dell Inspiron 5737 to the blacklist
    - LP: #1250401
  * Input: elantech - deal with clickpads reportin...

Changed in linux (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.