nilfs_palloc...ailable_slot(9)
π NAME
nilfs_palloc_find_available_slot β bestie, this is the one that goes hunting for an available slot in a group β¨
π SYNOPSIS
int nilfs_palloc_find_available_slot (unsigned char *bitmap , unsigned long target , unsigned int bsize , spinlock_t *lock , bool wrap );
πΈ ARGUMENTS
bitmapβ the bitmap of the group. yeah. the actual map of bits. it's giving "where the free seats are" πtargetβ the offset number of an entry in the group, aka your start point. like, begin the search here, queen πbsizeβ size in bits. that's it, that's the number πlockβ a spin lock protecting the bitmap. do not forget this one, fr fr, it's literally guarding the bitmap for you π«Άwrapβ whether to wrap around. yes or no. circle back or don't π
β RETURN
Returns the offset number within the group of the found free entry π« β¦ or -ENOSPC if it's not found π (no free seats, soz).
π¦ SEE ALSO
Kernel file ./fs/nilfs2/alloc.c β and like, the whole extended fam π§, all of these icons:
nilfs_palloc_groups_per_desc_block(9)nilfs_palloc_groups_count(9)nilfs_palloc_init_blockgroup(9)nilfs_palloc_group(9)nilfs_palloc_desc_blkoff(9)nilfs_palloc_bitmap_blkoff(9)nilfs_palloc_group_desc_nfrees(9)nilfs_palloc_group_desc_add_entries(9)nilfs_palloc_entry_blkoff(9)nilfs_palloc_desc_block_init(9)nilfs_palloc_delete_block(9)nilfs_palloc_get_desc_block(9)nilfs_palloc_get_bitmap_block(9)nilfs_palloc_delete_bitmap_block(9)nilfs_palloc_get_entry_block(9)nilfs_palloc_delete_entry_block(9)nilfs_palloc_group_desc_offset(9)nilfs_palloc_bitmap_offset(9)nilfs_palloc_entry_offset(9)nilfs_palloc_rest_groups_in_desc_block(9)nilfs_palloc_count_desc_blocks(9)nilfs_palloc_mdt_file_can_grow(9)nilfs_palloc_count_max_entries(9)nilfs_palloc_prepare_alloc_entry(9)nilfs_palloc_commit_alloc_entry(9)nilfs_palloc_commit_free_entry(9)nilfs_palloc_abort_alloc_entry(9)nilfs_palloc_prepare_free_entry(9)nilfs_palloc_abort_free_entry(9)nilfs_palloc_freev(9)
okay that's the whole page, no notes π
this one lives in ./fs/nilfs2 and it's dated October 2026, so yeah, future-coded of it πΈ stay slay, go find those free slots, mwah ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms