ubifs_find_free_leb_for_idx(9)
πΈ NAME πΈ
ubifs_find_free_leb_for_idx β find a free LEB for the index. π
This page is giving Kernel API Manual energy, and bestie, we're getting into finding a free LEB for the index. No cap, that's the whole assignment. π
β¨ SYNOPSIS β¨
int ubifs_find_free_leb_for_idx (struct ubifs_info *c );
π«Ά ARGUMENTS π«Ά
cβ the UBIFS file-system description object. That's the bestie we're passing in. π
π DESCRIPTION π
Okay so ubifs_find_free_leb_for_idx literally looks for a free LEB and returns that LEB number. The returned LEB is marked as "taken", "index". Slay, it's claimed now. β¨
Only empty LEBs are allocated, and there are two reasons for that, bestie:
- First, the commit calculates the number of LEBs to allocate based on the assumption that they will be empty. So yeah, empty is the assignment. π«Ά
- Secondly, free space at the end of an index LEB is not guaranteed to be empty because it may have been used by the in-the-gaps method prior to an unclean unmount. iykyk π
If no LEB is found, -ENOSPC is returned. For other failures another negative error code is returned. That's the error-code tea. β
π SEE ALSO π
Kernel file ./fs/ubifs/find.c is the home base, and the related crew is:
struct scan_data(9)valuable(9)scan_for_dirty_cb(9)scan_for_dirty(9)ubifs_find_dirty_leb(9)scan_for_free_cb(9)do_find_free_space(9)ubifs_find_free_space(9)scan_for_idx_cb(9)scan_for_leb_for_idx(9)ubifs_save_dirty_idx_lnums(9)scan_dirty_idx_cb(9)find_dirty_idx_leb(9)get_idx_gc_leb(9)find_dirtiest_idx_leb(9)ubifs_find_dirty_idx_leb(9)
Okay that's the page, bestie π«Ά source/version: ./fs/ubifs; date: October 2026; manual page: ubifs_find_free_leb_for_idx(9). 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