Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patchset adds journal support into simplefs using jbd2, the only available journal is external (you could create it using mke2fs -O journal_dev, for more info look into simple-test.sh), and the only spot that have start/write_access/dirty_metadata/stop is simplefs_write() (IOW no support for creation). This branch is compacted, for more verbose versions of this patchset please look into more older version (v4, v3, ...). Here is the example of records in journal: ==> final-jbd2-ext4.logdump <== logdump Journal starts at block 1, transaction 4 Found expected sequence 4, type 1 (descriptor block) at block 1 Found expected sequence 4, type 2 (commit block) at block 16 Found expected sequence 5, type 1 (descriptor block) at block 17 Found expected sequence 5, type 2 (commit block) at block 19 Found expected sequence 6, type 1 (descriptor block) at block 20 Found expected sequence 6, type 2 (commit block) at block 22 No magic number at block 23: end of journal. ==> final-jbd2-simplefs.logdump <== debugfs: logdump -f /dev/loop0 Ext2 superblock header found. Journal starts at block 2, transaction 2 Found expected sequence 2, type 1 (descriptor block) at block 2 Found expected sequence 2, type 2 (commit block) at block 4 Found expected sequence 3, type 1 (descriptor block) at block 5 Found expected sequence 3, type 2 (commit block) at block 7 Found expected sequence 4, type 1 (descriptor block) at block 8 Found expected sequence 4, type 2 (commit block) at block 10 Found expected sequence 5, type 1 (descriptor block) at block 11 Found expected sequence 5, type 2 (commit block) at block 13 Found expected sequence 6, type 1 (descriptor block) at block 14 Found expected sequence 6, type 2 (commit block) at block 16 Found expected sequence 7, type 1 (descriptor block) at block 17 Found expected sequence 7, type 2 (commit block) at block 19 Found expected sequence 8, type 1 (descriptor block) at block 20 Found expected sequence 8, type 2 (commit block) at block 22 No magic number at block 23: end of journal. * journal-v6: simplefs_write: install h_sync (sync on close) for jbd2 handle Use max available journal size with jbd2_journal_init_dev() simple-test: create journal with 4k block size simple-test: use losetup+journal_path=/dev/loopX for mounting with journal Handle bdevs for journal_path= mount flag Actually load journal by calling jbd2_journal_load() simple-test: mount fs with journal Implement journal_path option Add loader for internal journal (we need to update mkfs to support this) Add sfs_trace for lookup and compare inside it simple-test: enable jbd2-debug Check that journal was initialized successfully Write journal device name Implement external journal device instead of internal simplefs_write: add journaling using jbd2 Initial support of journaling
- Loading branch information