From 1ecc0cab9b7c2ecfb0ef448111f12afe54b7ba33 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Sun, 5 Nov 2023 07:56:20 +0900 Subject: [PATCH] Remove abd-cache as SLABS, set blksz to recordsize. Signed-off-by: Jorgen Lundman --- module/os/windows/zfs/abd_os.c | 4 ++-- module/os/windows/zfs/zfs_znode.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/os/windows/zfs/abd_os.c b/module/os/windows/zfs/abd_os.c index 8e2bbe818404..648e393772c8 100644 --- a/module/os/windows/zfs/abd_os.c +++ b/module/os/windows/zfs/abd_os.c @@ -387,7 +387,7 @@ abd_init(void) abd_chunk_cache = kmem_cache_create("abd_chunk", zfs_abd_chunk_size, ABD_PGSIZE, - NULL, NULL, NULL, NULL, abd_arena, KMC_ARENA_SLAB | KMC_NOTOUCH); + NULL, NULL, NULL, NULL, abd_arena, KMC_NOTOUCH); wmsum_init(&abd_sums.abdstat_struct_size, 0); wmsum_init(&abd_sums.abdstat_scatter_cnt, 0); @@ -432,7 +432,7 @@ abd_init(void) abd_subpage_cache[index] = kmem_cache_create(name, bytes, sizeof (void *), NULL, NULL, NULL, NULL, abd_subpage_arena, - KMC_ARENA_SLAB | KMC_NOTOUCH); + KMC_NOTOUCH); VERIFY3P(abd_subpage_cache[index], !=, NULL); } diff --git a/module/os/windows/zfs/zfs_znode.c b/module/os/windows/zfs/zfs_znode.c index bfa2e41b3bc3..f501b3ac162d 100644 --- a/module/os/windows/zfs/zfs_znode.c +++ b/module/os/windows/zfs/zfs_znode.c @@ -550,9 +550,6 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, ASSERT(zp->z_dirlocks == NULL); ASSERT(!POINTER_IS_VALID(zp->z_zfsvfs)); - if (blksz == 0) - blksz = 0x200; - /* * Defer setting z_zfsvfs until the znode is ready to be a candidate for * the zfs_znode_move() callback. @@ -627,6 +624,9 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_buf_t *db, int blksz, zp->z_zfsvfs = zfsvfs; mutex_exit(&zfsvfs->z_znodes_lock); + if (zp->z_blksz == 0) + zp->z_blksz = zfs_blksz(zp); + return (zp); }