STRUCT JBD2_JOURNAL_HANDLE(9)
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 iffh_reservedis 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β holdsh_revoke_creditsafter 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β holdsh_total_creditsafter 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
- 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