riscv: Enable GENERIC_IRQ_SHOW_LEVEL
[linux-2.6-microblaze.git] / block / blk-core.c
index 9bcdae9..0447769 100644 (file)
@@ -142,8 +142,6 @@ static const char *const blk_op_name[] = {
        REQ_OP_NAME(ZONE_APPEND),
        REQ_OP_NAME(WRITE_SAME),
        REQ_OP_NAME(WRITE_ZEROES),
-       REQ_OP_NAME(SCSI_IN),
-       REQ_OP_NAME(SCSI_OUT),
        REQ_OP_NAME(DRV_IN),
        REQ_OP_NAME(DRV_OUT),
 };
@@ -599,7 +597,6 @@ fail_q:
        kmem_cache_free(blk_requestq_cachep, q);
        return NULL;
 }
-EXPORT_SYMBOL(blk_alloc_queue);
 
 /**
  * blk_get_queue - increment the request_queue refcount
@@ -1086,15 +1083,6 @@ blk_qc_t submit_bio(struct bio *bio)
                        task_io_account_read(bio->bi_iter.bi_size);
                        count_vm_events(PGPGIN, count);
                }
-
-               if (unlikely(block_dump)) {
-                       char b[BDEVNAME_SIZE];
-                       printk(KERN_DEBUG "%s(%d): %s block %Lu on %s (%u sectors)\n",
-                       current->comm, task_pid_nr(current),
-                               op_is_write(bio_op(bio)) ? "WRITE" : "READ",
-                               (unsigned long long)bio->bi_iter.bi_sector,
-                               bio_devname(bio, b), count);
-               }
        }
 
        /*
@@ -1253,7 +1241,7 @@ static void update_io_ticks(struct block_device *part, unsigned long now,
        unsigned long stamp;
 again:
        stamp = READ_ONCE(part->bd_stamp);
-       if (unlikely(stamp != now)) {
+       if (unlikely(time_after(now, stamp))) {
                if (likely(cmpxchg(&part->bd_stamp, stamp, now) == stamp))
                        __part_stat_add(part, io_ticks, end ? now - stamp : 1);
        }
@@ -1394,26 +1382,22 @@ void blk_steal_bios(struct bio_list *list, struct request *rq)
 EXPORT_SYMBOL_GPL(blk_steal_bios);
 
 /**
- * blk_update_request - Special helper function for request stacking drivers
+ * blk_update_request - Complete multiple bytes without completing the request
  * @req:      the request being processed
  * @error:    block status code
- * @nr_bytes: number of bytes to complete @req
+ * @nr_bytes: number of bytes to complete for @req
  *
  * Description:
  *     Ends I/O on a number of bytes attached to @req, but doesn't complete
  *     the request structure even if @req doesn't have leftover.
  *     If @req has leftover, sets it up for the next range of segments.
  *
- *     This special helper function is only for request stacking drivers
- *     (e.g. request-based dm) so that they can handle partial completion.
- *     Actual device drivers should use blk_mq_end_request instead.
- *
  *     Passing the result of blk_rq_bytes() as @nr_bytes guarantees
  *     %false return from this function.
  *
  * Note:
- *     The RQF_SPECIAL_PAYLOAD flag is ignored on purpose in both
- *     blk_rq_bytes() and in blk_update_request().
+ *     The RQF_SPECIAL_PAYLOAD flag is ignored on purpose in this function
+ *      except in the consistency check at the end of this function.
  *
  * Return:
  *     %false - this request doesn't have any more data