Kernel Log: Coming in 3.1 (Part 2) - Storage and filesystems
by Thorsten Leemhuis
The software RAID code now supports bad block management and dm-crypt can notify SSDs about freed storage areas. The iSCSI target framework LIO has been updated to Version 4.1 and the default Ext3 settings make the filesystem more robust, but a bit slower.
On Monday morning, Linus Torvalds released the fifth pre-release version of Linux 3.1. It is currently only available from GitHub, with the kernel.org infrastructure still restricted following the recent hack. In his release email, Torvalds notes that there is little to report on the development front. That is partly a result of the confusion caused by the kernel.org hack, which has affected the flow of patches.
In light of the ongoing development of Linux 3.1, the Kernel Log is continuing its 'Coming in 3.1' series by describing new features relating to storage code and filesystems. The first of this series of articles looked at changes to network drivers and infrastructure; articles on architecture code, infrastructure and drivers for other hardware will follow over the next few weeks.
At the time of publication, as result of a security breach at kernel.org, git.kernel.org is unavailable. Unfortunately this means that many of the links throughout this article, including all of the links in Minor Gems, are not currently working.
Like Ext4, the Ext3 filesystem will in future use write barriers by default. This adversely affects speed, but improves robustness in the event of a crash. In Linux 3.1, the Ext4 filesystem will, for the first time, remember which unused blocks it has already reported to underlying storage media when requested to do so by Fstrim. On subsequent calls to Fstrim, it then only needs to report blocks which have been freed up in the interim, thus speeding up batched discard, which is useful for SSDs and thinly provisioned storage.
Changes to the btrfs locking mechanism can make the experimental filesystem significantly faster during read-heavy workloads. Due to problems arising just prior to the submission of changes for Linux 3.1 – which the lead btrfs developer felt needed looking into – btrfs otherwise sees no major changes.
Kernel developers have extended pstore (platform persistent storage), which was merged into Linux 2.6.39, in order to be able to retain data for analysing crashes in non-volatile memory areas used by UEFI (1, 2). Background information on this can be found in a blog posting by EFI specialist Matthew Garrett.
Torvalds has merged a 660 KB patch, which lifts LIO (linux-iscsi.org), the iSCSI target framework merged in 2.6.38, to LIO version 4.1 (1, 2). Among other things, it adds support for CHAP authentication. This did not please the SCSI subsystem maintainer, who would have preferred this task to be delegated to a userspace program. Torvalds responded by pointing out some disadvantages of userspace solutions, in turn prompting the SCSI maintainer to outline further arguments in support of his viewpoint. It seems these were not sufficient to persuade Torvalds, as he merged the LIO 4.1 patches into the main development tree a bit later.