jbd2_journal_init_dev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– jbd2_journal_init_dev(9) πŸ’–

okay so bestie, you found yourself a page from the Kernel API Manual and it's literally all about jbd2_journal_init_dev. pull up a chair, we're doing kernel journaling today πŸŽ€


✨ NAME ✨

jbd2_journal_init_dev β€” creates and initialises a journal structure. that's it, that's the whole vibe. she makes journals, she initialises them, she slays πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

journal_t * jbd2_journal_init_dev (struct block_device *bdev , struct
       block_device *fs_dev , unsigned long long start , int len , int
       blocksize );

look at her go. five args, one journal_t * coming right back at you πŸ”₯


🌸 ARGUMENTS 🌸

  • bdev β€” the Block device on which to create the journal. this is the home base, the main character of the operation πŸ‘‘
  • fs_dev β€” the Device which hold journalled filesystem for this journal. yes, "hold" β€” we're keeping the original's grammar era alive, no cap πŸ’€
  • start β€” Block nr Start of journal. where the journal begins, block-wise πŸ“
  • len β€” Length of the journal in blocks. how long she runs 🧚
  • blocksize β€” blocksize of journalling device. self-explanatory honestly, iykyk πŸ“

⭐ RETURN ⭐

a newly created journal_t * β€” fresh out of the oven, still warm, obsessed 🫢


πŸ’œ DESCRIPTION πŸ’œ

jbd2_journal_init_dev creates a journal which maps a fixed contiguous range of blocks on an arbitrary block device. fixed. contiguous. arbitrary device. she's flexible like that 🌈

like, the way that she just takes a chunk of blocks and makes a whole journal out of them? iconic behaviour fr fr ✨


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/jbd2/journal.c β€” go read the source bestie, it's giving transparency πŸ’–

and the whole friend group:

twenty of them. twenty. she has a big friend group and honestly? we love that for her 😭🫢


aaaand that's the page!! mwah πŸ’‹ this iconic little manual page lives in ./fs/jbd2, dated October 2026, and answers to the name jbd2_journal_init_dev(9). bye bestie, go init a journal responsibly πŸŒŸπŸ’…

πŸ“¦ where this page comes from