On Tue, Nov 10, 2020 at 08:26:07PM +0900, Naohiro Aota wrote: > + /* Get zones type */ > + while (sector < nr_sectors) { > + nr_zones = BTRFS_REPORT_NR_ZONES; > + ret = btrfs_get_dev_zones(device, sector << SECTOR_SHIFT, zones, > + &nr_zones); > + if (ret) > + goto out; > + > + for (i = 0; i < nr_zones; i++) { > + if (zones[i].type == BLK_ZONE_TYPE_SEQWRITE_REQ) > + set_bit(nreported, zone_info->seq_zones); > + if (zones[i].cond == BLK_ZONE_COND_EMPTY) > + set_bit(nreported, zone_info->empty_zones); set_bit is atomic and it's not needed as nothing else could be touching the bitmap, so I'll switch it to plain __set_bit.