gfs2_setattr_size(9)
πΈ NAME πΈ
gfs2_setattr_size β make a file a given size. This one is from the Kernel API Manual, bestie, and it's literally here to resize a file. π
β¨ SYNOPSIS β¨
here's the exact signature, no cap:
int gfs2_setattr_size (struct inode *inode , u64 newsize );
π ARGUMENTS π
inodeβ the inode. yes, that's the whole vibe. π«Άnewsizeβ the size to make the file. iconic. β¨
π¦ DESCRIPTION π¦
okay so the file size can grow, shrink, or stay the same size. This is called holding i_rwsem and an exclusive glock on the inode in question. that's the whole description, and it ate. π
π₯ RETURN π₯
errno β that's the return value, periodt. π
π SEE ALSO π
Kernel file ./fs/gfs2/bmap.c is the main character, and these are the linked faves:
gfs2_unstuffer_folio(9)gfs2_unstuff_dinode(9)find_metapath(9)metaptr1(9)metapointer(9)lookup_metapath(9)fillup_metapath(9)gfs2_extent_length(9)gfs2_hole_size(9)__gfs2_iomap_alloc(9)gfs2_alloc_size(9)__gfs2_iomap_get(9)gfs2_block_map(9)gfs2_journaled_truncate(9)sweep_bh_for_rgrps(9)find_nonnull_ptr(9)punch_hole(9)do_shrink(9)do_grow(9)gfs2_free_journal_extents(9)gfs2_add_jextent(9)gfs2_map_journal_extents(9)gfs2_write_alloc_required(9)
mwah π β source/version ./fs/gfs2, dated October 2026, page gfs2_setattr_size(9). bestie, that's a wrap. ππ¦
π¦ 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