Merge tag 'for-4.19/post-20180822' of git://git.kernel.dk/linux-block
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 20:38:05 +0000 (13:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 20:38:05 +0000 (13:38 -0700)
Pull more block updates from Jens Axboe:

 - Set of bcache fixes and changes (Coly)

 - The flush warn fix (me)

 - Small series of BFQ fixes (Paolo)

 - wbt hang fix (Ming)

 - blktrace fix (Steven)

 - blk-mq hardware queue count update fix (Jianchao)

 - Various little fixes

* tag 'for-4.19/post-20180822' of git://git.kernel.dk/linux-block: (31 commits)
  block/DAC960.c: make some arrays static const, shrinks object size
  blk-mq: sync the update nr_hw_queues with blk_mq_queue_tag_busy_iter
  blk-mq: init hctx sched after update ctx and hctx mapping
  block: remove duplicate initialization
  tracing/blktrace: Fix to allow setting same value
  pktcdvd: fix setting of 'ret' error return for a few cases
  block: change return type to bool
  block, bfq: return nbytes and not zero from struct cftype .write() method
  block, bfq: improve code of bfq_bfqq_charge_time
  block, bfq: reduce write overcharge
  block, bfq: always update the budget of an entity when needed
  block, bfq: readd missing reset of parent-entity service
  blk-wbt: fix IO hang in wbt_wait()
  block: don't warn for flush on read-only device
  bcache: add the missing comments for smp_mb()/smp_wmb()
  bcache: remove unnecessary space before ioctl function pointer arguments
  bcache: add missing SPDX header
  bcache: move open brace at end of function definitions to next line
  bcache: add static const prefix to char * array declarations
  bcache: fix code comments style
  ...

1  2 
block/blk-core.c
block/blk-mq-tag.c
block/blk-mq.c
drivers/md/bcache/Kconfig
drivers/md/bcache/util.c
drivers/md/bcache/util.h
kernel/trace/blktrace.c

@@@ -2162,10 -2161,12 +2161,12 @@@ static inline bool should_fail_request(
  
  static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part)
  {
-       if (part->policy && op_is_write(bio_op(bio))) {
+       const int op = bio_op(bio);
+       if (part->policy && (op_is_write(op) && !op_is_flush(op))) {
                char b[BDEVNAME_SIZE];
  
 -              printk(KERN_ERR
 +              WARN_ONCE(1,
                       "generic_make_request: Trying to write "
                        "to read-only block-device %s (partno %d)\n",
                        bio_devname(bio, b), part->partno);
Simple merge
diff --cc block/blk-mq.c
Simple merge
@@@ -1,8 -1,7 +1,8 @@@
  
  config BCACHE
        tristate "Block device as cache"
-       ---help---
 +      select CRC64
+       help
        Allows a block device to be used as cache for other devices; uses
        a btree for indexing and the layout is optimized for SSDs.
  
Simple merge
@@@ -543,26 -543,11 +544,27 @@@ dup:                                                                    
  #define RB_PREV(ptr, member)                                          \
        container_of_or_null(rb_prev(&(ptr)->member), typeof(*ptr), member)
  
 +static inline uint64_t bch_crc64(const void *p, size_t len)
 +{
 +      uint64_t crc = 0xffffffffffffffffULL;
 +
 +      crc = crc64_be(crc, p, len);
 +      return crc ^ 0xffffffffffffffffULL;
 +}
 +
 +static inline uint64_t bch_crc64_update(uint64_t crc,
 +                                      const void *p,
 +                                      size_t len)
 +{
 +      crc = crc64_be(crc, p, len);
 +      return crc;
 +}
 +
  /* Does linear interpolation between powers of two */
- static inline unsigned fract_exp_two(unsigned x, unsigned fract_bits)
+ static inline unsigned int fract_exp_two(unsigned int x,
+                                        unsigned int fract_bits)
  {
-       unsigned fract = x & ~(~0 << fract_bits);
+       unsigned int fract = x & ~(~0 << fract_bits);
  
        x >>= fract_bits;
        x   = 1 << x;
Simple merge