mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
metaslab: don't pass whole zio to throttle reserve APIs
They only need a couple of fields, and passing the whole thing just invites fiddling around inside it, like modifying flags, which then makes it much harder to understand the zio state from inside zio.c. We move the flag update to just after a successful throttle in zio.c. Rename ZIO_FLAG_IO_ALLOCATING to ZIO_FLAG_ALLOC_THROTTLED Better describes what it means, and makes it look less like IO_IS_ALLOCATING, which means something different. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17508
This commit is contained in:
@@ -110,9 +110,10 @@ void metaslab_class_balance(metaslab_class_t *mc, boolean_t onsync);
|
||||
void metaslab_class_histogram_verify(metaslab_class_t *);
|
||||
uint64_t metaslab_class_fragmentation(metaslab_class_t *);
|
||||
uint64_t metaslab_class_expandable_space(metaslab_class_t *);
|
||||
boolean_t metaslab_class_throttle_reserve(metaslab_class_t *, int, zio_t *,
|
||||
boolean_t, boolean_t *);
|
||||
boolean_t metaslab_class_throttle_unreserve(metaslab_class_t *, int, zio_t *);
|
||||
boolean_t metaslab_class_throttle_reserve(metaslab_class_t *, int, int,
|
||||
uint64_t, boolean_t, boolean_t *);
|
||||
boolean_t metaslab_class_throttle_unreserve(metaslab_class_t *, int, int,
|
||||
uint64_t);
|
||||
void metaslab_class_evict_old(metaslab_class_t *, uint64_t);
|
||||
const char *metaslab_class_get_name(metaslab_class_t *);
|
||||
uint64_t metaslab_class_get_alloc(metaslab_class_t *);
|
||||
|
||||
+1
-1
@@ -196,7 +196,7 @@ typedef uint64_t zio_flag_t;
|
||||
#define ZIO_FLAG_DONT_RETRY (1ULL << 10)
|
||||
#define ZIO_FLAG_NODATA (1ULL << 12)
|
||||
#define ZIO_FLAG_INDUCE_DAMAGE (1ULL << 13)
|
||||
#define ZIO_FLAG_IO_ALLOCATING (1ULL << 14)
|
||||
#define ZIO_FLAG_ALLOC_THROTTLED (1ULL << 14)
|
||||
|
||||
#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
|
||||
#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)
|
||||
|
||||
Reference in New Issue
Block a user