Spiffy

Many file-system applications such as defragmentation tools, file system checkers or data recovery tools, operate at the storage layer. Today, developers of these storage applications require detailed knowledge of the filesystem format, which takes a significant amount of time to learn, often by trial and error, due to insufficient documentation or specification of the format. Furthermore, these applications perform ad-hoc processing of the filesystem metadata, leading to bugs and vulnerabilities. We propose Spiffy, an annotation language for specifying the on-disk format of a file system. File-system developers annotate the data structures of a file system, and we use these annotations to generate a library that allows identifying, parsing and traversing file-system metadata, providing support for both offline and online storage applications. This approach simplifies the development of storage applications that work across different file systems because it reduces the amount of file-system specific code that needs to be written. We have written annotations for the Linux Ext4, Btrfs and F2FS file systems, and developed several applications for these file systems, including a type-specific metadata corruptor, a file system converter, and an online storage layer cache that preferentially caches files for certain users. Our experiments show that applications that use the library to access file system metadata can achieve good performance and are robust against file system corruption errors.

[1]  Douglas Steedman Abstract Syntax Notation One (ASN.1) : the tutorial and reference , 1990 .

[2]  Yu Luo,et al.  Non-Intrusive Performance Profiling for Entire Software Stacks Based on the Flow Reconstruction Principle , 2016, OSDI.

[3]  Curtis Gedak Manage Partitions with GParted How-to , 2012 .

[4]  Angela Demke Brown,et al.  Recon: Verifying file system consistency at runtime , 2012, TOS.

[5]  Andrea C. Arpaci-Dusseau,et al.  Ffsck: the fast file system checker , 2013, FAST.

[6]  Adam Wright,et al.  Local Reasoning for the POSIX File System , 2014, ESOP.

[7]  George C. Necula,et al.  CCured: type-safe retrofitting of legacy code , 2002, POPL '02.

[8]  Andrea C. Arpaci-Dusseau,et al.  A Study of Linux File System Evolution , 2013, FAST.

[9]  Thomas F. Wenisch,et al.  The Mystery Machine: End-to-end Performance Analysis of Large-scale Internet Services , 2014, OSDI.

[10]  Andrea C. Arpaci-Dusseau,et al.  SQCK: A Declarative File System Checker , 2008, OSDI.

[11]  Andrea C. Arpaci-Dusseau,et al.  A logic of file systems , 2005, FAST'05.

[12]  Andrea C. Arpaci-Dusseau,et al.  Semantically-Smart Disk Systems , 2003, FAST.

[13]  Tian Luo,et al.  Differentiated storage services , 2011, SOSP.

[14]  Antony I. T. Rowstron,et al.  Software-defined caching: managing caches in multi-tenant data centers , 2015, SoCC.

[15]  George C. Necula,et al.  SafeDrive: safe and recoverable extensions using language-based techniques , 2006, OSDI '06.

[16]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[17]  Nickolai Zeldovich,et al.  Nail: A Practical Tool for Parsing and Generating Data Formats , 2014, OSDI.

[18]  Andrea C. Arpaci-Dusseau,et al.  Improving file system reliability with I/O shepherding , 2007, SOSP.

[19]  Angela Demke Brown,et al.  Verifying File System Consistency at Runtime , 2011 .

[20]  Angela Demke Brown,et al.  Breaking Apart the VFS for Managing File Systems , 2018, HotStorage.

[21]  Josef Bacik,et al.  BTRFS: The Linux B-Tree Filesystem , 2013, TOS.

[22]  Joo Young Hwang,et al.  F2FS: A New File System for Flash Storage , 2015, FAST.

[23]  Angela Demke Brown,et al.  Robust Consistency Checking for Modern Filesystems , 2014, RV.

[24]  Junfeng Yang,et al.  Using model checking to find serious file system errors , 2004, TOCS.

[25]  Andrea C. Arpaci-Dusseau,et al.  Analyzing the effects of disk-pointer corruption , 2008, 2008 IEEE International Conference on Dependable Systems and Networks With FTCS and DCC (DSN).

[26]  Erez Zadok,et al.  Type-safe disks , 2006, OSDI '06.

[27]  Leslie Lamport,et al.  LATEX. A document preparation system. User's Guide and Reference Manual , 1996 .

[28]  David Walker,et al.  The PADS project: an overview , 2011, ICDT '11.

[29]  Jennifer Widom,et al.  Database System Implementation , 2000 .

[30]  Ramez Elmasri,et al.  Database Systems , 2002, Encyclopedia of Information Systems.

[31]  Sidney Amani,et al.  Towards a fully verified file system , 2012 .

[32]  Wim H. Hesselink,et al.  Formalizing a hierarchical file system , 2009, Formal Aspects of Computing.

[33]  Adam Chlipala,et al.  Using Crash Hoare logic for certifying the FSCQ file system , 2015, USENIX Annual Technical Conference.