Lines Matching refs:log
1 dm-log-writes
4 This target takes 2 devices, one to pass all IO to normally, and one to log all
8 able to take arbitrary data from userspace to insert into the log. The data
9 that is in the WRITE requests is copied into the log to make the replay happen
15 We log things in order of completion once we are sure the write is no longer in
18 log in a way that correlates to what is on disk and not what is in cache, to
23 the FLUSH request completes we log all of the WRITEs and then the FLUSH. Only
30 The log would show the following
51 which isn't quite what happened and wouldn't be caught during the log replay.
58 log-writes <dev_path> <log_dev_path>
61 log_dev_path : Device where the log entries are written to.
74 You can use a dmsetup message to set an arbitrary mark in a log.
80 mkfs.btrfs -f /dev/mapper/log
81 dmsetup message log 0 mark mkfs
84 This would allow you to replay the log up to the mkfs mark and
88 Every log has a mark at the end labeled "dm-log-writes-end".
93 There is a userspace tool that will replay the log for you in various ways.
94 It can be found here: https://github.com/josefbacik/log-writes
102 TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc"
103 dmsetup create log --table "$TABLE"
104 mkfs.btrfs -f /dev/mapper/log
105 dmsetup message log 0 mark mkfs
107 mount /dev/mapper/log /mnt/btrfs-test
109 dmsetup message log 0 mark fsync
113 dmsetup remove log
114 replay-log --log /dev/sdc --replay /dev/sdb --end-mark fsync
122 TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc"
123 dmsetup create log --table "$TABLE"
124 mkfs.btrfs -f /dev/mapper/log
125 dmsetup message log 0 mark mkfs
127 mount /dev/mapper/log /mnt/btrfs-test
131 dmsetup remove log
133 replay-log --log /dev/sdc --replay /dev/sdb --end-mark mkfs
135 replay-log --log /dev/sdc --replay /dev/sdb --start-mark mkfs \
138 And that will replay the log until it sees a FUA request, run the fsck command