mbox series

[0/6] btrfs: Use KMEM_CACHE instead of kmem_cache_create

Message ID 20240220090645.108625-1-chentao@kylinos.cn (mailing list archive)
Headers show
Series btrfs: Use KMEM_CACHE instead of kmem_cache_create | expand

Message

Kunwu Feb. 20, 2024, 9:06 a.m. UTC
As David Sterba said in 
https://lore.kernel.org/all/20240205160408.GI355@twin.jikos.cz/
I'm using a patchset to cleanup the same issues in the 'brtfs' module.

For where the cache name and the structure name match.
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.

Kunwu Chan (6):
  btrfs: Simplify the allocation of slab caches in
    btrfs_delayed_inode_init
  btrfs: Simplify the allocation of slab caches in ordered_data_init
  btrfs: Simplify the allocation of slab caches in
    btrfs_transaction_init
  btrfs: Simplify the allocation of slab caches in btrfs_ctree_init
  btrfs: Simplify the allocation of slab caches in
    btrfs_delayed_ref_init
  btrfs: Simplify the allocation of slab caches in btrfs_free_space_init

 fs/btrfs/ctree.c            |  4 +---
 fs/btrfs/delayed-inode.c    |  6 +-----
 fs/btrfs/delayed-ref.c      | 24 ++++++++----------------
 fs/btrfs/free-space-cache.c |  4 +---
 fs/btrfs/ordered-data.c     |  5 +----
 fs/btrfs/transaction.c      |  5 ++---
 6 files changed, 14 insertions(+), 34 deletions(-)

Comments

David Sterba Feb. 21, 2024, noon UTC | #1
On Tue, Feb 20, 2024 at 05:06:39PM +0800, Kunwu Chan wrote:
> As David Sterba said in 
> https://lore.kernel.org/all/20240205160408.GI355@twin.jikos.cz/
> I'm using a patchset to cleanup the same issues in the 'brtfs' module.
> 
> For where the cache name and the structure name match.
> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
> to simplify the creation of SLAB caches.
> 
> Kunwu Chan (6):
>   btrfs: Simplify the allocation of slab caches in
>     btrfs_delayed_inode_init
>   btrfs: Simplify the allocation of slab caches in ordered_data_init
>   btrfs: Simplify the allocation of slab caches in
>     btrfs_transaction_init
>   btrfs: Simplify the allocation of slab caches in btrfs_ctree_init
>   btrfs: Simplify the allocation of slab caches in
>     btrfs_delayed_ref_init
>   btrfs: Simplify the allocation of slab caches in btrfs_free_space_init

Added to for-next, thanks. I've edited the changels so the name of the
structure is mentioned rather than the function where it happens, and
did some minor formatting adjustments.
Kunwu Feb. 22, 2024, 3:10 a.m. UTC | #2
On 2024/2/21 20:00, David Sterba wrote:
> On Tue, Feb 20, 2024 at 05:06:39PM +0800, Kunwu Chan wrote:
>> As David Sterba said in
>> https://lore.kernel.org/all/20240205160408.GI355@twin.jikos.cz/
>> I'm using a patchset to cleanup the same issues in the 'brtfs' module.
>>
>> For where the cache name and the structure name match.
>> Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>> to simplify the creation of SLAB caches.
>>
>> Kunwu Chan (6):
>>    btrfs: Simplify the allocation of slab caches in
>>      btrfs_delayed_inode_init
>>    btrfs: Simplify the allocation of slab caches in ordered_data_init
>>    btrfs: Simplify the allocation of slab caches in
>>      btrfs_transaction_init
>>    btrfs: Simplify the allocation of slab caches in btrfs_ctree_init
>>    btrfs: Simplify the allocation of slab caches in
>>      btrfs_delayed_ref_init
>>    btrfs: Simplify the allocation of slab caches in btrfs_free_space_init
> 
> Added to for-next, thanks. I've edited the changels so the name of the
> structure is mentioned rather than the function where it happens, and
> did some minor formatting adjustments.
It's ok, thanks for your adjustments.