block, drivers, fs: rename REQ_FLUSH to REQ_PREFLUSH
[deliverable/linux.git] / block / blk-flush.c
index 21f0d5b0d2cacf02b5dfc05f81be9554640502c8..d308def812db9b3794fc10e07da9a303dd31eb70 100644 (file)
@@ -10,8 +10,8 @@
  * optional steps - PREFLUSH, DATA and POSTFLUSH - according to the request
  * properties and hardware capability.
  *
- * If a request doesn't have data, only REQ_FLUSH makes sense, which
- * indicates a simple flush request.  If there is data, REQ_FLUSH indicates
+ * If a request doesn't have data, only REQ_PREFLUSH makes sense, which
+ * indicates a simple flush request.  If there is data, REQ_PREFLUSH indicates
  * that the device cache should be flushed before the data is executed, and
  * REQ_FUA means that the data must be on non-volatile media on request
  * completion.
  * difference.  The requests are either completed immediately if there's no
  * data or executed as normal requests otherwise.
  *
- * If the device has writeback cache and supports FUA, REQ_FLUSH is
+ * If the device has writeback cache and supports FUA, REQ_PREFLUSH is
  * translated to PREFLUSH but REQ_FUA is passed down directly with DATA.
  *
- * If the device has writeback cache and doesn't support FUA, REQ_FLUSH is
- * translated to PREFLUSH and REQ_FUA to POSTFLUSH.
+ * If the device has writeback cache and doesn't support FUA, REQ_PREFLUSH
+ * is translated to PREFLUSH and REQ_FUA to POSTFLUSH.
  *
  * The actual execution of flush is double buffered.  Whenever a request
  * needs to execute PRE or POSTFLUSH, it queues at
@@ -103,7 +103,7 @@ static unsigned int blk_flush_policy(unsigned long fflags, struct request *rq)
                policy |= REQ_FSEQ_DATA;
 
        if (fflags & (1UL << QUEUE_FLAG_WC)) {
-               if (rq->cmd_flags & REQ_FLUSH)
+               if (rq->cmd_flags & REQ_PREFLUSH)
                        policy |= REQ_FSEQ_PREFLUSH;
                if (!(fflags & (1UL << QUEUE_FLAG_FUA)) &&
                    (rq->cmd_flags & REQ_FUA))
@@ -391,9 +391,9 @@ void blk_insert_flush(struct request *rq)
 
        /*
         * @policy now records what operations need to be done.  Adjust
-        * REQ_FLUSH and FUA for the driver.
+        * REQ_PREFLUSH and FUA for the driver.
         */
-       rq->cmd_flags &= ~REQ_FLUSH;
+       rq->cmd_flags &= ~REQ_PREFLUSH;
        if (!(fflags & (1UL << QUEUE_FLAG_FUA)))
                rq->cmd_flags &= ~REQ_FUA;
 
This page took 0.024231 seconds and 5 git commands to generate.