gfs2_trans_add_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

gfs2_trans_add_data β€” bestie, this one adds a databuf to the transaction πŸ’…

(it lives in the Kernel API Manual, section 9, iykyk 🫢)


πŸ¦‹ SYNOPSIS πŸ¦‹

void gfs2_trans_add_data (struct gfs2_glock *gl , struct buffer_head *bh );

πŸŽ€ ARGUMENTS πŸŽ€

  • gl β€” the inode glock that's associated with the buffer, she's the main character of this pairing πŸ’–
  • bh β€” the buffer you're adding, no cap, this is the actual thing going in πŸ“

🌸 DESCRIPTION 🌸

Okay so this one is used in journaled data mode. We need to journal the data block the exact same way we journal metadata in the functions above β€” same energy, different block ✨. The difference is that here we've got a tag, and that tag is two __be64's: one being the block number (as per meta data), and one being a flag that says whether the data block needs escaping or not πŸ¦‹. Which means β€” and this is the part where you go "wait, what" β€” we need a new log entry for each 251 or so data blocks 😭. Not an enormous overhead, lowkey fine, but it's twice as much as for normal metadata blocks. It's giving "small price to pay" πŸ’€πŸ‘‘


⭐ SEE ALSO ⭐

  • Kernel file ./fs/gfs2/trans.c β€” go read the source, bestie, she ate πŸ”₯

Later, babes 🫢 β€” this cutie came out of ./fs/gfs2, in the October 2026 era, and yes it's gfs2_trans_add_data(9) from the Kernel API Manual, mwah πŸ’œ

πŸ“¦ where this page comes from