mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Unify arc_prune_async() code
There is no sense to have separate implementations for FreeBSD and Linux. Make Linux code shared as more functional and just register FreeBSD-specific prune callback with arc_add_prune_callback() API. Aside of code cleanup this should fix excessive pruning on FreeBSD: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274698 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Mark Johnston <markj@FreeBSD.org> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #15456
This commit is contained in:
committed by
Tony Hutter
parent
bd7a02c251
commit
3ec4ea68d4
@@ -60,7 +60,7 @@ extern const struct file_operations zpl_file_operations;
|
||||
extern const struct file_operations zpl_dir_file_operations;
|
||||
|
||||
/* zpl_super.c */
|
||||
extern void zpl_prune_sb(int64_t nr_to_scan, void *arg);
|
||||
extern void zpl_prune_sb(uint64_t nr_to_scan, void *arg);
|
||||
|
||||
extern const struct super_operations zpl_super_operations;
|
||||
extern const struct export_operations zpl_export_operations;
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ typedef struct arc_prune arc_prune_t;
|
||||
typedef void arc_read_done_func_t(zio_t *zio, const zbookmark_phys_t *zb,
|
||||
const blkptr_t *bp, arc_buf_t *buf, void *priv);
|
||||
typedef void arc_write_done_func_t(zio_t *zio, arc_buf_t *buf, void *priv);
|
||||
typedef void arc_prune_func_t(int64_t bytes, void *priv);
|
||||
typedef void arc_prune_func_t(uint64_t bytes, void *priv);
|
||||
|
||||
/* Shared module parameters */
|
||||
extern uint_t zfs_arc_average_blocksize;
|
||||
|
||||
@@ -1065,7 +1065,6 @@ extern void arc_wait_for_eviction(uint64_t, boolean_t);
|
||||
|
||||
extern void arc_lowmem_init(void);
|
||||
extern void arc_lowmem_fini(void);
|
||||
extern void arc_prune_async(uint64_t);
|
||||
extern int arc_memory_throttle(spa_t *spa, uint64_t reserve, uint64_t txg);
|
||||
extern uint64_t arc_free_memory(void);
|
||||
extern int64_t arc_available_memory(void);
|
||||
|
||||
Reference in New Issue
Block a user