Lines Matching refs:write

5 caches data to the RAID disks. The cache can be in write-through (supported
6 since 4.4) or write-back mode (supported since 4.10). mdadm (supported since
7 3.4) has a new option '--write-journal' to create array with cache. Please
9 in write-through mode. A user can switch it to write-back mode by:
11 echo "write-back" > /sys/block/md0/md/journal_mode
13 And switch it back to write-through mode by:
15 echo "write-through" > /sys/block/md0/md/journal_mode
21 write-through mode:
23 This mode mainly fixes the 'write hole' issue. For RAID 4/5/6 array, an unclean
25 and parity don't match. The reason is that a stripe write involves several RAID
30 corruption in the RAID array. This problem is called 'write hole'.
32 The write-through cache will cache all data on cache disk first. After the data
34 two-step write will guarantee MD can recover correct data after unclean
35 shutdown even the array is degraded. Thus the cache can close the 'write hole'.
37 In write-through mode, MD reports IO completion to upper layer (usually
40 exposed to 'write hole' again.
42 In write-through mode, the cache disk isn't required to be big. Several
46 write-back mode:
48 write-back mode fixes the 'write hole' issue too, since all write data is
49 cached on cache disk. But the main goal of 'write-back' cache is to speed up
50 write. If a write crosses all RAID disks of a stripe, we call it full-stripe
51 write. For non-full-stripe writes, MD must read old data before the new parity
52 can be calculated. These synchronous reads hurt write throughput. Some writes
55 RAID disks only after the data becomes a full stripe write. This will
57 typical workload which does sequential write followed by fsync is an example.
59 In write-back mode, MD reports IO completion to upper layer (usually
64 In write-back mode, MD also caches data in memory. The memory cache includes
71 Too small cache disk will make the write aggregation less efficient in this
73 least several gigabytes size in write-back mode.
78 The write-through and write-back cache use the same disk format. The cache disk
79 is organized as a simple write log. The log consists of 'meta data' and 'data'
83 checksum is an optimization because MD can write meta and data freely without
89 write-through mode, MD calculates parity for IO data, writes both IO data and
94 In write-back mode, MD writes IO data to the log and reports IO completion. The
97 MD will calculate parity for the data and write parity into the log. After this
98 is finished, MD will write both data and parity into RAID disks, then MD can
100 stripe write, free cache disk space is low or free in-kernel memory cache space
106 raid4/5 and 2 for raid6), MD will write the data and parities to RAID disks. If