2 * Copyright (C) 2020 Western Digital Corporation or its affiliates.
4 * This file is released under the GPL.
11 #ifdef CONFIG_HAS_BLKZONED
12 extern int blkzoned_get_zoned_model(struct thread_data *td,
13 struct fio_file *f, enum zbd_zoned_model *model);
14 extern int blkzoned_report_zones(struct thread_data *td,
15 struct fio_file *f, uint64_t offset,
16 struct zbd_zone *zones, unsigned int nr_zones);
17 extern int blkzoned_reset_wp(struct thread_data *td, struct fio_file *f,
18 uint64_t offset, uint64_t length);
19 extern int blkzoned_get_max_open_zones(struct thread_data *td, struct fio_file *f,
20 unsigned int *max_open_zones);
21 extern int blkzoned_get_max_active_zones(struct thread_data *td,
23 unsigned int *max_active_zones);
24 extern int blkzoned_finish_zone(struct thread_data *td, struct fio_file *f,
25 uint64_t offset, uint64_t length);
28 * Define stubs for systems that do not have zoned block device support.
30 static inline int blkzoned_get_zoned_model(struct thread_data *td,
31 struct fio_file *f, enum zbd_zoned_model *model)
34 * If this is a block device file, allow zbd emulation.
36 if (f->filetype == FIO_TYPE_BLOCK) {
43 static inline int blkzoned_report_zones(struct thread_data *td,
44 struct fio_file *f, uint64_t offset,
45 struct zbd_zone *zones, unsigned int nr_zones)
49 static inline int blkzoned_reset_wp(struct thread_data *td, struct fio_file *f,
50 uint64_t offset, uint64_t length)
54 static inline int blkzoned_get_max_open_zones(struct thread_data *td, struct fio_file *f,
55 unsigned int *max_open_zones)
59 static inline int blkzoned_get_max_active_zones(struct thread_data *td,
61 unsigned int *max_open_zones)
65 static inline int blkzoned_finish_zone(struct thread_data *td,
67 uint64_t offset, uint64_t length)
73 #endif /* FIO_BLKZONED_H */