• Home
  • Raw
  • Download

Lines Matching +full:write +full:- +full:0

2 dm-log-writes
6 of the write operations to. This is intended for file system developers wishing
8 There is a log_write_entry written for every WRITE request and the target is
10 that is in the WRITE requests is copied into the log to make the replay happen
16 We log things in order of completion once we are sure the write is no longer in
17 cache. This means that normal WRITE requests are not actually logged until the
22 This works by attaching all WRITE requests to a list once the write completes.
27 following example (W means write, C means complete):
42 Any REQ_OP_DISCARD requests are treated like WRITE requests. Otherwise we would
43 have all the DISCARD requests, and then the WRITE requests and then the FLUSH
46 WRITE block 1, DISCARD block 1, FLUSH
50 DISCARD 1, WRITE 1, FLUSH
59 log-writes <dev_path> <log_dev_path>
81 write, but first you need to replay up to the mkfs to make sure
85 mkfs.btrfs -f /dev/mapper/log
86 dmsetup message log 0 mark mkfs
93 Every log has a mark at the end labeled "dm-log-writes-end".
99 It can be found here: https://github.com/josefbacik/log-writes
107 TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc"
108 dmsetup create log --table "$TABLE"
109 mkfs.btrfs -f /dev/mapper/log
110 dmsetup message log 0 mark mkfs
112 mount /dev/mapper/log /mnt/btrfs-test
114 dmsetup message log 0 mark fsync
115 md5sum /mnt/btrfs-test/foo
116 umount /mnt/btrfs-test
119 replay-log --log /dev/sdc --replay /dev/sdb --end-mark fsync
120 mount /dev/sdb /mnt/btrfs-test
121 md5sum /mnt/btrfs-test/foo
127 TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc"
128 dmsetup create log --table "$TABLE"
129 mkfs.btrfs -f /dev/mapper/log
130 dmsetup message log 0 mark mkfs
132 mount /dev/mapper/log /mnt/btrfs-test
134 btrfs filesystem balance /mnt/btrfs-test
135 umount /mnt/btrfs-test
138 replay-log --log /dev/sdc --replay /dev/sdb --end-mark mkfs
140 replay-log --log /dev/sdc --replay /dev/sdb --start-mark mkfs \
141 --fsck "btrfsck /dev/sdb" --check fua