block: treat REQ_FUA and REQ_PREFLUSH as synchronous
[sfrench/cifs-2.6.git] / include / linux / blk_types.h
index 3fa62cabe8d219854a6c988749a0008bce8e32b6..107d23d18096647907484dd6ff42ab024bd4527f 100644 (file)
@@ -216,9 +216,15 @@ static inline bool op_is_write(unsigned int op)
        return (op & 1);
 }
 
+/*
+ * Reads are always treated as synchronous, as are requests with the FUA or
+ * PREFLUSH flag.  Other operations may be marked as synchronous using the
+ * REQ_SYNC flag.
+ */
 static inline bool op_is_sync(unsigned int op)
 {
-       return (op & REQ_OP_MASK) == REQ_OP_READ || (op & REQ_SYNC);
+       return (op & REQ_OP_MASK) == REQ_OP_READ ||
+               (op & (REQ_SYNC | REQ_FUA | REQ_PREFLUSH));
 }
 
 typedef unsigned int blk_qc_t;