ubifs_find_free_leb_for_idx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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:

  1. 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. 🫢
  2. 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:


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