@@ -20,11 +20,11 @@ a forced cache flush, and the Force Unit Access (FUA) flag for requests.
20
20
Explicit cache flushes
21
21
----------------------
22
22
23
- The REQ_FLUSH flag can be OR ed into the r/w flags of a bio submitted from
23
+ The REQ_PREFLUSH flag can be OR ed into the r/w flags of a bio submitted from
24
24
the filesystem and will make sure the volatile cache of the storage device
25
25
has been flushed before the actual I/O operation is started. This explicitly
26
26
guarantees that previously completed write requests are on non-volatile
27
- storage before the flagged bio starts. In addition the REQ_FLUSH flag can be
27
+ storage before the flagged bio starts. In addition the REQ_PREFLUSH flag can be
28
28
set on an otherwise empty bio structure, which causes only an explicit cache
29
29
flush without any dependent I/O. It is recommend to use
30
30
the blkdev_issue_flush() helper for a pure cache flush.
@@ -41,21 +41,21 @@ signaled after the data has been committed to non-volatile storage.
41
41
Implementation details for filesystems
42
42
--------------------------------------
43
43
44
- Filesystems can simply set the REQ_FLUSH and REQ_FUA bits and do not have to
44
+ Filesystems can simply set the REQ_PREFLUSH and REQ_FUA bits and do not have to
45
45
worry if the underlying devices need any explicit cache flushing and how
46
- the Forced Unit Access is implemented. The REQ_FLUSH and REQ_FUA flags
46
+ the Forced Unit Access is implemented. The REQ_PREFLUSH and REQ_FUA flags
47
47
may both be set on a single bio.
48
48
49
49
50
50
Implementation details for make_request_fn based block drivers
51
51
--------------------------------------------------------------
52
52
53
- These drivers will always see the REQ_FLUSH and REQ_FUA bits as they sit
53
+ These drivers will always see the REQ_PREFLUSH and REQ_FUA bits as they sit
54
54
directly below the submit_bio interface. For remapping drivers the REQ_FUA
55
55
bits need to be propagated to underlying devices, and a global flush needs
56
- to be implemented for bios with the REQ_FLUSH bit set. For real device
57
- drivers that do not have a volatile cache the REQ_FLUSH and REQ_FUA bits
58
- on non-empty bios can simply be ignored, and REQ_FLUSH requests without
56
+ to be implemented for bios with the REQ_PREFLUSH bit set. For real device
57
+ drivers that do not have a volatile cache the REQ_PREFLUSH and REQ_FUA bits
58
+ on non-empty bios can simply be ignored, and REQ_PREFLUSH requests without
59
59
data can be completed successfully without doing any work. Drivers for
60
60
devices with volatile caches need to implement the support for these
61
61
flags themselves without any help from the block layer.
@@ -65,16 +65,16 @@ Implementation details for request_fn based block drivers
65
65
--------------------------------------------------------------
66
66
67
67
For devices that do not support volatile write caches there is no driver
68
- support required, the block layer completes empty REQ_FLUSH requests before
69
- entering the driver and strips off the REQ_FLUSH and REQ_FUA bits from
68
+ support required, the block layer completes empty REQ_PREFLUSH requests before
69
+ entering the driver and strips off the REQ_PREFLUSH and REQ_FUA bits from
70
70
requests that have a payload. For devices with volatile write caches the
71
71
driver needs to tell the block layer that it supports flushing caches by
72
72
doing:
73
73
74
74
blk_queue_write_cache(sdkp->disk->queue, true, false);
75
75
76
76
and handle empty REQ_OP_FLUSH requests in its prep_fn/request_fn. Note that
77
- REQ_FLUSH requests with a payload are automatically turned into a sequence
77
+ REQ_PREFLUSH requests with a payload are automatically turned into a sequence
78
78
of an empty REQ_OP_FLUSH request followed by the actual write by the block
79
79
layer. For devices that also support the FUA bit the block layer needs
80
80
to be told to pass through the REQ_FUA bit using:
0 commit comments