re: md: raid 10 supports TRIM

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

 



Hello Shaohua Li,

This is a semi-automatic email about new static checker warnings.

The patch d61b764704ca: "md: raid 10 supports TRIM" from Aug 15, 
2012, leads to the following Smatch complaint:

drivers/md/raid10.c:3510 run()
	 warn: variable dereferenced before check 'mddev->queue' (see line 3508)

drivers/md/raid10.c
  3507	
  3508		blk_queue_max_discard_sectors(mddev->queue, mddev->chunk_sectors);
                                              ^^^^^^^^^^^^
New dereference.

  3509		chunk_size = mddev->chunk_sectors << 9;
  3510		if (mddev->queue) {
                    ^^^^^^^^^^^^
Old check.

  3511			blk_queue_io_min(mddev->queue, chunk_size);
  3512			if (conf->geo.raid_disks % conf->geo.near_copies)

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux