Re: [PATCH V4 07/16] scsi: sd_zbc: Initialize device request queue zoned data

2017-09-24 Thread Damien Le Moal
On 9/24/17 17:07, Christoph Hellwig wrote: >> +static inline unsigned long *sd_zbc_alloc_zone_bitmap(struct scsi_disk >> *sdkp) >> +{ >> +struct request_queue *q = sdkp->disk->queue; >> + >> +return kzalloc_node(BITS_TO_LONGS(sdkp->nr_zones) >> +* sizeof(unsigned

Re: [PATCH V4 07/16] scsi: sd_zbc: Initialize device request queue zoned data

2017-09-24 Thread Christoph Hellwig
> +static inline unsigned long *sd_zbc_alloc_zone_bitmap(struct scsi_disk *sdkp) > +{ > + struct request_queue *q = sdkp->disk->queue; > + > + return kzalloc_node(BITS_TO_LONGS(sdkp->nr_zones) > + * sizeof(unsigned long), > + GFP_KERNEL,

[PATCH V4 07/16] scsi: sd_zbc: Initialize device request queue zoned data

2017-09-24 Thread Damien Le Moal
Initialize the seq_zones bitmap and nr_zones field of the disk request queue on disk revalidate. As the seq_zones bitmap allocation is identical to the allocation of the zone write lock bitmap, introduce the helper sd_zbc_alloc_zone_bitmap(). Using this helper, wait for the disk capacity and