On Mon, 2016-07-25 at 08:00 +0200, Hannes Reinecke wrote: > On 07/24/2016 12:04 AM, Bart Van Assche wrote: > > On 07/23/16 13:31, Hannes Reinecke wrote: > >> On 07/22/2016 11:56 PM, Ewan D. Milne wrote: > >>> > >>> So, blk_queue_chunk_sectors() has: > >>> > >>> void blk_queue_chunk_sectors(struct request_queue *q, unsigned int > >>> chunk_sectors) > >>> { > >>> BUG_ON(!is_power_of_2(chunk_sectors)); > >>> q->limits.chunk_sectors = chunk_sectors; > >>> } > >>> > >>> and it seems like if some device reports a non-power-of-2 zone_len > >>> then we > >>> will BUG_ON(). Probably would be better if we reported an error > >>> instead? > >>> > >> The ZBC spec mandates that the zone size must be a power of 2. > >> So I don't have problems with triggering a BUG_ON for non-compliant > >> drives. > > > > Triggering BUG_ON() if zone_len is not a power of two is completely > > unacceptable. No matter what zone information a ZBC drive exports that > > shouldn't result in a kernel oops. > > > Ok, will be fixing this. > > Cheers, > > Hannes Yes, unfortunately we have too much history with non-compliant devices. And, I much prefer to avoid crashing the kernel if it is not necessary. Thanks. -Ewan -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html