Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

jbd2: add jinode dirty range accessors

Provide a helper to fetch jinode dirty ranges in bytes. This lets
filesystem callbacks avoid depending on the internal representation,
preparing for a later conversion to page units.

Suggested-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Li Chen <me@linux.beauty>
Link: https://patch.msgid.link/20260306085643.465275-2-me@linux.beauty
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Li Chen and committed by
Theodore Ts'o
5267f6ef f7fc28b0

+14
+14
include/linux/jbd2.h
··· 445 445 loff_t i_dirty_end; 446 446 }; 447 447 448 + static inline bool jbd2_jinode_get_dirty_range(const struct jbd2_inode *jinode, 449 + loff_t *start, loff_t *end) 450 + { 451 + loff_t start_byte = jinode->i_dirty_start; 452 + loff_t end_byte = jinode->i_dirty_end; 453 + 454 + if (!end_byte) 455 + return false; 456 + 457 + *start = start_byte; 458 + *end = end_byte; 459 + return true; 460 + } 461 + 448 462 struct jbd2_revoke_table_s; 449 463 450 464 /**