STRUCT NILFS_SC_INFO(9)
πΈ STRUCT NILFS_SC_INFO(9) πΈ
okay bestie, welcome to the Kernel API Manual β today's main character is struct nilfs_sc_info, aka the Segment constructor information. no cap, this is the whole vibe of the NILFS2 segment constructor in one struct π
β¨ SYNOPSIS β¨
struct nilfs_sc_info {
struct super_block *sc_super;
struct nilfs_root *sc_root;
unsigned long sc_nblk_inc;
struct list_head sc_dirty_files;
struct list_head sc_gc_inodes;
struct list_head sc_iput_queue;
struct work_struct sc_iput_work;
__u64 *sc_freesegs;
size_t sc_nfreesegs;
struct nilfs_inode_info *sc_dsync_inode;
loff_t sc_dsync_start;
loff_t sc_dsync_end;
struct list_head sc_segbufs;
struct list_head sc_write_logs;
unsigned long sc_segbuf_nblocks;
struct nilfs_segment_buffer *sc_curseg;
struct nilfs_cstage sc_stage;
struct nilfs_segsum_pointer sc_finfo_ptr;
struct nilfs_segsum_pointer sc_binfo_ptr;
unsigned long sc_blk_cnt;
unsigned long sc_datablk_cnt;
unsigned long sc_nblk_this_inc;
time64_t sc_seg_ctime;
__u64 sc_cno;
unsigned long sc_flags;
spinlock_t sc_state_lock;
unsigned long sc_state;
unsigned long sc_flush_request;
wait_queue_head_t sc_wait_request;
wait_queue_head_t sc_wait_daemon;
__u32 sc_seq_request;
__u32 sc_seq_accepted;
__u32 sc_seq_done;
int sc_sync;
unsigned long sc_interval;
unsigned long sc_mjcp_freq;
unsigned long sc_lseg_stime;
unsigned long sc_watermark;
struct timer_list sc_timer;
struct task_struct *sc_task;
};
like, look at her. forty fields. she's thriving π
π MEMBERS π
okay so here's the field-by-field tour, bestie β every single one, no skips, fr fr:
sc_superβ back pointer to thesuper_blockstruct. the classic "who's your parent" situation πsc_rootβ root object of the current filesystem tree π³sc_nblk_incβ block count of the current generation β¨sc_dirty_filesβ list of files that are gonna get written πsc_gc_inodesβ list of GC inodes that have blocks waiting to be written π₯sc_iput_queueβ list of inodes whereiputstill needs to happensc_iput_workβ work struct that defers theiputcall (she's patient, she waits π«Ά)sc_freesegsβ array of segment numbers to be freedsc_nfreesegsβ how many segments are chillin' onsc_freesegssc_dsync_inodeβ the inode whose data pages get written for a sync operationsc_dsync_startβ start byte offset of those data pagessc_dsync_endβ end byte offset of those data pages (inclusive, bestie, don't forget π)sc_segbufsβ list of segment bufferssc_write_logsβ list of segment buffers holding logs that are currently under writingsc_segbuf_nblocksβ number of available blocks in the segment bufferssc_cursegβ the current segment buffer, main character of the moment πsc_stageβ the collection stagesc_finfo_ptrβ pointer to the currentfinfostruct in the segment summarysc_binfo_ptrβ pointer to the currentbinfostruct in the segment summarysc_blk_cntβ block count of a filesc_datablk_cntβ data block count of a filesc_nblk_this_incβ number of blocks included in the current logical segmentsc_seg_ctimeβ creation time β°sc_cnoβ checkpoint number of the current log π§sc_flagsβ internal flagssc_state_lockβ spinlock forsc_stateand so on, iykyksc_stateβ segctord state flagssc_flush_requestβ inode bitmap of metadata files that need flushingsc_wait_requestβ client request queuesc_wait_daemonβ daemon wait queue π΄sc_seq_requestβ request countersc_seq_acceptedβ accepted request countsc_seq_doneβ completion counter βsc_syncβ request of an explicit sync operationsc_intervalβ timeout value of background constructionsc_mjcp_freqβ frequency of creating checkpointssc_lseg_stimeβ start time of the latest logical segmentsc_watermarkβ watermark for the number of dirty bufferssc_timerβ timer for segctord β±οΈsc_taskβ current thread of segctord
π₯ SEE ALSO π₯
kernel file ./fs/nilfs2/segment.h, plus the besties struct nilfs_recovery_info(9) and struct nilfs_cstage(9) β go say hi π¦
okay that's the whole page, you ate that π
lowkey iconic of you to read all forty fields. this one lives under ./fs/nilfs2 and it's dated October 2026, so likeβ¦ future vibes only π periodt, go read the header file bestie ππ
π¦ 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