STRUCT JBD2_JOURNAL_HANDLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the struct jbd2_journal_handle(9) page from the Kernel API Manual ✨ this is where the concrete type behind handle_t lives, and we're gonna walk through every single field together, no cap 🫢

πŸ’– NAME πŸ’–

struct jbd2_journal_handle β€” the concrete type that's associated with handle_t. That's the whole vibe: jbd2_journal_handle is the actual type you meet when the API is talking about handle_t πŸ’…

✨ SYNOPSIS ✨

Here's the struct in all its glory β€” every field exactly as written, bestie:

struct jbd2_journal_handle {
    union {
      transaction_t *h_transaction;
      journal_t *h_journal;
    };
    handle_t *h_rsv_handle;
    int h_total_credits;
    int h_revoke_credits;
    int h_revoke_credits_requested;
    int h_ref;
    int h_err;
    unsigned char   h_sync:         1;
    unsigned char   h_reserved:     1;
    unsigned char   h_aborted:      1;
    unsigned char   h_invalid:      1;
    unsigned char   h_type;
    unsigned short  h_line_no;
    unsigned long           h_start_jiffies;
    unsigned int            h_requested_credits;
    unsigned int            saved_alloc_context;
 };

🫢 Members 🫢

  • {unnamed_union} β€” anonymous. That's it, that's the whole note 🫢
  • h_transaction β€” which compound transaction is this update a part of? This field is literally the answer to that question πŸ’«
  • h_journal β€” which journal handle belongs to β€” used iff h_reserved is set. No cap.
  • h_rsv_handle β€” handle reserved for finishing the logical operation. The closer πŸŽ€
  • h_total_credits β€” number of remaining buffers we are allowed to add to journal. These are dirty buffers and revoke descriptor blocks. Budget check, but make it journal πŸ’…
  • h_revoke_credits β€” number of remaining revoke records available for handle.
  • h_revoke_credits_requested β€” holds h_revoke_credits after handle is started.
  • h_ref β€” reference count on this handle.
  • h_err β€” field for caller's use to track errors through large fs operations.
  • h_sync β€” flag for sync-on-close.
  • h_reserved β€” flag for handle for reserved credits.
  • h_aborted β€” flag indicating fatal error on handle. Dramatic, but valid 😭
  • h_invalid β€” present in the struct as a 1-bit field; the member rundown doesn't give it its own blurb, so I'm not making up lore πŸ’€
  • h_type β€” for handle statistics.
  • h_line_no β€” for handle statistics.
  • h_start_jiffies β€” Handle Start time.
  • h_requested_credits β€” holds h_total_credits after handle is started.
  • saved_alloc_context β€” saved context while transaction is open.

πŸ‘€ SEE ALSO πŸ‘€

  • Kernel file ./include/linux/jbd2.h β€” the header in question ✨
  • handle_t(9)
  • journal_t(9)
  • struct jbd2_inode(9)
  • struct journal_s(9)

source: ./include/linux Β· version/date: October 2026 Β· page: struct jbd2_journal_handle(9) β€” mwah, go read some kernel headers for me πŸ’–πŸ¦‹

πŸ“¦ where this page comes from