blk-mq-debugfs-zoned.c 478 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2017 Western Digital Corporation or its affiliates.
  4. *
  5. * This file is released under the GPL.
  6. */
  7. #include <linux/blkdev.h>
  8. #include "blk-mq-debugfs.h"
  9. int queue_zone_wlock_show(void *data, struct seq_file *m)
  10. {
  11. struct request_queue *q = data;
  12. unsigned int i;
  13. if (!q->seq_zones_wlock)
  14. return 0;
  15. for (i = 0; i < q->nr_zones; i++)
  16. if (test_bit(i, q->seq_zones_wlock))
  17. seq_printf(m, "%u\n", i);
  18. return 0;
  19. }