In association with heise online

03 July 2012, 11:39

Kernel Log: Coming in 3.5 (Part 2) - Filesystems and storage

by Thorsten Leemhuis

Linux 3.5 is now capable of the "FireWire Target Disk Mode", which is a familiar Mac feature. Btrfs logs data errors, allowing unreliable storage media to be detected. Checksums have been implemented to ensure that Ext4 metadata is consistent.

Together with the (LIO) target infrastructure software, the new FireWire SBP-2 fabric module enables Linux 3.4 to export local storage devices via FireWire so that other systems can mount them as an ordinary FireWire storage device. Many Apple systems have offered such a "FireWire target disk mode" for some time; a screenshot by one of the contributing developers shows that MacOS X can mount a device that a Linux system has made available via the new Linux FireWire fabric module.

The new TCM_QLA2XXX fabric module, and the required support in the Qla2xxx driver, allow Linux to operate as a SCSI target with Qlogic's series 2400, 2500 and 2600 fibre channel controllers; the same can also be achieved with the USB gadget target fabric module via UASP (USB Attached SCSI Protocol), provided that the USB controller is capable of the "gadget" features that allow it to operate as a USB master.


Current state of development

Late Saturday night, Linus Torvalds released the fifth pre-release version of Linux 3.5, saying that there's "nothing really worrisome in here". He asks those testing the release to let him and the LKML know if they find any errors.

The developers have made a major change to the still experimental Btrfs filesystem's writeback handling; in the email for his main Git-Pull request for Linux 3.5, Chris Mason writes that the changes are designed to prevent latency spikes which occasionally occur when writing metadata. In the message, Mason also mentions that he has found some problems in the Btrfs code for RAID 5 and 6, which is currently in development; the maintainer therefore didn't submit them for inclusion in 3.5.

What Mason did submit are some features to count the data errors that are detected by Btrfs; this failure tracking is designed to enable system administrators to identify unreliable storage media and replace them if necessary (1, 2, 3). The filesystem code now also includes some basic components to support Btrfs send/receive and subvolume quotas, although the developers are still working on these features.


Ext4 can now add CRC32 checksums to many parts of its metadata (1, 2, 3, 4, 5). If the checksums reveal corruptions, the kernel may refuse to mount the filesystem to avoid the accidental corruption of user data; if corruption is detected during operation, the kernel may mount a filesystem as read-only. As explained by Ext4 developer Theodore "tytso" Ts'o, the checksum feature can currently only be used with a developer version of the E2fsprogs tools; Ts'o has therefore said that he doesn't recommend people to use it just yet. The checksum feature can be manually enabled via Tune2fs or directly activated when formatting a device via Mkfs.ext4; however, older kernels can only mount such Ext4 filesystems in read-only form.


  • The MD subsystem's software RAID code can now use the AVX instructions of recent processors to perform XOR operations that are used for RAID 5. The MD code can now reshape in RAID 10; as a result, the number of storage devices in such a RAID can now be modified.
  • The kernel developers have fixed several timing problems in the floppy driver that became more apparent with virtualisation software because emulated floppy disk drives work faster than physical ones.
  • They also improved the support for HFS filesystems that have filesystem entries in a region-specific encoding (1, 2).
  • The device mapper can now allow the userspace to access the metadata of pools that use thin provisioning; according to the commit comment, this is useful for incremental backups, pool migration, merging snapshots and asynchronous replication tasks.
  • The new /proc/<pid>/task/<tid>/children files in procfs help identify the child processes of a process; in the medium term, this and various other extensions are planned to form the basis for moving Linux containers to other hosts during operation (Checkpoint and Restart; C/R).
  • The developers of the CIFS client code have added various basic components to support the Server Message Block 2 (SMB2) protocol that was introduced with Windows Vista; however, the support is currently incomplete and has, therefore, been marked as "broken" (1, 2).
  • FUSE now offers the "punch hole" feature that is available via the "fallocate" call and allows programs to inform the filesystem of areas within a file that no longer contain any data. The feature is useful for tasks such as keeping sparse files small and is also supported by Tmpfs, which now offers preallocation via Fallocate as well as SEEK_DATA and SEEK_HOLE.

Next: Minor Gems

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit