On 11/8/19 2:57 AM, Damien Le Moal wrote: > From: Christoph Hellwig <hch@xxxxxx> > > Avoid the need to allocate a potentially large array of struct blk_zone > in the block layer by switching the ->report_zones method interface to > a callback model. Now the caller simply supplies a callback that is > executed on each reported zone, and private data for it. > > Signed-off-by: Christoph Hellwig <hch@xxxxxx> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx> > Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx> > --- > block/blk-zoned.c | 253 +++++++++++++-------------------- > drivers/block/null_blk.h | 2 +- > drivers/block/null_blk_zoned.c | 31 ++-- > drivers/md/dm-flakey.c | 18 +-- > drivers/md/dm-linear.c | 20 +-- > drivers/md/dm-zoned-metadata.c | 131 +++++++---------- > drivers/md/dm.c | 121 +++++++--------- > drivers/scsi/sd.h | 4 +- > drivers/scsi/sd_zbc.c | 106 +++++++------- > fs/f2fs/super.c | 51 +++---- > include/linux/blkdev.h | 15 +- > include/linux/device-mapper.h | 24 +++- > 12 files changed, 329 insertions(+), 447 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 247165 (AG München), GF: Felix Imendörffer