|LWN.net needs you!|
Without subscribers, LWN would simply not exist. Please consider signing up for a subscription and helping to keep LWN publishing
Darrick Wong and Zach Brown led a session at the 2014 LSFMM summit to discuss progress that has been made in the user-space interfaces for data integrity. This feature uses the data integrity field (DIF) defined by SCSI to add cyclic redundancy check (CRC) information to blocks so that corruptions between user space and the disk platter can be detected. That detection is done with the data integrity extension (DIX).
At last year's meeting, Wong said, he talked about DIF/DIX, but didn't have any code to show. That has changed this year as he has implemented an I/O extension feature that will allow user space to generate DIF information for its blocks. James Bottomley was concerned that the user has to know far too much about the drive to use the interface. It is, he said, the most complex interface we could export for DIF/DIX. But Martin Petersen said that user space would not be expected to use that interface directly, as a library would be written to support "write and protect" and "read and verify" kinds of operations.
The I/O extension uses an "extra" field in the iocb (I/O control block) structure that others have been "eyeing", Ted Ts'o said. But Brown noted that any additional users could add their data into the I/O extension itself, but that would require multiple users to coordinate on their extensions, Ts'o said. Kent Overstreet floated the idea of new system calls that added the protection information as a new parameter, but Wong said he was trying to avoid an explosion of system calls.
Ts'o noted that Google (his employer) has an out-of-tree extension that provides "cut to the head of the line" I/O scheduling; it also uses that extra iocb field. It is a bit of a hack, he said, and he didn't think he could navigate the politics to get it upstream. Wong suggested using a flag value in iocb to determine how the extra field was being used; alternatively, Brown suggested extending the I/O extension. While some coordination is needed to structure these kinds of things, Ts'o said, he didn't seem opposed to the idea overall.
[ Thanks to the Linux Foundation for travel support to attend LSFMM. ]
Copyright © 2014, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds