mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-07-15 04:07:40 +03:00
Fix compile-time warnings caused by duplicate struct typedefs (#16880)
Some compiler/versions warn these typedefs according to #16660.
The platform specific header sys/abd_os.h shouldn't define or use abd_t,
as it's defined in its non-platform specific consumer sys/abd.h.
Do the same as what FreeBSD header does.
Original-patch-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Rob Norris <robn@despairlabs.com>
(cherry picked from commit a9851ea3dd
)
Co-authored-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
parent
5c51f8fc2f
commit
ff7d051475
@ -33,6 +33,7 @@
|
||||
#include <sys/thread.h>
|
||||
#include <sys/rwlock.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/kstat.h>
|
||||
|
||||
#define TASKQ_NAMELEN 31
|
||||
|
||||
|
@ -30,6 +30,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct abd;
|
||||
|
||||
struct abd_scatter {
|
||||
uint_t abd_offset;
|
||||
uint_t abd_nents;
|
||||
@ -41,10 +43,8 @@ struct abd_linear {
|
||||
struct scatterlist *abd_sgl; /* for LINEAR_PAGE */
|
||||
};
|
||||
|
||||
typedef struct abd abd_t;
|
||||
|
||||
typedef int abd_iter_page_func_t(struct page *, size_t, size_t, void *);
|
||||
int abd_iterate_page_func(abd_t *, size_t, size_t, abd_iter_page_func_t *,
|
||||
int abd_iterate_page_func(struct abd *, size_t, size_t, abd_iter_page_func_t *,
|
||||
void *);
|
||||
|
||||
/*
|
||||
@ -52,8 +52,8 @@ int abd_iterate_page_func(abd_t *, size_t, size_t, abd_iter_page_func_t *,
|
||||
* Note: these are only needed to support vdev_classic. See comment in
|
||||
* vdev_disk.c.
|
||||
*/
|
||||
unsigned int abd_bio_map_off(struct bio *, abd_t *, unsigned int, size_t);
|
||||
unsigned long abd_nr_pages_off(abd_t *, unsigned int, size_t);
|
||||
unsigned int abd_bio_map_off(struct bio *, struct abd *, unsigned int, size_t);
|
||||
unsigned long abd_nr_pages_off(struct abd *, unsigned int, size_t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user