[bug report] block: introduce blk-iolatency io controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Josef Bacik,

The patch d70675121546: "block: introduce blk-iolatency io
controller" from Jul 3, 2018, leads to the following static checker
warning:

	block/blk-iolatency.c:820 iolatency_pd_stat()
	warn: impossible condition '(iolat->rq_depth.max_depth == -1) => (0-u32max == u64max)'

block/blk-iolatency.c
   813  static size_t iolatency_pd_stat(struct blkg_policy_data *pd, char *buf,
   814                                  size_t size)
   815  {
   816          struct iolatency_grp *iolat = pd_to_lat(pd);
   817          unsigned long long avg_lat = div64_u64(iolat->total_lat_avg, NSEC_PER_USEC);
   818  
   819          if (iolat->rq_depth.max_depth == (u64)-1)
                                    ^^^^^^^^^
This is a u32.

   820                  return scnprintf(buf, size, " depth=max avg_lat=%llu",
   821                                   avg_lat);
   822  
   823          return scnprintf(buf, size, " depth=%u avg_lat=%llu",
   824                           iolat->rq_depth.max_depth, avg_lat);
   825  }


regards,
dan carpenter



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux