On Mon 02-03-26 15:23:51, Jeff Layton wrote:
Convert ext4 i_ino format strings to use the PRIino format macro in preparation for the widening of i_ino via kino_t.
In trace events, change __field(ino_t, ...) to __field(u64, ...) and update TP_printk format strings to %llu/%llx to match the widened field type.
Update local variables and function parameters that hold i_ino values from unsigned long to kino_t.
Signed-off-by: Jeff Layton jlayton@kernel.org
Two small comments. Otherwise feel free to add:
Reviewed-by: Jan Kara jack@suse.cz
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index 96ab95167bd6e10ba86e61a60cb0be9fbafe157f..43103816b80ef4901858bcd789acb0ffb2612317 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -455,7 +455,7 @@ int ext4_ext_migrate(struct inode *inode) * log, so disable fast commits for this transaction. */ ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_MIGRATE, handle);
- goal = (((inode->i_ino - 1) / EXT4_INODES_PER_GROUP(inode->i_sb)) *
- goal = (div_u64(inode->i_ino - 1, EXT4_INODES_PER_GROUP(inode->i_sb)) *
Ext4 doesn't support more than 2^32 inodes (due to on-disk format). Thus i_ino is always guaranteed to be a number that fits in 32-bits. Thus I'd here just type i_ino to (unsigned int) and be done with it like you've done it at other places.
...
@@ -1823,7 +1823,7 @@ TRACE_EVENT(ext4_journal_start_inode, TP_ARGS(inode, blocks, rsv_blocks, revoke_creds, type, IP), TP_STRUCT__entry(
__field( unsigned long, ino )
__field( dev_t, dev ) __field( unsigned long, ip ) __field( int, blocks )__field( u64, ino )@@ -1843,9 +1843,10 @@ TRACE_EVENT(ext4_journal_start_inode, ), TP_printk("dev %d,%d blocks %d, rsv_blocks %d, revoke_creds %d,"
" type %d, ino %lu, caller %pS", MAJOR(__entry->dev),
MINOR(__entry->dev), __entry->blocks, __entry->rsv_blocks," type %d, ino %llu, caller %pS", MAJOR(__entry->dev),
__entry->revoke_creds, __entry->type, __entry->ino,
__entry->revoke_creds, __entry->type,(unsigned long long) __entry->ino,
Not point in the type cast?
Honza