Lines Matching defs:zone
41 * into string format. Useful in the debugging and tracing zone conditions. For
56 * Return true if a request is a write requests that needs zone write locking.
106 * device without zone capabilities, the number of zones is always 0.
124 * @cb: Callback function called for each reported zone
128 * Get zone information starting from the zone containing @sector for at most
129 * @nr_zones, and call @cb for each zone reported by the device.
161 static int blk_zone_need_reset_cb(struct blk_zone *zone, unsigned int idx,
168 switch (zone->cond) {
235 * blkdev_zone_mgmt - Execute a zone management operation on a range of zones
238 * @sector: Start sector of the first zone to operate on
239 * @nr_sectors: Number of sectors, should be at least the length of one zone and
240 * must be zone size aligned.
247 * The operation to execute on each zone can be a zone reset, open, close
273 /* Check alignment (handle eventual smaller last zone) */
281 * In the case of a zone reset operation over all zones,
312 static int blkdev_copy_zone_to_user(struct blk_zone *zone, unsigned int idx,
317 if (copy_to_user(&args->zones[idx], zone, sizeof(struct blk_zone)))
451 static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx,
460 /* Check for bad zones and holes in the zone report */
461 if (zone->start != args->sector) {
463 disk->disk_name, args->sector, zone->start);
467 if (zone->start >= capacity || !zone->len) {
468 pr_warn("%s: Invalid zone start %llu, length %llu\n",
469 disk->disk_name, zone->start, zone->len);
475 * smaller last zone.
477 if (zone->start + zone->len < capacity) {
478 if (zone->len != zone_sectors) {
479 pr_warn("%s: Invalid zoned device with non constant zone size\n",
483 } else if (zone->len > zone_sectors) {
484 pr_warn("%s: Invalid zoned device with larger last zone size\n",
489 /* Check zone type */
490 switch (zone->type) {
510 pr_warn("%s: Invalid zone type 0x%x at sectors %llu\n",
511 disk->disk_name, (int)zone->type, zone->start);
515 args->sector += zone->len;
520 * blk_revalidate_disk_zones - (re)allocate and initialize zone bitmaps
525 * initialize a disk request queue zone bitmaps. This functions should normally
528 * device zone size (chunk_sector limit) and the max zone append limit.
554 * Checks that the device driver indicated a valid zone size and that
555 * the max zone append limit is set.
558 pr_warn("%s: Invalid non power of two zone size (%llu)\n",
564 pr_warn("%s: Invalid 0 maximum zone append limit\n",