Re: [PATCH 5/9] block: Implement support for zoned block devices

2016-09-19 Thread Bart Van Assche
On 09/19/16 14:27, Damien Le Moal wrote: + /* +* Make sure bi_size does not overflow because +* of some weird very large zone size. +*/ + if (nr_sects && (unsigned long long)nr_sects << 9 > UINT_MAX) + return -EINVAL; + + bio = bio_alloc(gfp

[PATCH 5/9] block: Implement support for zoned block devices

2016-09-19 Thread Damien Le Moal
From: Hannes Reinecke Implement a RB-Tree holding a zoned block device zone information (struct blk_zone) and add support functions for maintaining the RB-Tree and manipulating zone structs. The block layer support does not differentiate between host-aware and host-managed devices. The different

Re: [PATCH 5/9] block: Implement support for zoned block devices

2016-04-15 Thread Bart Van Assche
On 04/04/2016 03:00 AM, Hannes Reinecke wrote: +struct blk_zone *blk_lookup_zone(struct request_queue *q, sector_t lba) A similar comment applies to this function: does this function expect a sector_t or an LBA as its second argument? diff --git a/include/linux/blkdev.h b/include/linux/blkd

[PATCH 5/9] block: Implement support for zoned block devices

2016-04-04 Thread Hannes Reinecke
Implement a RB-Tree holding the zone information and add support functions for maintaining the RB-Tree. Signed-off-by: Hannes Reinecke --- block/Kconfig | 9 +++ block/Makefile | 1 + block/blk-core.c | 5 block/blk-zoned.c | 70 +++