* [PATCH v5 2/3] ring-buffer: Handle RB_MISSED_* flags on commit field correctly
From: Masami Hiramatsu (Google) @ 2026-02-26 13:38 UTC (permalink / raw)
To: Steven Rostedt
Cc: Masami Hiramatsu, Mathieu Desnoyers, linux-kernel,
linux-trace-kernel
In-Reply-To: <177211310553.419230.7846100548994399256.stgit@mhiramat.tok.corp.google.com>
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Since the MSBs of rb_data_page::commit are used for storing
RB_MISSED_EVENTS and RB_MISSED_STORED, we need to mask out those bits
when it is used for finding the size of data pages.
Fixes: 5f3b6e839f3c ("ring-buffer: Validate boot range memory events")
Fixes: 5b7be9c709e1 ("ring-buffer: Add test to validate the time stamp deltas")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
Changes in v5:
- Do not move rb_commit_index().
- Fix verify_event() and rb_cpu_meta_valid() too.
Changes in v4:
- Fix to move rb_commit_index() after ring_buffer_per_cpu definition.
---
kernel/trace/ring_buffer.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 0eb6e6595f37..2e9b8ce6b4dc 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -395,6 +395,12 @@ static __always_inline unsigned int rb_page_commit(struct buffer_page *bpage)
return local_read(&bpage->page->commit);
}
+/* Size is determined by what has been committed */
+static __always_inline unsigned int rb_page_size(struct buffer_page *bpage)
+{
+ return rb_page_commit(bpage) & ~RB_MISSED_MASK;
+}
+
static void free_buffer_page(struct buffer_page *bpage)
{
/* Range pages are not to be freed */
@@ -676,7 +682,7 @@ static void verify_event(struct ring_buffer_per_cpu *cpu_buffer,
do {
if (page == tail_page || WARN_ON_ONCE(stop++ > 100))
done = true;
- commit = local_read(&page->page->commit);
+ commit = rb_page_size(page);
write = local_read(&page->write);
if (addr >= (unsigned long)&page->page->data[commit] &&
addr < (unsigned long)&page->page->data[write])
@@ -1820,13 +1826,16 @@ static bool rb_cpu_meta_valid(struct ring_buffer_cpu_meta *meta, int cpu,
/* Is the meta buffers and the subbufs themselves have correct data? */
for (i = 0; i < meta->nr_subbufs; i++) {
+ unsigned long commit;
+
if (meta->buffers[i] < 0 ||
meta->buffers[i] >= meta->nr_subbufs) {
pr_info("Ring buffer boot meta [%d] array out of range\n", cpu);
return false;
}
- if ((unsigned)local_read(&subbuf->commit) > subbuf_size) {
+ commit = local_read(&subbuf->commit) & ~RB_MISSED_MASK;
+ if (commit > subbuf_size) {
pr_info("Ring buffer boot meta [%d] buffer invalid commit\n", cpu);
return false;
}
@@ -1907,7 +1916,7 @@ static int rb_validate_buffer(struct buffer_data_page *dpage, int cpu)
u64 delta;
int tail;
- tail = local_read(&dpage->commit);
+ tail = local_read(&dpage->commit) & ~RB_MISSED_MASK;
return rb_read_data_buffer(dpage, tail, cpu, &ts, &delta);
}
@@ -1934,7 +1943,7 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
goto invalid;
}
entries += ret;
- entry_bytes += local_read(&cpu_buffer->reader_page->page->commit);
+ entry_bytes += rb_page_size(cpu_buffer->reader_page);
local_set(&cpu_buffer->reader_page->entries, ret);
ts = head_page->page->time_stamp;
@@ -2054,7 +2063,7 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
local_inc(&cpu_buffer->pages_touched);
entries += ret;
- entry_bytes += local_read(&head_page->page->commit);
+ entry_bytes += rb_page_size(head_page);
local_set(&cpu_buffer->head_page->entries, ret);
if (head_page == cpu_buffer->commit_page)
@@ -3256,12 +3265,6 @@ rb_iter_head_event(struct ring_buffer_iter *iter)
return NULL;
}
-/* Size is determined by what has been committed */
-static __always_inline unsigned rb_page_size(struct buffer_page *bpage)
-{
- return rb_page_commit(bpage) & ~RB_MISSED_MASK;
-}
-
static __always_inline unsigned
rb_commit_index(struct ring_buffer_per_cpu *cpu_buffer)
{
@@ -4432,7 +4435,7 @@ static void check_buffer(struct ring_buffer_per_cpu *cpu_buffer,
if (tail == CHECK_FULL_PAGE) {
full = true;
- tail = local_read(&bpage->commit);
+ tail = local_read(&bpage->commit) & ~RB_MISSED_MASK;
} else if (info->add_timestamp &
(RB_ADD_STAMP_FORCE | RB_ADD_STAMP_ABSOLUTE)) {
/* Ignore events with absolute time stamps */
^ permalink raw reply related
* [PATCH v5 3/3] ring-buffer: Skip invalid sub-buffers when validating persistent ring buffer
From: Masami Hiramatsu (Google) @ 2026-02-26 13:38 UTC (permalink / raw)
To: Steven Rostedt
Cc: Masami Hiramatsu, Mathieu Desnoyers, linux-kernel,
linux-trace-kernel
In-Reply-To: <177211310553.419230.7846100548994399256.stgit@mhiramat.tok.corp.google.com>
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Skip invalid sub-buffers when validating the persistent ring buffer
instead of discarding the entire ring buffer. Also, mark there are
missed events on the discarded buffer.
If the cache data in memory fails to be synchronized during a reboot,
the persistent ring buffer may become partially corrupted, but other
sub-buffers may still contain readable event data. Only discard the
subbuffersa that ar found to be corrupted.
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
---
Changes in v5:
- Instead of showing errors for each page, just show the number
of discarded pages at last.
Changes in v3:
- Record missed data event on commit.
---
kernel/trace/ring_buffer.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2e9b8ce6b4dc..cfe1e15f1a93 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1927,6 +1927,7 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
struct buffer_page *head_page, *orig_head;
unsigned long entry_bytes = 0;
unsigned long entries = 0;
+ int discarded = 0;
int ret;
u64 ts;
int i;
@@ -2053,19 +2054,19 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
ret = rb_validate_buffer(head_page->page, cpu_buffer->cpu);
if (ret < 0) {
- pr_info("Ring buffer meta [%d] invalid buffer page\n",
- cpu_buffer->cpu);
- goto invalid;
- }
-
- /* If the buffer has content, update pages_touched */
- if (ret)
- local_inc(&cpu_buffer->pages_touched);
-
- entries += ret;
- entry_bytes += rb_page_size(head_page);
- local_set(&cpu_buffer->head_page->entries, ret);
+ discarded++;
+ /* Instead of discard whole ring buffer, discard only this sub-buffer. */
+ local_set(&head_page->entries, 0);
+ local_set(&head_page->page->commit, RB_MISSED_EVENTS);
+ } else {
+ /* If the buffer has content, update pages_touched */
+ if (ret)
+ local_inc(&cpu_buffer->pages_touched);
+ entries += ret;
+ entry_bytes += rb_page_size(head_page);
+ local_set(&cpu_buffer->head_page->entries, ret);
+ }
if (head_page == cpu_buffer->commit_page)
break;
}
@@ -2079,7 +2080,8 @@ static void rb_meta_validate_events(struct ring_buffer_per_cpu *cpu_buffer)
local_set(&cpu_buffer->entries, entries);
local_set(&cpu_buffer->entries_bytes, entry_bytes);
- pr_info("Ring buffer meta [%d] is from previous boot!\n", cpu_buffer->cpu);
+ pr_info("Ring buffer meta [%d] is from previous boot! (%d pages discarded)\n",
+ cpu_buffer->cpu, discarded);
return;
invalid:
^ permalink raw reply related
* [syzbot] [bpf?] [trace?] KASAN: slab-use-after-free Read in bpf_trace_run3 (2)
From: syzbot @ 2026-02-26 14:10 UTC (permalink / raw)
To: andrii, ast, bpf, daniel, eddyz87, haoluo, john.fastabend, jolsa,
kpsingh, linux-kernel, linux-trace-kernel, martin.lau,
mathieu.desnoyers, mattbobrowski, mhiramat, rostedt, sdf, song,
syzkaller-bugs, yonghong.song
Hello,
syzbot found the following issue on:
HEAD commit: 32a92f8c8932 Convert more 'alloc_obj' cases to default GFP..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10f64152580000
kernel config: https://syzkaller.appspot.com/x/.config?x=2208a171312e89b7
dashboard link: https://syzkaller.appspot.com/bug?extid=9ea7c90be2b24e189592
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16eaa55a580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-32a92f8c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/78386dbc59f1/vmlinux-32a92f8c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b38bbd9a7831/bzImage-32a92f8c.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9ea7c90be2b24e189592@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-use-after-free in __bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline]
BUG: KASAN: slab-use-after-free in bpf_trace_run3+0xdd/0x850 kernel/trace/bpf_trace.c:2130
Read of size 8 at addr ffff888054ecb718 by task syz-executor/5447
CPU: 0 UID: 0 PID: 5447 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xba/0x230 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
__bpf_trace_run kernel/trace/bpf_trace.c:2075 [inline]
bpf_trace_run3+0xdd/0x850 kernel/trace/bpf_trace.c:2130
__bpf_trace_mmap_lock_acquire_returned+0x17e/0x1d0 include/trace/events/mmap_lock.h:47
__traceiter_mmap_lock_acquire_returned+0x87/0xe0 include/trace/events/mmap_lock.h:47
__do_trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:47 [inline]
trace_mmap_lock_acquire_returned include/trace/events/mmap_lock.h:47 [inline]
__mmap_lock_do_trace_acquire_returned+0x1a1/0x210 mm/mmap_lock.c:35
__mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:42 [inline]
mmap_write_lock_killable include/linux/mmap_lock.h:557 [inline]
dup_mmap+0x23d/0x1d90 mm/mmap.c:1740
dup_mm kernel/fork.c:1530 [inline]
copy_mm+0x13b/0x4b0 kernel/fork.c:1582
copy_process+0x18b6/0x3cf0 kernel/fork.c:2223
kernel_clone+0x248/0x8e0 kernel/fork.c:2654
__do_sys_clone kernel/fork.c:2795 [inline]
__se_sys_clone kernel/fork.c:2779 [inline]
__x64_sys_clone+0x1b6/0x230 kernel/fork.c:2779
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f392a1c50d2
Code: 89 e7 e8 b1 8b f7 ff 45 31 c0 31 d2 31 f6 64 48 8b 04 25 10 00 00 00 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 66 89 c5 85 c0 75 3b 64 48 8b 04 25 10 00 00
RSP: 002b:00007fffdffb7f00 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007fffdffb7f00 RCX: 00007f392a1c50d2
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 00007fffdffb808c R08: 0000000000000000 R09: 0000000000000000
R10: 0000555578a147d0 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000000927c0 R14: 000000000002f577 R15: 00007fffdffb80e0
</TASK>
Allocated by task 5916:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x31c/0x660 mm/slub.c:5339
kmalloc_noprof include/linux/slab.h:962 [inline]
kzalloc_noprof include/linux/slab.h:1200 [inline]
bpf_raw_tp_link_attach+0x278/0x700 kernel/bpf/syscall.c:4264
bpf_raw_tracepoint_open+0x1b2/0x220 kernel/bpf/syscall.c:4312
__sys_bpf+0x846/0x950 kernel/bpf/syscall.c:6270
__do_sys_bpf kernel/bpf/syscall.c:6341 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6339 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6339
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 5447:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2687 [inline]
slab_free mm/slub.c:6124 [inline]
kfree+0x1c1/0x630 mm/slub.c:6442
rcu_do_batch kernel/rcu/tree.c:2617 [inline]
rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
handle_softirqs+0x22a/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0x5f/0x150 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
__call_rcu_common kernel/rcu/tree.c:3131 [inline]
call_rcu+0xee/0x890 kernel/rcu/tree.c:3251
bpf_link_put_direct kernel/bpf/syscall.c:3323 [inline]
bpf_link_release+0x6b/0x80 kernel/bpf/syscall.c:3330
__fput+0x44f/0xa70 fs/file_table.c:469
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888054ecb700
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 24 bytes inside of
freed 192-byte region [ffff888054ecb700, ffff888054ecb7c0)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888054ecbd00 pfn:0x54ecb
flags: 0x4fff00000000200(workingset|node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000200 ffff88801a8413c0 ffffea0001629850 ffff888030400288
raw: ffff888054ecbd00 000000000010000d 00000000f5000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x1d2cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5909, tgid 5909 (syz.4.241), ts 194010998968, free_ts 194010573612
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889
prep_new_page mm/page_alloc.c:1897 [inline]
get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250
alloc_slab_page mm/slub.c:3255 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3444
new_slab mm/slub.c:3502 [inline]
refill_objects+0x331/0x3c0 mm/slub.c:7134
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x2b9/0x620 mm/slub.c:4578
alloc_from_pcs mm/slub.c:4681 [inline]
slab_alloc_node mm/slub.c:4815 [inline]
__kmalloc_cache_noprof+0x392/0x660 mm/slub.c:5334
kmalloc_noprof include/linux/slab.h:962 [inline]
kzalloc_noprof include/linux/slab.h:1200 [inline]
bpf_raw_tp_link_attach+0x278/0x700 kernel/bpf/syscall.c:4264
bpf_raw_tracepoint_open+0x1b2/0x220 kernel/bpf/syscall.c:4312
__sys_bpf+0x846/0x950 kernel/bpf/syscall.c:6270
__do_sys_bpf kernel/bpf/syscall.c:6341 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6339 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6339
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5913 tgid 5913 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1433 [inline]
__free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978
vfree+0x25a/0x400 mm/vmalloc.c:3479
bpf_prog_calc_tag+0x315/0x370 kernel/bpf/core.c:335
resolve_pseudo_ldimm64+0xbd/0xc90 kernel/bpf/verifier.c:21701
bpf_check+0x1d83/0x1ce00 kernel/bpf/verifier.c:25958
bpf_prog_load+0x1484/0x1ae0 kernel/bpf/syscall.c:3089
__sys_bpf+0x618/0x950 kernel/bpf/syscall.c:6228
__do_sys_bpf kernel/bpf/syscall.c:6341 [inline]
__se_sys_bpf kernel/bpf/syscall.c:6339 [inline]
__x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6339
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888054ecb600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888054ecb680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888054ecb700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888054ecb780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff888054ecb800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply
* Re: [PATCH v1] mm: annotate data race of f_ra.prev_pos
From: Jiayuan Chen @ 2026-02-26 14:29 UTC (permalink / raw)
To: Jan Kara
Cc: linux-mm, Jiayuan Chen, syzbot+6880f676b265dbd42d63,
Theodore Ts'o, Andreas Dilger, Konstantin Komarov,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Matthew Wilcox (Oracle), Andrew Morton, Hugh Dickins, Baolin Wang,
Jan Kara, linux-ext4, linux-kernel, ntfs3, linux-trace-kernel,
linux-fsdevel
In-Reply-To: <2xzc3lp6ehtjwbzip4i5muh4g6oep4l72zh3j6sablfghbvbau@kh7famgorzrh>
February 26, 2026 at 21:21, "Jan Kara" <jack@suse.cz mailto:jack@suse.cz?to=%22Jan%20Kara%22%20%3Cjack%40suse.cz%3E > wrote:
>
> On Thu 26-02-26 16:40:07, Jiayuan Chen wrote:
>
> >
> > From: Jiayuan Chen <jiayuan.chen@shopee.com>
> >
> > KCSAN reports a data race when concurrent readers access the same
> > struct file:
> >
> > BUG: KCSAN: data-race in filemap_read / filemap_splice_read
> >
> > write to 0xffff88811a6f8228 of 8 bytes by task 10061 on cpu 0:
> > filemap_splice_read+0x523/0x780 mm/filemap.c:3125
> > ...
> >
> > write to 0xffff88811a6f8228 of 8 bytes by task 10066 on cpu 1:
> > filemap_read+0x98d/0xa10 mm/filemap.c:2873
> > ...
> >
> > Both filemap_read() and filemap_splice_read() update f_ra.prev_pos
> > without synchronization. This is a benign race since prev_pos is only
> > used as a hint for readahead heuristics in page_cache_sync_ra(), and a
> > stale or torn value merely results in a suboptimal readahead decision,
> > not a correctness issue.
> >
> > Use WRITE_ONCE/READ_ONCE to annotate all accesses to prev_pos across
> > the tree for consistency and silence KCSAN.
> >
> > Reported-by: syzbot+6880f676b265dbd42d63@syzkaller.appspotmail.com
> > Link: https://syzkaller.appspot.com/bug?extid=6880f676b265dbd42d63
> > Signed-off-by: Jiayuan Chen <jiayuan.chen@shopee.com>
> >
> Given this, I think it would be much less intrusive and also more
> explanatory to just mark prev_pos with __data_racy with appropriate reason
> you're mentioning in the changelog.
Thanks for the suggestion. I'm fine either way — __data_racy is indeed
cleaner and less intrusive for a purely heuristic field like this.
I'll wait a bit to see if Andrew or other mm folks have a preference
before resending. Happy to go with whichever approach they prefer.
> Honza
>
> >
> > ---
> > fs/ext4/dir.c | 2 +-
> > fs/ntfs3/fsntfs.c | 2 +-
> > include/trace/events/readahead.h | 2 +-
> > mm/filemap.c | 6 +++---
> > mm/readahead.c | 4 ++--
> > mm/shmem.c | 2 +-
> > 6 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
> > index 28b2a3deb954..1ddf7acce5ca 100644
> > --- a/fs/ext4/dir.c
> > +++ b/fs/ext4/dir.c
> > @@ -200,7 +200,7 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
> > sb->s_bdev->bd_mapping,
> > &file->f_ra, file, index,
> > 1 << EXT4_SB(sb)->s_min_folio_order);
> > - file->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT;
> > + WRITE_ONCE(file->f_ra.prev_pos, (loff_t)index << PAGE_SHIFT);
> > bh = ext4_bread(NULL, inode, map.m_lblk, 0);
> > if (IS_ERR(bh)) {
> > err = PTR_ERR(bh);
> > diff --git a/fs/ntfs3/fsntfs.c b/fs/ntfs3/fsntfs.c
> > index 0df2aa81d884..d1232fc03c08 100644
> > --- a/fs/ntfs3/fsntfs.c
> > +++ b/fs/ntfs3/fsntfs.c
> > @@ -1239,7 +1239,7 @@ int ntfs_read_run_nb_ra(struct ntfs_sb_info *sbi, const struct runs_tree *run,
> > if (!ra_has_index(ra, index)) {
> > page_cache_sync_readahead(mapping, ra, NULL,
> > index, 1);
> > - ra->prev_pos = (loff_t)index << PAGE_SHIFT;
> > + WRITE_ONCE(ra->prev_pos, (loff_t)index << PAGE_SHIFT);
> > }
> > }
> >
> > diff --git a/include/trace/events/readahead.h b/include/trace/events/readahead.h
> > index 0997ac5eceab..63d8df6c2983 100644
> > --- a/include/trace/events/readahead.h
> > +++ b/include/trace/events/readahead.h
> > @@ -101,7 +101,7 @@ DECLARE_EVENT_CLASS(page_cache_ra_op,
> > __entry->async_size = ra->async_size;
> > __entry->ra_pages = ra->ra_pages;
> > __entry->mmap_miss = ra->mmap_miss;
> > - __entry->prev_pos = ra->prev_pos;
> > + __entry->prev_pos = READ_ONCE(ra->prev_pos);
> > __entry->req_count = req_count;
> > ),
> >
> > diff --git a/mm/filemap.c b/mm/filemap.c
> > index 63f256307fdd..d3e2d4b826b9 100644
> > --- a/mm/filemap.c
> > +++ b/mm/filemap.c
> > @@ -2771,7 +2771,7 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
> > int i, error = 0;
> > bool writably_mapped;
> > loff_t isize, end_offset;
> > - loff_t last_pos = ra->prev_pos;
> > + loff_t last_pos = READ_ONCE(ra->prev_pos);
> >
> > if (unlikely(iocb->ki_pos < 0))
> > return -EINVAL;
> > @@ -2870,7 +2870,7 @@ ssize_t filemap_read(struct kiocb *iocb, struct iov_iter *iter,
> > } while (iov_iter_count(iter) && iocb->ki_pos < isize && !error);
> >
> > file_accessed(filp);
> > - ra->prev_pos = last_pos;
> > + WRITE_ONCE(ra->prev_pos, last_pos);
> > return already_read ? already_read : error;
> > }
> > EXPORT_SYMBOL_GPL(filemap_read);
> > @@ -3122,7 +3122,7 @@ ssize_t filemap_splice_read(struct file *in, loff_t *ppos,
> > len -= n;
> > total_spliced += n;
> > *ppos += n;
> > - in->f_ra.prev_pos = *ppos;
> > + WRITE_ONCE(in->f_ra.prev_pos, *ppos);
> > if (pipe_is_full(pipe))
> > goto out;
> > }
> > diff --git a/mm/readahead.c b/mm/readahead.c
> > index 7b05082c89ea..de49b35b0329 100644
> > --- a/mm/readahead.c
> > +++ b/mm/readahead.c
> > @@ -142,7 +142,7 @@ void
> > file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
> > {
> > ra->ra_pages = inode_to_bdi(mapping->host)->ra_pages;
> > - ra->prev_pos = -1;
> > + WRITE_ONCE(ra->prev_pos, -1);
> > }
> > EXPORT_SYMBOL_GPL(file_ra_state_init);
> >
> > @@ -584,7 +584,7 @@ void page_cache_sync_ra(struct readahead_control *ractl,
> > }
> >
> > max_pages = ractl_max_pages(ractl, req_count);
> > - prev_index = (unsigned long long)ra->prev_pos >> PAGE_SHIFT;
> > + prev_index = (unsigned long long)READ_ONCE(ra->prev_pos) >> PAGE_SHIFT;
> > /*
> > * A start of file, oversized read, or sequential cache miss:
> > * trivial case: (index - prev_index) == 1
> > diff --git a/mm/shmem.c b/mm/shmem.c
> > index 5e7dcf5bc5d3..03569199baf4 100644
> > --- a/mm/shmem.c
> > +++ b/mm/shmem.c
> > @@ -3642,7 +3642,7 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos,
> > len -= n;
> > total_spliced += n;
> > *ppos += n;
> > - in->f_ra.prev_pos = *ppos;
> > + WRITE_ONCE(in->f_ra.prev_pos, *ppos);
> > if (pipe_is_full(pipe))
> > break;
> >
> > --
> > 2.43.0
> >
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
>
^ permalink raw reply
* Re: [PATCH v17 0/3] Improve proc RSS accuracy
From: Mathieu Desnoyers @ 2026-02-26 15:00 UTC (permalink / raw)
To: Heiko Carstens
Cc: Andrew Morton, linux-kernel, Paul E. McKenney, Steven Rostedt,
Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter,
Martin Liu, David Rientjes, christian.koenig, Shakeel Butt,
SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy,
Lorenzo Stoakes, Liam R . Howlett, Mike Rapoport,
Suren Baghdasaryan, Vlastimil Babka, Christian Brauner, Wei Yang,
David Hildenbrand, Miaohe Lin, Al Viro, linux-mm,
linux-trace-kernel, Yu Zhao, Roman Gushchin, Mateusz Guzik,
Matthew Wilcox, Baolin Wang, Aboorva Devarajan, Vasily Gorbik,
linux-s390
In-Reply-To: <20260226120422.8101Cc2-hca@linux.ibm.com>
On 2026-02-26 07:04, Heiko Carstens wrote:
> On Tue, Feb 17, 2026 at 11:10:03AM -0500, Mathieu Desnoyers wrote:
>> This series introduces the hierarchical tree counter (hpcc) to increase
>> accuracy of approximated RSS counters exposed through proc interfaces.
>>
>> With a test program hopping across CPUs doing frequent mmap/munmap
>> operations, the upstream implementation approximation reaches a 1GB
>> delta from the precise value after a few minutes, compared to a 80MB
>> delta with the hierarchical counter. The hierarchical counter provides a
>> guaranteed maximum approximation inaccuracy of 192MB on that hardware
>> topology.
>>
>> This series is based on
>> commit 0f2acd3148e0 Merge tag 'm68knommu-for-v7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
>>
>> The main changes since v16:
>> - Dropped OOM killer 2-pass task selection algorithm.
>> - Introduce Kunit tests.
>> - Only perform atomic increments of intermediate tree nodes when
>> bits which are significant for carry propagation are being changed.
>
> This seems to cause crashes with linux-next on s390, at least I could bisect
> it to the last patch of this series. Reverting the last one, makes the crashes
> go away:
>
> 0acac6604c1cfd7a1762901f0a4abe87cf3a8619 is the first bad commit
> commit 0acac6604c1cfd7a1762901f0a4abe87cf3a8619 (HEAD)
> Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> AuthorDate: Tue Feb 17 11:10:06 2026 -0500
> Commit: Andrew Morton <akpm@linux-foundation.org>
> CommitDate: Tue Feb 24 11:15:15 2026 -0800
>
> mm: improve RSS counter approximation accuracy for proc interfaces
>
> Unable to handle kernel pointer dereference in virtual kernel address space
> Failing address: 766d615f72615000 TEID: 766d615f72615803 ESOP-2 FSI
> Fault in home space mode while using kernel ASCE.
> AS:000000025dc04007 R3:0000000000000024
> Oops: 0038 ilc:2 [#1]SMP
> Modules linked in:
> CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 7.0.0-20260224.rc1.git266.3ef088b0c577.300.fc43.s390x+next #1 PREEMPTLAZY
> Hardware name: IBM 3931 A01 703 (z/VM 7.4.0)
> Krnl PSW : 0704c00180000000 00000216ef164cde (kernfs_name_hash+0x1e/0xb0)
> R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
> Krnl GPRS: 0000000000000000 0000000000000000 766d615f72615f65 0000000000000000
> 766d615f72615f65 0000000000000000 0000000000000000 0000000000000000
> 766d615f72615f65 0000000081212440 0000000000000000 0000000000000000
> 0000000080a00000 00000216efcb5390 00000216ef16530c 00000196eeb07ae0
> Krnl Code: 00000216ef164cd2: a7190000 lghi %r1,0
> 00000216ef164cd6: b9040042 lgr %r4,%r2
> *00000216ef164cda: a7090000 lghi %r0,0
> >00000216ef164cde: b25e0014 srst %r1,%r4
> 00000216ef164ce2: a714fffe brc 1,00000216ef164cde
> 00000216ef164ce6: b9e92051 sgrk %r5,%r1,%r2
> 00000216ef164cea: ec1200208076 crj %r1,%r2,8,00000216ef164d2a
> 00000216ef164cf0: b9160005 llgfr %r0,%r5
> Call Trace:
> [<00000216ef164cde>] kernfs_name_hash+0x1e/0xb0
> [<00000216ef167d32>] kernfs_remove_by_name_ns+0x72/0x120
> [<00000216ef16bbfa>] remove_files+0x4a/0x90
> [<00000216ef16bf96>] create_files+0x276/0x2b0
> [<00000216ef16c15a>] internal_create_group+0x18a/0x320
> [<00000216f09b61c6>] swap_init+0x5e/0xa0
> [<00000216eec7fb00>] do_one_initcall+0x40/0x270
> [<00000216f0990a40>] kernel_init_freeable+0x2b0/0x330
> [<00000216efb5160e>] kernel_init+0x2e/0x180
> [<00000216eec81ffc>] __ret_from_fork+0x3c/0x240
> [<00000216efb5e052>] ret_from_fork+0xa/0x30
> Last Breaking-Event-Address:
> [<00000216ef165306>] kernfs_find_ns+0x76/0x140
> Kernel panic - not syncing: Fatal exception: panic_on_oops
It looks like either an issue with ordering of the bootup sequence, or
an issue with the size of struct mm_struct init_mm. I'll have a look.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
^ permalink raw reply
* Re: [PATCH v2 1/4] mm: introduce zone lock wrappers
From: Dmitry Ilvokhin @ 2026-02-26 15:20 UTC (permalink / raw)
To: Andrew Morton
Cc: David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers,
Brendan Jackman, Johannes Weiner, Zi Yan, Oscar Salvador,
Qi Zheng, Shakeel Butt, Axel Rasmussen, Yuanchu Xie, Wei Xu,
linux-kernel, linux-mm, linux-trace-kernel, linux-cxl,
kernel-team, Benjamin Cheatham
In-Reply-To: <20260225121421.2eb75a94578af35780978851@linux-foundation.org>
On Wed, Feb 25, 2026 at 12:14:21PM -0800, Andrew Morton wrote:
> On Wed, 25 Feb 2026 14:43:03 +0000 Dmitry Ilvokhin <d@ilvokhin.com> wrote:
>
> > Add thin wrappers around zone lock acquire/release operations. This
> > prepares the code for future tracepoint instrumentation without
> > modifying individual call sites.
> >
> > Centralizing zone lock operations behind wrappers allows future
> > instrumentation or debugging hooks to be added without touching
> > all users.
> >
> > No functional change intended. The wrappers are introduced in
> > preparation for subsequent patches and are not yet used.
> >
> > ...
> >
> > +static inline void zone_lock_init(struct zone *zone)
> > +{
> > + spin_lock_init(&zone->lock);
> > +}
>
> Please consider renaming zone.lock to something else (_lock would be
> conventional) so that any present and future and out-of-tree
> unconverted code won't compile.
>
Thanks for suggestion, Andrew! Makes total sense to me, I'll rename lock
to _lock in v3.
^ permalink raw reply
* Re: [PATCH v6 14/16] sched_ext: Export task_is_scx_enabled() for verification
From: Tejun Heo @ 2026-02-26 15:22 UTC (permalink / raw)
To: Gabriele Monaco
Cc: linux-kernel, Andrea Righi, Joel Fernandes, Steven Rostedt,
Nam Cao, Juri Lelli, Ingo Molnar, Peter Zijlstra, sched-ext,
Tomas Glozar, Clark Williams, John Kacur, linux-trace-kernel
In-Reply-To: <8fbc3ced19fb0c2a2171708073fa51ae308755b5.camel@redhat.com>
Hello,
On Thu, Feb 26, 2026 at 08:10:52AM +0100, Gabriele Monaco wrote:
> On Wed, 2026-02-25 at 07:08 -1000, Tejun Heo wrote:
> > On Wed, Feb 25, 2026 at 10:51:20AM +0100, Gabriele Monaco wrote:
> > > When a sched_ext scheduler is loaded, depending on the configuration, it
> > > can handle also fair tasks, however it isn't trivial to understand if a
> > > certain task is currently handled by fair or ext outside of scheduler
> > > code. This can be a problem when writing verification or observability
> > > tools like RV monitors.
> > >
> > > Export a task_is_scx_enabled() to allow quick classification by using
> > > the scx state SCX_TASK_ENABLED.
> >
> > This test already exists - task_on_scx(). Please feel free to move that out
> > to include/linux/sched/ext.h.
>
> Mmh, right, thanks for the pointer!
>
> I see task_on_scx() is used in what looks like some sched core hot paths (
> pick_next_task() -> prio_less()), but I presume not inlining it isn't a big
> issue.
I mean, you can always export what task_on_scx() accesses.
Thanks.
--
tejun
^ permalink raw reply
* Re: [PATCH v17 0/3] Improve proc RSS accuracy
From: Mathieu Desnoyers @ 2026-02-26 15:42 UTC (permalink / raw)
To: Heiko Carstens
Cc: Andrew Morton, linux-kernel, Paul E. McKenney, Steven Rostedt,
Masami Hiramatsu, Dennis Zhou, Tejun Heo, Christoph Lameter,
Martin Liu, David Rientjes, christian.koenig, Shakeel Butt,
SeongJae Park, Michal Hocko, Johannes Weiner, Sweet Tea Dorminy,
Lorenzo Stoakes, Liam R . Howlett, Mike Rapoport,
Suren Baghdasaryan, Vlastimil Babka, Christian Brauner, Wei Yang,
David Hildenbrand, Miaohe Lin, Al Viro, linux-mm,
linux-trace-kernel, Yu Zhao, Roman Gushchin, Mateusz Guzik,
Matthew Wilcox, Baolin Wang, Aboorva Devarajan, Vasily Gorbik,
linux-s390
In-Reply-To: <59b28cb4-4fff-4888-b562-7b7236e29d27@efficios.com>
On 2026-02-26 10:00, Mathieu Desnoyers wrote:
> On 2026-02-26 07:04, Heiko Carstens wrote:
>> On Tue, Feb 17, 2026 at 11:10:03AM -0500, Mathieu Desnoyers wrote:
>>> This series introduces the hierarchical tree counter (hpcc) to increase
>>> accuracy of approximated RSS counters exposed through proc interfaces.
>>>
>>> With a test program hopping across CPUs doing frequent mmap/munmap
>>> operations, the upstream implementation approximation reaches a 1GB
>>> delta from the precise value after a few minutes, compared to a 80MB
>>> delta with the hierarchical counter. The hierarchical counter provides a
>>> guaranteed maximum approximation inaccuracy of 192MB on that hardware
>>> topology.
>>>
>>> This series is based on
>>> commit 0f2acd3148e0 Merge tag 'm68knommu-for-v7.0' of git://
>>> git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
>>>
>>> The main changes since v16:
>>> - Dropped OOM killer 2-pass task selection algorithm.
>>> - Introduce Kunit tests.
>>> - Only perform atomic increments of intermediate tree nodes when
>>> bits which are significant for carry propagation are being changed.
>>
>> This seems to cause crashes with linux-next on s390, at least I could
>> bisect
>> it to the last patch of this series. Reverting the last one, makes the
>> crashes
>> go away:
>>
>> 0acac6604c1cfd7a1762901f0a4abe87cf3a8619 is the first bad commit
>> commit 0acac6604c1cfd7a1762901f0a4abe87cf3a8619 (HEAD)
>> Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> AuthorDate: Tue Feb 17 11:10:06 2026 -0500
>> Commit: Andrew Morton <akpm@linux-foundation.org>
>> CommitDate: Tue Feb 24 11:15:15 2026 -0800
>>
>> mm: improve RSS counter approximation accuracy for proc interfaces
>>
>> Unable to handle kernel pointer dereference in virtual kernel address
>> space
>> Failing address: 766d615f72615000 TEID: 766d615f72615803 ESOP-2 FSI
>> Fault in home space mode while using kernel ASCE.
>> AS:000000025dc04007 R3:0000000000000024
>> Oops: 0038 ilc:2 [#1]SMP
>> Modules linked in:
>> CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted
>> 7.0.0-20260224.rc1.git266.3ef088b0c577.300.fc43.s390x+next #1 PREEMPTLAZY
>> Hardware name: IBM 3931 A01 703 (z/VM 7.4.0)
>> Krnl PSW : 0704c00180000000 00000216ef164cde (kernfs_name_hash+0x1e/0xb0)
>> R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
>> Krnl GPRS: 0000000000000000 0000000000000000 766d615f72615f65
>> 0000000000000000
>> 766d615f72615f65 0000000000000000 0000000000000000
>> 0000000000000000
>> 766d615f72615f65 0000000081212440 0000000000000000
>> 0000000000000000
>> 0000000080a00000 00000216efcb5390 00000216ef16530c
>> 00000196eeb07ae0
>> Krnl Code: 00000216ef164cd2: a7190000 lghi %r1,0
>> 00000216ef164cd6: b9040042 lgr %r4,%r2
>> *00000216ef164cda: a7090000 lghi %r0,0
>> >00000216ef164cde: b25e0014 srst %r1,%r4
>> 00000216ef164ce2: a714fffe brc
>> 1,00000216ef164cde
>> 00000216ef164ce6: b9e92051 sgrk %r5,%r1,%r2
>> 00000216ef164cea: ec1200208076 crj %r1,
>> %r2,8,00000216ef164d2a
>> 00000216ef164cf0: b9160005 llgfr %r0,%r5
>> Call Trace:
>> [<00000216ef164cde>] kernfs_name_hash+0x1e/0xb0
>> [<00000216ef167d32>] kernfs_remove_by_name_ns+0x72/0x120
>> [<00000216ef16bbfa>] remove_files+0x4a/0x90
>> [<00000216ef16bf96>] create_files+0x276/0x2b0
>> [<00000216ef16c15a>] internal_create_group+0x18a/0x320
>> [<00000216f09b61c6>] swap_init+0x5e/0xa0
>> [<00000216eec7fb00>] do_one_initcall+0x40/0x270
>> [<00000216f0990a40>] kernel_init_freeable+0x2b0/0x330
>> [<00000216efb5160e>] kernel_init+0x2e/0x180
>> [<00000216eec81ffc>] __ret_from_fork+0x3c/0x240
>> [<00000216efb5e052>] ret_from_fork+0xa/0x30
>> Last Breaking-Event-Address:
>> [<00000216ef165306>] kernfs_find_ns+0x76/0x140
>> Kernel panic - not syncing: Fatal exception: panic_on_oops
>
> It looks like either an issue with ordering of the bootup sequence, or
> an issue with the size of struct mm_struct init_mm. I'll have a look.
I've successfully booted a linux-next 7.0.0-rc1-next-20260226 within a
x86-64 vm, with a swap partition.
I wonder if s390x somehow alters the value of nr_cpus_ids late in
bootup, after percpu_counter_tree_subsystem_init() ?
Can you share your .config and kernel command line arguments ?
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
^ permalink raw reply
* Re: [PATCH v6 14/16] sched_ext: Export task_is_scx_enabled() for verification
From: Gabriele Monaco @ 2026-02-26 15:42 UTC (permalink / raw)
To: Tejun Heo
Cc: linux-kernel, Andrea Righi, Joel Fernandes, Steven Rostedt,
Nam Cao, Juri Lelli, Ingo Molnar, Peter Zijlstra, sched-ext,
Tomas Glozar, Clark Williams, John Kacur, linux-trace-kernel
In-Reply-To: <aaBlJT9Mac9KQpKL@slm.duckdns.org>
Hello,
On Thu, 2026-02-26 at 05:22 -1000, Tejun Heo wrote:
> Hello,
>
> On Thu, Feb 26, 2026 at 08:10:52AM +0100, Gabriele Monaco wrote:
> > On Wed, 2026-02-25 at 07:08 -1000, Tejun Heo wrote:
> > > On Wed, Feb 25, 2026 at 10:51:20AM +0100, Gabriele Monaco wrote:
> > > > Export a task_is_scx_enabled() to allow quick classification by using
> > > > the scx state SCX_TASK_ENABLED.
> > >
> > > This test already exists - task_on_scx(). Please feel free to move that
> > > out to include/linux/sched/ext.h.
> >
> > I see task_on_scx() is used in what looks like some sched core hot paths (
> > pick_next_task() -> prio_less()), but I presume not inlining it isn't a big
> > issue.
>
> I mean, you can always export what task_on_scx() accesses.
I'm not sure what the cleanest thing is here
task_on_scx() is
scx_enabled() && p->sched_class == &ext_sched_class
scx_enabled() might as well be exported (together with its static key), but I'm
not sure exporting the sched_class is the right thing, since all those scheduler
things are quite private.
On the other hand, task_is_scx_enabled() (added in this patch) is
scx_get_task_state(p) == SCX_TASK_ENABLED
and scx_get_task_state() is
(p->scx.flags & SCX_TASK_STATE_MASK) >> SCX_TASK_STATE_SHIFT
those are pretty much already exported.
If those are really equivalent, wouldn't it be simpler to export
scx_get_task_state() and use that in an exported (still inlined) version of
task_on_scx() ?
If you think exporting a sched_class is just fine I'd follow on with your
suggestion without bothering, though.
Thanks,
Gabriele
^ permalink raw reply
* Re: [PATCH v6 14/16] sched_ext: Export task_is_scx_enabled() for verification
From: Tejun Heo @ 2026-02-26 15:48 UTC (permalink / raw)
To: Gabriele Monaco
Cc: linux-kernel, Andrea Righi, Joel Fernandes, Steven Rostedt,
Nam Cao, Juri Lelli, Ingo Molnar, Peter Zijlstra, sched-ext,
Tomas Glozar, Clark Williams, John Kacur, linux-trace-kernel
In-Reply-To: <f49a6db6f0070350cb2d2b023b5733a3646996f2.camel@redhat.com>
On Thu, Feb 26, 2026 at 04:42:34PM +0100, Gabriele Monaco wrote:
> scx_enabled() might as well be exported (together with its static key), but I'm
> not sure exporting the sched_class is the right thing, since all those scheduler
> things are quite private.
Don't you just need the sched_class pointer? Can't you get that from
kallsyms?
Thanks.
--
tejun
^ permalink raw reply
* Re: [PATCH mm-unstable v15 12/13] mm/khugepaged: run khugepaged for all orders
From: Usama Arif @ 2026-02-26 15:53 UTC (permalink / raw)
To: Nico Pache
Cc: Usama Arif, linux-doc, linux-kernel, linux-mm, linux-trace-kernel,
akpm, anshuman.khandual, apopple, baohua, baolin.wang, byungchul,
catalin.marinas, cl, corbet, dave.hansen, david, dev.jain, gourry,
hannes, hughd, jack, jackmanb, jannh, jglisse, joshua.hahnjy, kas,
lance.yang, Liam.Howlett, lorenzo.stoakes, mathieu.desnoyers,
matthew.brost, mhiramat, mhocko, peterx, pfalcato, rakie.kim,
raquini, rdunlap, richard.weiyang, rientjes, rostedt, rppt,
ryan.roberts, shivankg, sunnanyong, surenb, thomas.hellstrom,
tiwai, usamaarif642, vbabka, vishal.moola, wangkefeng.wang, will,
willy, yang, ying.huang, ziy, zokeefe
In-Reply-To: <20260226032650.234386-1-npache@redhat.com>
On Wed, 25 Feb 2026 20:26:50 -0700 Nico Pache <npache@redhat.com> wrote:
> From: Baolin Wang <baolin.wang@linux.alibaba.com>
>
> If any order (m)THP is enabled we should allow running khugepaged to
> attempt scanning and collapsing mTHPs. In order for khugepaged to operate
> when only mTHP sizes are specified in sysfs, we must modify the predicate
> function that determines whether it ought to run to do so.
>
> This function is currently called hugepage_pmd_enabled(), this patch
> renames it to hugepage_enabled() and updates the logic to check to
> determine whether any valid orders may exist which would justify
> khugepaged running.
>
> We must also update collapse_allowable_orders() to check all orders if
> the vma is anonymous and the collapse is khugepaged.
>
> After this patch khugepaged mTHP collapse is fully enabled.
>
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> Signed-off-by: Nico Pache <npache@redhat.com>
> ---
> mm/khugepaged.c | 30 ++++++++++++++++++------------
> 1 file changed, 18 insertions(+), 12 deletions(-)
>
Acked-by: Usama Arif <usama.arif@linux.dev>
^ permalink raw reply
* [PATCH 00/61] vfs: change inode->i_ino from unsigned long to u64
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
Christian said [1] to "just do it" when I proposed this, so here we are!
For historical reasons, the inode->i_ino field is an unsigned long,
which means that it's 32 bits on 32 bit architectures. This has caused a
number of filesystems to implement hacks to hash a 64-bit identifier
into a 32-bit field, and deprives us of a universal identifier field for
an inode.
This patchset changes the inode->i_ino field from an unsigned long to a
u64. This shouldn't make any material difference on 64-bit hosts, but
32-bit hosts will see struct inode grow by at least 4 bytes. This could
have effects on slabcache sizes and field alignment.
The bulk of the changes are to format strings and tracepoints, since the
kernel itself doesn't care that much about the i_ino field. The first
patch changes some vfs function arguments, so check that one out
carefully.
With this change, we may be able to shrink some inode structures. For
instance, struct nfs_inode has a fileid field that holds the 64-bit
inode number. With this set of changes, that field could be eliminated.
I'd rather leave that sort of cleanups for later just to keep this
simple.
Much of this set was generated by LLM, but I attributed it to myself
since I consider this to be in the "menial tasks" category of LLM usage.
[1]: https://lore.kernel.org/linux-fsdevel/20260219-portrait-winkt-959070cee42f@brauner/
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (61):
vfs: widen inode hash/lookup functions to u64
vfs: change i_ino from unsigned long to u64
trace: update VFS-layer trace events for u64 i_ino
ext4: update for u64 i_ino
jbd2: update format strings for u64 i_ino
f2fs: update for u64 i_ino
lockd: update format strings for u64 i_ino
nfs: update for u64 i_ino
nfs: remove nfs_fattr_to_ino_t() and nfs_fileid_to_ino_t()
nfs: remove nfs_compat_user_ino64()
nfs: remove enable_ino64 module parameter
nfsd: update format strings for u64 i_ino
smb: store full 64-bit uniqueid in i_ino
smb: remove cifs_uniqueid_to_ino_t()
locks: update /proc/locks format for u64 i_ino
proc: update /proc/PID/maps for u64 i_ino
nilfs2: update for u64 i_ino
9p: update format strings for u64 i_ino
affs: update format strings for u64 i_ino
afs: update format strings for u64 i_ino
autofs: update format strings for u64 i_ino
befs: update format strings for u64 i_ino
bfs: update format strings for u64 i_ino
cachefiles: update format strings for u64 i_ino
ceph: update format strings for u64 i_ino
coda: update format strings for u64 i_ino
cramfs: update format strings for u64 i_ino
ecryptfs: update format strings for u64 i_ino
efs: update format strings for u64 i_ino
exportfs: update format strings for u64 i_ino
ext2: update format strings for u64 i_ino
freevxfs: update format strings for u64 i_ino
hfs: update format strings for u64 i_ino
hfsplus: update format strings for u64 i_ino
hpfs: update format strings for u64 i_ino
isofs: update format strings for u64 i_ino
jffs2: update format strings for u64 i_ino
jfs: update format strings for u64 i_ino
minix: update format strings for u64 i_ino
nsfs: update format strings for u64 i_ino
ntfs3: update format strings for u64 i_ino
ocfs2: update format strings for u64 i_ino
orangefs: update format strings for u64 i_ino
overlayfs: update format strings for u64 i_ino
qnx4: update format strings for u64 i_ino
qnx6: update format strings for u64 i_ino
ubifs: update format strings for u64 i_ino
udf: update format strings for u64 i_ino
ufs: update format strings for u64 i_ino
zonefs: update format strings for u64 i_ino
security: update audit format strings for u64 i_ino
drm/amdgpu: update for u64 i_ino
fsnotify: update fdinfo format strings for u64 i_ino
net: update socket dname format for u64 i_ino
uprobes: update format strings for u64 i_ino
dma-buf: update format string for u64 i_ino
fscrypt: update format strings for u64 i_ino
fsverity: update format string for u64 i_ino
iomap: update format string for u64 i_ino
net: update legacy protocol format strings for u64 i_ino
vfs: update core format strings for u64 i_ino
drivers/dma-buf/dma-buf.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +-
fs/9p/vfs_addr.c | 4 +-
fs/9p/vfs_inode.c | 6 +-
fs/9p/vfs_inode_dotl.c | 6 +-
fs/affs/amigaffs.c | 8 +-
fs/affs/bitmap.c | 2 +-
fs/affs/dir.c | 2 +-
fs/affs/file.c | 20 +-
fs/affs/inode.c | 12 +-
fs/affs/namei.c | 14 +-
fs/affs/symlink.c | 2 +-
fs/afs/dir.c | 10 +-
fs/afs/dir_search.c | 2 +-
fs/afs/dynroot.c | 2 +-
fs/afs/inode.c | 2 +-
fs/autofs/inode.c | 2 +-
fs/befs/linuxvfs.c | 28 +-
fs/bfs/dir.c | 4 +-
fs/cachefiles/io.c | 6 +-
fs/cachefiles/namei.c | 12 +-
fs/cachefiles/xattr.c | 2 +-
fs/ceph/crypto.c | 4 +-
fs/coda/dir.c | 2 +-
fs/coda/inode.c | 2 +-
fs/cramfs/inode.c | 2 +-
fs/crypto/crypto.c | 2 +-
fs/crypto/hooks.c | 2 +-
fs/crypto/keysetup.c | 2 +-
fs/dcache.c | 4 +-
fs/ecryptfs/crypto.c | 6 +-
fs/ecryptfs/file.c | 2 +-
fs/efs/inode.c | 6 +-
fs/eventpoll.c | 2 +-
fs/exportfs/expfs.c | 4 +-
fs/ext2/dir.c | 10 +-
fs/ext2/ialloc.c | 9 +-
fs/ext2/inode.c | 2 +-
fs/ext2/xattr.c | 14 +-
fs/ext4/dir.c | 2 +-
fs/ext4/ext4.h | 4 +-
fs/ext4/extents.c | 8 +-
fs/ext4/extents_status.c | 28 +-
fs/ext4/fast_commit.c | 8 +-
fs/ext4/ialloc.c | 10 +-
fs/ext4/indirect.c | 2 +-
fs/ext4/inline.c | 14 +-
fs/ext4/inode.c | 22 +-
fs/ext4/ioctl.c | 4 +-
fs/ext4/mballoc.c | 6 +-
fs/ext4/migrate.c | 2 +-
fs/ext4/move_extent.c | 20 +-
fs/ext4/namei.c | 10 +-
fs/ext4/orphan.c | 16 +-
fs/ext4/page-io.c | 10 +-
fs/ext4/super.c | 22 +-
fs/ext4/xattr.c | 10 +-
fs/f2fs/compress.c | 4 +-
fs/f2fs/dir.c | 2 +-
fs/f2fs/extent_cache.c | 8 +-
fs/f2fs/f2fs.h | 6 +-
fs/f2fs/file.c | 12 +-
fs/f2fs/gc.c | 2 +-
fs/f2fs/inline.c | 4 +-
fs/f2fs/inode.c | 48 ++--
fs/f2fs/namei.c | 8 +-
fs/f2fs/node.c | 12 +-
fs/f2fs/recovery.c | 10 +-
fs/f2fs/xattr.c | 10 +-
fs/freevxfs/vxfs_bmap.c | 4 +-
fs/fserror.c | 2 +-
fs/hfs/catalog.c | 2 +-
fs/hfs/extent.c | 4 +-
fs/hfs/inode.c | 4 +-
fs/hfsplus/attributes.c | 10 +-
fs/hfsplus/catalog.c | 2 +-
fs/hfsplus/dir.c | 6 +-
fs/hfsplus/extents.c | 6 +-
fs/hfsplus/inode.c | 8 +-
fs/hfsplus/super.c | 6 +-
fs/hfsplus/xattr.c | 10 +-
fs/hpfs/dir.c | 4 +-
fs/hpfs/dnode.c | 4 +-
fs/hpfs/ea.c | 4 +-
fs/hpfs/inode.c | 4 +-
fs/inode.c | 46 ++--
fs/iomap/ioend.c | 2 +-
fs/isofs/compress.c | 2 +-
fs/isofs/dir.c | 2 +-
fs/isofs/inode.c | 6 +-
fs/isofs/namei.c | 2 +-
fs/jbd2/journal.c | 4 +-
fs/jbd2/transaction.c | 2 +-
fs/jffs2/dir.c | 4 +-
fs/jffs2/file.c | 4 +-
fs/jffs2/fs.c | 18 +-
fs/jfs/inode.c | 2 +-
fs/jfs/jfs_imap.c | 2 +-
fs/jfs/jfs_metapage.c | 2 +-
fs/lockd/svclock.c | 8 +-
fs/lockd/svcsubs.c | 2 +-
fs/locks.c | 6 +-
fs/minix/inode.c | 10 +-
fs/nfs/dir.c | 22 +-
fs/nfs/file.c | 8 +-
fs/nfs/filelayout/filelayout.c | 8 +-
fs/nfs/flexfilelayout/flexfilelayout.c | 8 +-
fs/nfs/inode.c | 54 +---
fs/nfs/nfs4proc.c | 4 +-
fs/nfs/pnfs.c | 12 +-
fs/nfsd/export.c | 2 +-
fs/nfsd/nfs4state.c | 4 +-
fs/nfsd/nfsfh.c | 4 +-
fs/nfsd/vfs.c | 2 +-
fs/nilfs2/alloc.c | 10 +-
fs/nilfs2/bmap.c | 2 +-
fs/nilfs2/btnode.c | 2 +-
fs/nilfs2/btree.c | 12 +-
fs/nilfs2/dir.c | 12 +-
fs/nilfs2/direct.c | 4 +-
fs/nilfs2/gcinode.c | 2 +-
fs/nilfs2/inode.c | 8 +-
fs/nilfs2/mdt.c | 2 +-
fs/nilfs2/namei.c | 2 +-
fs/nilfs2/segment.c | 2 +-
fs/notify/fdinfo.c | 4 +-
fs/nsfs.c | 4 +-
fs/ntfs3/super.c | 2 +-
fs/ocfs2/alloc.c | 2 +-
fs/ocfs2/aops.c | 4 +-
fs/ocfs2/dir.c | 8 +-
fs/ocfs2/dlmfs/dlmfs.c | 10 +-
fs/ocfs2/extent_map.c | 12 +-
fs/ocfs2/inode.c | 2 +-
fs/ocfs2/quota_local.c | 2 +-
fs/ocfs2/refcounttree.c | 10 +-
fs/ocfs2/xattr.c | 4 +-
fs/orangefs/inode.c | 2 +-
fs/overlayfs/export.c | 2 +-
fs/overlayfs/namei.c | 4 +-
fs/overlayfs/util.c | 2 +-
fs/pipe.c | 2 +-
fs/proc/fd.c | 2 +-
fs/proc/task_mmu.c | 4 +-
fs/qnx4/inode.c | 4 +-
fs/qnx6/inode.c | 2 +-
fs/smb/client/cifsfs.h | 17 --
fs/smb/client/inode.c | 6 +-
fs/smb/client/readdir.c | 2 +-
fs/ubifs/debug.c | 8 +-
fs/ubifs/dir.c | 28 +-
fs/ubifs/file.c | 28 +-
fs/ubifs/journal.c | 6 +-
fs/ubifs/super.c | 16 +-
fs/ubifs/tnc.c | 4 +-
fs/ubifs/xattr.c | 14 +-
fs/udf/directory.c | 18 +-
fs/udf/file.c | 2 +-
fs/udf/inode.c | 12 +-
fs/udf/namei.c | 8 +-
fs/udf/super.c | 2 +-
fs/ufs/balloc.c | 6 +-
fs/ufs/dir.c | 10 +-
fs/ufs/ialloc.c | 6 +-
fs/ufs/inode.c | 18 +-
fs/ufs/ufs_fs.h | 6 +-
fs/ufs/util.c | 2 +-
fs/verity/init.c | 2 +-
fs/zonefs/super.c | 8 +-
include/linux/fs.h | 28 +-
include/linux/nfs_fs.h | 10 -
include/trace/events/cachefiles.h | 18 +-
include/trace/events/ext4.h | 427 +++++++++++++++--------------
include/trace/events/f2fs.h | 172 ++++++------
include/trace/events/filelock.h | 16 +-
include/trace/events/filemap.h | 20 +-
include/trace/events/fs_dax.h | 20 +-
include/trace/events/fsverity.h | 30 +-
include/trace/events/hugetlbfs.h | 28 +-
include/trace/events/netfs.h | 4 +-
include/trace/events/nilfs2.h | 12 +-
include/trace/events/readahead.h | 12 +-
include/trace/events/timestamp.h | 12 +-
include/trace/events/writeback.h | 148 +++++-----
kernel/events/uprobes.c | 4 +-
net/netrom/af_netrom.c | 4 +-
net/rose/af_rose.c | 4 +-
net/socket.c | 2 +-
net/x25/x25_proc.c | 4 +-
security/apparmor/apparmorfs.c | 4 +-
security/integrity/integrity_audit.c | 2 +-
security/ipe/audit.c | 2 +-
security/lsm_audit.c | 10 +-
security/selinux/hooks.c | 4 +-
security/smack/smack_lsm.c | 12 +-
195 files changed, 1101 insertions(+), 1166 deletions(-)
---
base-commit: 2bf35e96cf6c6c3a290b69b777d34be15888e364
change-id: 20260224-iino-u64-b44a3a72543c
Best regards,
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply
* [PATCH 01/61] vfs: widen inode hash/lookup functions to u64
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Change the inode hash/lookup VFS API functions to accept u64 parameters
instead of unsigned long for inode numbers and hash values. This is
preparation for widening i_ino itself to u64, which will allow
filesystems to store full 64-bit inode numbers on 32-bit architectures.
Since unsigned long implicitly widens to u64 on all architectures, this
change is backward-compatible with all existing callers.
Functions updated:
- hash(), find_inode_fast(), find_inode_by_ino_rcu(), test_inode_iunique()
- __insert_inode_hash(), iget_locked(), iget5_locked(), iget5_locked_rcu()
- ilookup(), ilookup5(), ilookup5_nowait()
- find_inode_nowait(), find_inode_rcu()
- inode_insert5(), insert_inode_locked4()
- insert_inode_locked() (local variable)
- dump_mapping() (local variable and format string)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/inode.c | 46 +++++++++++++++++++++++-----------------------
include/linux/fs.h | 26 +++++++++++++-------------
2 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index cc12b68e021b2c97cc88a46ddc736334ecb8edfa..2cabec9043e8176d20aecc5ce7e0f276c114f122 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -672,7 +672,7 @@ static inline void inode_sb_list_del(struct inode *inode)
}
}
-static unsigned long hash(struct super_block *sb, unsigned long hashval)
+static unsigned long hash(struct super_block *sb, u64 hashval)
{
unsigned long tmp;
@@ -685,12 +685,12 @@ static unsigned long hash(struct super_block *sb, unsigned long hashval)
/**
* __insert_inode_hash - hash an inode
* @inode: unhashed inode
- * @hashval: unsigned long value used to locate this object in the
+ * @hashval: u64 value used to locate this object in the
* inode_hashtable.
*
* Add an inode to the inode hash for this superblock.
*/
-void __insert_inode_hash(struct inode *inode, unsigned long hashval)
+void __insert_inode_hash(struct inode *inode, u64 hashval)
{
struct hlist_head *b = inode_hashtable + hash(inode->i_sb, hashval);
@@ -726,7 +726,7 @@ void dump_mapping(const struct address_space *mapping)
struct dentry *dentry_ptr;
struct dentry dentry;
char fname[64] = {};
- unsigned long ino;
+ u64 ino;
/*
* If mapping is an invalid pointer, we don't want to crash
@@ -750,14 +750,14 @@ void dump_mapping(const struct address_space *mapping)
}
if (!dentry_first) {
- pr_warn("aops:%ps ino:%lx\n", a_ops, ino);
+ pr_warn("aops:%ps ino:%llx\n", a_ops, ino);
return;
}
dentry_ptr = container_of(dentry_first, struct dentry, d_u.d_alias);
if (get_kernel_nofault(dentry, dentry_ptr) ||
!dentry.d_parent || !dentry.d_name.name) {
- pr_warn("aops:%ps ino:%lx invalid dentry:%px\n",
+ pr_warn("aops:%ps ino:%llx invalid dentry:%px\n",
a_ops, ino, dentry_ptr);
return;
}
@@ -768,7 +768,7 @@ void dump_mapping(const struct address_space *mapping)
* Even if strncpy_from_kernel_nofault() succeeded,
* the fname could be unreliable
*/
- pr_warn("aops:%ps ino:%lx dentry name(?):\"%s\"\n",
+ pr_warn("aops:%ps ino:%llx dentry name(?):\"%s\"\n",
a_ops, ino, fname);
}
@@ -1087,7 +1087,7 @@ static struct inode *find_inode(struct super_block *sb,
* iget_locked for details.
*/
static struct inode *find_inode_fast(struct super_block *sb,
- struct hlist_head *head, unsigned long ino,
+ struct hlist_head *head, u64 ino,
bool hash_locked, bool *isnew)
{
struct inode *inode = NULL;
@@ -1301,7 +1301,7 @@ EXPORT_SYMBOL(unlock_two_nondirectories);
* Note that both @test and @set are called with the inode_hash_lock held, so
* they can't sleep.
*/
-struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
+struct inode *inode_insert5(struct inode *inode, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
@@ -1378,7 +1378,7 @@ EXPORT_SYMBOL(inode_insert5);
* Note that both @test and @set are called with the inode_hash_lock held, so
* they can't sleep.
*/
-struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
+struct inode *iget5_locked(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
@@ -1408,7 +1408,7 @@ EXPORT_SYMBOL(iget5_locked);
* This is equivalent to iget5_locked, except the @test callback must
* tolerate the inode not being stable, including being mid-teardown.
*/
-struct inode *iget5_locked_rcu(struct super_block *sb, unsigned long hashval,
+struct inode *iget5_locked_rcu(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
@@ -1455,7 +1455,7 @@ EXPORT_SYMBOL_GPL(iget5_locked_rcu);
* hashed, and with the I_NEW flag set. The file system gets to fill it in
* before unlocking it via unlock_new_inode().
*/
-struct inode *iget_locked(struct super_block *sb, unsigned long ino)
+struct inode *iget_locked(struct super_block *sb, u64 ino)
{
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1527,7 +1527,7 @@ EXPORT_SYMBOL(iget_locked);
*
* Returns 1 if the inode number is unique, 0 if it is not.
*/
-static int test_inode_iunique(struct super_block *sb, unsigned long ino)
+static int test_inode_iunique(struct super_block *sb, u64 ino)
{
struct hlist_head *b = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1616,7 +1616,7 @@ EXPORT_SYMBOL(igrab);
*
* Note2: @test is called with the inode_hash_lock held, so can't sleep.
*/
-struct inode *ilookup5_nowait(struct super_block *sb, unsigned long hashval,
+struct inode *ilookup5_nowait(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data, bool *isnew)
{
struct hlist_head *head = inode_hashtable + hash(sb, hashval);
@@ -1647,7 +1647,7 @@ EXPORT_SYMBOL(ilookup5_nowait);
*
* Note: @test is called with the inode_hash_lock held, so can't sleep.
*/
-struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
+struct inode *ilookup5(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data)
{
struct inode *inode;
@@ -1677,7 +1677,7 @@ EXPORT_SYMBOL(ilookup5);
* Search for the inode @ino in the inode cache, and if the inode is in the
* cache, the inode is returned with an incremented reference count.
*/
-struct inode *ilookup(struct super_block *sb, unsigned long ino)
+struct inode *ilookup(struct super_block *sb, u64 ino)
{
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1726,8 +1726,8 @@ EXPORT_SYMBOL(ilookup);
* very carefully implemented.
*/
struct inode *find_inode_nowait(struct super_block *sb,
- unsigned long hashval,
- int (*match)(struct inode *, unsigned long,
+ u64 hashval,
+ int (*match)(struct inode *, u64,
void *),
void *data)
{
@@ -1773,7 +1773,7 @@ EXPORT_SYMBOL(find_inode_nowait);
*
* The caller must hold the RCU read lock.
*/
-struct inode *find_inode_rcu(struct super_block *sb, unsigned long hashval,
+struct inode *find_inode_rcu(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data)
{
struct hlist_head *head = inode_hashtable + hash(sb, hashval);
@@ -1812,7 +1812,7 @@ EXPORT_SYMBOL(find_inode_rcu);
* The caller must hold the RCU read lock.
*/
struct inode *find_inode_by_ino_rcu(struct super_block *sb,
- unsigned long ino)
+ u64 ino)
{
struct hlist_head *head = inode_hashtable + hash(sb, ino);
struct inode *inode;
@@ -1833,7 +1833,7 @@ EXPORT_SYMBOL(find_inode_by_ino_rcu);
int insert_inode_locked(struct inode *inode)
{
struct super_block *sb = inode->i_sb;
- ino_t ino = inode->i_ino;
+ u64 ino = inode->i_ino;
struct hlist_head *head = inode_hashtable + hash(sb, ino);
bool isnew;
@@ -1884,7 +1884,7 @@ int insert_inode_locked(struct inode *inode)
}
EXPORT_SYMBOL(insert_inode_locked);
-int insert_inode_locked4(struct inode *inode, unsigned long hashval,
+int insert_inode_locked4(struct inode *inode, u64 hashval,
int (*test)(struct inode *, void *), void *data)
{
struct inode *old;
@@ -2642,7 +2642,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev)
break;
default:
printk(KERN_DEBUG "init_special_inode: bogus i_mode (%o) for"
- " inode %s:%lu\n", mode, inode->i_sb->s_id,
+ " inode %s:%llu\n", mode, inode->i_sb->s_id,
inode->i_ino);
break;
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8b3dd145b25ec12b00ac1df17a952d9116b88047..dfa1f475b1c480c503ab6f00e891aa9b051607fa 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2935,32 +2935,32 @@ static inline int inode_generic_drop(struct inode *inode)
extern void d_mark_dontcache(struct inode *inode);
extern struct inode *ilookup5_nowait(struct super_block *sb,
- unsigned long hashval, int (*test)(struct inode *, void *),
+ u64 hashval, int (*test)(struct inode *, void *),
void *data, bool *isnew);
-extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval,
+extern struct inode *ilookup5(struct super_block *sb, u64 hashval,
int (*test)(struct inode *, void *), void *data);
-extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
+extern struct inode *ilookup(struct super_block *sb, u64 ino);
-extern struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
+extern struct inode *inode_insert5(struct inode *inode, u64 hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *),
void *data);
-struct inode *iget5_locked(struct super_block *, unsigned long,
+struct inode *iget5_locked(struct super_block *, u64,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *);
-struct inode *iget5_locked_rcu(struct super_block *, unsigned long,
+struct inode *iget5_locked_rcu(struct super_block *, u64,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *);
-extern struct inode * iget_locked(struct super_block *, unsigned long);
+extern struct inode *iget_locked(struct super_block *, u64);
extern struct inode *find_inode_nowait(struct super_block *,
- unsigned long,
+ u64,
int (*match)(struct inode *,
- unsigned long, void *),
+ u64, void *),
void *data);
-extern struct inode *find_inode_rcu(struct super_block *, unsigned long,
+extern struct inode *find_inode_rcu(struct super_block *, u64,
int (*)(struct inode *, void *), void *);
-extern struct inode *find_inode_by_ino_rcu(struct super_block *, unsigned long);
-extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *);
+extern struct inode *find_inode_by_ino_rcu(struct super_block *, u64);
+extern int insert_inode_locked4(struct inode *, u64, int (*test)(struct inode *, void *), void *);
extern int insert_inode_locked(struct inode *);
#ifdef CONFIG_DEBUG_LOCK_ALLOC
extern void lockdep_annotate_inode_mutex_key(struct inode *inode);
@@ -3015,7 +3015,7 @@ int setattr_should_drop_sgid(struct mnt_idmap *idmap,
*/
#define alloc_inode_sb(_sb, _cache, _gfp) kmem_cache_alloc_lru(_cache, &_sb->s_inode_lru, _gfp)
-extern void __insert_inode_hash(struct inode *, unsigned long hashval);
+extern void __insert_inode_hash(struct inode *, u64 hashval);
static inline void insert_inode_hash(struct inode *inode)
{
__insert_inode_hash(inode, inode->i_ino);
--
2.53.0
^ permalink raw reply related
* [PATCH 02/61] vfs: change i_ino from unsigned long to u64
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Change the type of i_ino in struct inode from unsigned long to u64.
On 64-bit architectures, unsigned long is already 64 bits, so this is
effectively a type alias change with no runtime impact. On 32-bit
architectures, this widens i_ino from 32 to 64 bits, allowing
filesystems like NFS, CIFS, XFS, Ceph, and FUSE to store their native
64-bit inode numbers without folding/hashing.
The VFS already handles 64-bit inode numbers in kstat.ino (u64) and
statx.stx_ino (__u64). The existing overflow checks in cp_new_stat(),
cp_old_stat(), and cp_compat_stat() handle narrowing to 32-bit st_ino
with -EOVERFLOW, so userspace ABI is preserved.
struct inode will grow by 4 bytes on 32-bit architectures.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
include/linux/fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index dfa1f475b1c480c503ab6f00e891aa9b051607fa..097443bf12e289c347651e5f3da5b67eb6b53121 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -783,7 +783,7 @@ struct inode {
#endif
/* Stat data, not accessed from path walking */
- unsigned long i_ino;
+ u64 i_ino;
/*
* Filesystems may only read i_nlink directly. They shall use the
* following functions for modification:
--
2.53.0
^ permalink raw reply related
* [PATCH 03/61] trace: update VFS-layer trace events for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update trace event definitions in VFS-layer trace headers to use u64
instead of ino_t/unsigned long for inode number fields, and change
format strings from %lu/%lx to %llu/%llx to match.
This is needed because i_ino is now u64. Changing trace event field
types changes the binary trace format, but the self-describing format
metadata handles this transparently for modern trace-cmd and perf.
Files updated:
- cachefiles.h, filelock.h, filemap.h, fs_dax.h, fsverity.h,
hugetlbfs.h, netfs.h, readahead.h, timestamp.h, writeback.h
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
include/trace/events/cachefiles.h | 18 ++---
include/trace/events/filelock.h | 16 ++---
include/trace/events/filemap.h | 20 +++---
include/trace/events/fs_dax.h | 20 +++---
include/trace/events/fsverity.h | 30 ++++----
include/trace/events/hugetlbfs.h | 28 ++++----
include/trace/events/netfs.h | 4 +-
include/trace/events/readahead.h | 12 ++--
include/trace/events/timestamp.h | 12 ++--
include/trace/events/writeback.h | 148 +++++++++++++++++++-------------------
10 files changed, 154 insertions(+), 154 deletions(-)
diff --git a/include/trace/events/cachefiles.h b/include/trace/events/cachefiles.h
index a743b2a35ea7001447b3e05d41539cb88013bc7f..f967027711ee823f224abc1b8ab03f63da06ae6f 100644
--- a/include/trace/events/cachefiles.h
+++ b/include/trace/events/cachefiles.h
@@ -251,8 +251,8 @@ TRACE_EVENT(cachefiles_lookup,
TP_STRUCT__entry(
__field(unsigned int, obj)
__field(short, error)
- __field(unsigned long, dino)
- __field(unsigned long, ino)
+ __field(u64, dino)
+ __field(u64, ino)
),
TP_fast_assign(
@@ -263,7 +263,7 @@ TRACE_EVENT(cachefiles_lookup,
__entry->error = IS_ERR(de) ? PTR_ERR(de) : 0;
),
- TP_printk("o=%08x dB=%lx B=%lx e=%d",
+ TP_printk("o=%08x dB=%llx B=%llx e=%d",
__entry->obj, __entry->dino, __entry->ino, __entry->error)
);
@@ -579,7 +579,7 @@ TRACE_EVENT(cachefiles_mark_active,
/* Note that obj may be NULL */
TP_STRUCT__entry(
__field(unsigned int, obj)
- __field(ino_t, inode)
+ __field(u64, inode)
),
TP_fast_assign(
@@ -587,7 +587,7 @@ TRACE_EVENT(cachefiles_mark_active,
__entry->inode = inode->i_ino;
),
- TP_printk("o=%08x B=%lx",
+ TP_printk("o=%08x B=%llx",
__entry->obj, __entry->inode)
);
@@ -600,7 +600,7 @@ TRACE_EVENT(cachefiles_mark_failed,
/* Note that obj may be NULL */
TP_STRUCT__entry(
__field(unsigned int, obj)
- __field(ino_t, inode)
+ __field(u64, inode)
),
TP_fast_assign(
@@ -608,7 +608,7 @@ TRACE_EVENT(cachefiles_mark_failed,
__entry->inode = inode->i_ino;
),
- TP_printk("o=%08x B=%lx",
+ TP_printk("o=%08x B=%llx",
__entry->obj, __entry->inode)
);
@@ -621,7 +621,7 @@ TRACE_EVENT(cachefiles_mark_inactive,
/* Note that obj may be NULL */
TP_STRUCT__entry(
__field(unsigned int, obj)
- __field(ino_t, inode)
+ __field(u64, inode)
),
TP_fast_assign(
@@ -629,7 +629,7 @@ TRACE_EVENT(cachefiles_mark_inactive,
__entry->inode = inode->i_ino;
),
- TP_printk("o=%08x B=%lx",
+ TP_printk("o=%08x B=%llx",
__entry->obj, __entry->inode)
);
diff --git a/include/trace/events/filelock.h b/include/trace/events/filelock.h
index 370016c38a5bbc07d5ba6c102030b49c9eb6424d..41bc752616b25d6cd7955203e2c604029d0b440c 100644
--- a/include/trace/events/filelock.h
+++ b/include/trace/events/filelock.h
@@ -42,7 +42,7 @@ TRACE_EVENT(locks_get_lock_context,
TP_ARGS(inode, type, ctx),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned char, type)
__field(struct file_lock_context *, ctx)
@@ -55,7 +55,7 @@ TRACE_EVENT(locks_get_lock_context,
__entry->ctx = ctx;
),
- TP_printk("dev=0x%x:0x%x ino=0x%lx type=%s ctx=%p",
+ TP_printk("dev=0x%x:0x%x ino=0x%llx type=%s ctx=%p",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, show_fl_type(__entry->type), __entry->ctx)
);
@@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(filelock_lock,
TP_STRUCT__entry(
__field(struct file_lock *, fl)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(struct file_lock_core *, blocker)
__field(fl_owner_t, owner)
@@ -93,7 +93,7 @@ DECLARE_EVENT_CLASS(filelock_lock,
__entry->ret = ret;
),
- TP_printk("fl=%p dev=0x%x:0x%x ino=0x%lx fl_blocker=%p fl_owner=%p fl_pid=%u fl_flags=%s fl_type=%s fl_start=%lld fl_end=%lld ret=%d",
+ TP_printk("fl=%p dev=0x%x:0x%x ino=0x%llx fl_blocker=%p fl_owner=%p fl_pid=%u fl_flags=%s fl_type=%s fl_start=%lld fl_end=%lld ret=%d",
__entry->fl, MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->blocker, __entry->owner,
__entry->pid, show_fl_flags(__entry->flags),
@@ -124,7 +124,7 @@ DECLARE_EVENT_CLASS(filelock_lease,
TP_STRUCT__entry(
__field(struct file_lease *, fl)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(struct file_lock_core *, blocker)
__field(fl_owner_t, owner)
@@ -146,7 +146,7 @@ DECLARE_EVENT_CLASS(filelock_lease,
__entry->downgrade_time = fl ? fl->fl_downgrade_time : 0;
),
- TP_printk("fl=%p dev=0x%x:0x%x ino=0x%lx fl_blocker=%p fl_owner=%p fl_flags=%s fl_type=%s fl_break_time=%lu fl_downgrade_time=%lu",
+ TP_printk("fl=%p dev=0x%x:0x%x ino=0x%llx fl_blocker=%p fl_owner=%p fl_flags=%s fl_type=%s fl_break_time=%lu fl_downgrade_time=%lu",
__entry->fl, MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->blocker, __entry->owner,
show_fl_flags(__entry->flags),
@@ -175,7 +175,7 @@ TRACE_EVENT(generic_add_lease,
TP_ARGS(inode, fl),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(int, wcount)
__field(int, rcount)
__field(int, icount)
@@ -196,7 +196,7 @@ TRACE_EVENT(generic_add_lease,
__entry->type = fl->c.flc_type;
),
- TP_printk("dev=0x%x:0x%x ino=0x%lx wcount=%d rcount=%d icount=%d fl_owner=%p fl_flags=%s fl_type=%s",
+ TP_printk("dev=0x%x:0x%x ino=0x%llx wcount=%d rcount=%d icount=%d fl_owner=%p fl_flags=%s fl_type=%s",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->wcount, __entry->rcount,
__entry->icount, __entry->owner,
diff --git a/include/trace/events/filemap.h b/include/trace/events/filemap.h
index f48fe637bfd25885dc6daaf09336ab60626b4944..153491e57cce6df73e30ddee60a52ed7d8923c24 100644
--- a/include/trace/events/filemap.h
+++ b/include/trace/events/filemap.h
@@ -21,7 +21,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
TP_STRUCT__entry(
__field(unsigned long, pfn)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(unsigned long, index)
__field(dev_t, s_dev)
__field(unsigned char, order)
@@ -38,7 +38,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
__entry->order = folio_order(folio);
),
- TP_printk("dev %d:%d ino %lx pfn=0x%lx ofs=%lu order=%u",
+ TP_printk("dev %d:%d ino %llx pfn=0x%lx ofs=%lu order=%u",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino,
__entry->pfn,
@@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache_range,
TP_ARGS(mapping, index, last_index),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned long, index)
__field(unsigned long, last_index)
@@ -85,7 +85,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache_range,
),
TP_printk(
- "dev=%d:%d ino=%lx ofs=%lld-%lld",
+ "dev=%d:%d ino=%llx ofs=%lld-%lld",
MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino,
((loff_t)__entry->index) << PAGE_SHIFT,
@@ -117,7 +117,7 @@ TRACE_EVENT(mm_filemap_fault,
TP_ARGS(mapping, index),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(unsigned long, index)
),
@@ -133,7 +133,7 @@ TRACE_EVENT(mm_filemap_fault,
),
TP_printk(
- "dev=%d:%d ino=%lx ofs=%lld",
+ "dev=%d:%d ino=%llx ofs=%lld",
MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino,
((loff_t)__entry->index) << PAGE_SHIFT
@@ -146,7 +146,7 @@ TRACE_EVENT(filemap_set_wb_err,
TP_ARGS(mapping, eseq),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(errseq_t, errseq)
),
@@ -160,7 +160,7 @@ TRACE_EVENT(filemap_set_wb_err,
__entry->s_dev = mapping->host->i_rdev;
),
- TP_printk("dev=%d:%d ino=0x%lx errseq=0x%x",
+ TP_printk("dev=%d:%d ino=0x%llx errseq=0x%x",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
__entry->i_ino, __entry->errseq)
);
@@ -172,7 +172,7 @@ TRACE_EVENT(file_check_and_advance_wb_err,
TP_STRUCT__entry(
__field(struct file *, file)
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(errseq_t, old)
__field(errseq_t, new)
@@ -191,7 +191,7 @@ TRACE_EVENT(file_check_and_advance_wb_err,
__entry->new = file->f_wb_err;
),
- TP_printk("file=%p dev=%d:%d ino=0x%lx old=0x%x new=0x%x",
+ TP_printk("file=%p dev=%d:%d ino=0x%llx old=0x%x new=0x%x",
__entry->file, MAJOR(__entry->s_dev),
MINOR(__entry->s_dev), __entry->i_ino, __entry->old,
__entry->new)
diff --git a/include/trace/events/fs_dax.h b/include/trace/events/fs_dax.h
index 50ebc1290ab062a9c30ab00049fb96691f9a0f23..11121baa8ece7928c653b4f874fb10ffbdd02fd0 100644
--- a/include/trace/events/fs_dax.h
+++ b/include/trace/events/fs_dax.h
@@ -12,7 +12,7 @@ DECLARE_EVENT_CLASS(dax_pmd_fault_class,
pgoff_t max_pgoff, int result),
TP_ARGS(inode, vmf, max_pgoff, result),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(unsigned long, vm_start)
__field(unsigned long, vm_end)
__field(vm_flags_t, vm_flags)
@@ -35,7 +35,7 @@ DECLARE_EVENT_CLASS(dax_pmd_fault_class,
__entry->max_pgoff = max_pgoff;
__entry->result = result;
),
- TP_printk("dev %d:%d ino %#lx %s %s address %#lx vm_start "
+ TP_printk("dev %d:%d ino %#llx %s %s address %#lx vm_start "
"%#lx vm_end %#lx pgoff %#lx max_pgoff %#lx %s",
MAJOR(__entry->dev),
MINOR(__entry->dev),
@@ -66,7 +66,7 @@ DECLARE_EVENT_CLASS(dax_pmd_load_hole_class,
void *radix_entry),
TP_ARGS(inode, vmf, zero_folio, radix_entry),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(vm_flags_t, vm_flags)
__field(unsigned long, address)
__field(struct folio *, zero_folio)
@@ -81,7 +81,7 @@ DECLARE_EVENT_CLASS(dax_pmd_load_hole_class,
__entry->zero_folio = zero_folio;
__entry->radix_entry = radix_entry;
),
- TP_printk("dev %d:%d ino %#lx %s address %#lx zero_folio %p "
+ TP_printk("dev %d:%d ino %#llx %s address %#lx zero_folio %p "
"radix_entry %#lx",
MAJOR(__entry->dev),
MINOR(__entry->dev),
@@ -106,7 +106,7 @@ DECLARE_EVENT_CLASS(dax_pte_fault_class,
TP_PROTO(struct inode *inode, struct vm_fault *vmf, int result),
TP_ARGS(inode, vmf, result),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(vm_flags_t, vm_flags)
__field(unsigned long, address)
__field(pgoff_t, pgoff)
@@ -123,7 +123,7 @@ DECLARE_EVENT_CLASS(dax_pte_fault_class,
__entry->pgoff = vmf->pgoff;
__entry->result = result;
),
- TP_printk("dev %d:%d ino %#lx %s %s address %#lx pgoff %#lx %s",
+ TP_printk("dev %d:%d ino %#llx %s %s address %#lx pgoff %#lx %s",
MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->ino,
@@ -150,7 +150,7 @@ DECLARE_EVENT_CLASS(dax_writeback_range_class,
TP_PROTO(struct inode *inode, pgoff_t start_index, pgoff_t end_index),
TP_ARGS(inode, start_index, end_index),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(pgoff_t, start_index)
__field(pgoff_t, end_index)
__field(dev_t, dev)
@@ -161,7 +161,7 @@ DECLARE_EVENT_CLASS(dax_writeback_range_class,
__entry->start_index = start_index;
__entry->end_index = end_index;
),
- TP_printk("dev %d:%d ino %#lx pgoff %#lx-%#lx",
+ TP_printk("dev %d:%d ino %#llx pgoff %#lx-%#lx",
MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->ino,
@@ -182,7 +182,7 @@ TRACE_EVENT(dax_writeback_one,
TP_PROTO(struct inode *inode, pgoff_t pgoff, pgoff_t pglen),
TP_ARGS(inode, pgoff, pglen),
TP_STRUCT__entry(
- __field(unsigned long, ino)
+ __field(u64, ino)
__field(pgoff_t, pgoff)
__field(pgoff_t, pglen)
__field(dev_t, dev)
@@ -193,7 +193,7 @@ TRACE_EVENT(dax_writeback_one,
__entry->pgoff = pgoff;
__entry->pglen = pglen;
),
- TP_printk("dev %d:%d ino %#lx pgoff %#lx pglen %#lx",
+ TP_printk("dev %d:%d ino %#llx pgoff %#lx pglen %#lx",
MAJOR(__entry->dev),
MINOR(__entry->dev),
__entry->ino,
diff --git a/include/trace/events/fsverity.h b/include/trace/events/fsverity.h
index a8c52f21cbd5eb010c7e7b2fdb8f9de49c8ea326..4477c17e05748360965c4e1840590efe96d6335e 100644
--- a/include/trace/events/fsverity.h
+++ b/include/trace/events/fsverity.h
@@ -16,7 +16,7 @@ TRACE_EVENT(fsverity_enable,
const struct merkle_tree_params *params),
TP_ARGS(inode, params),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_size)
__field(u64, tree_size)
__field(unsigned int, merkle_block)
@@ -29,8 +29,8 @@ TRACE_EVENT(fsverity_enable,
__entry->merkle_block = params->block_size;
__entry->num_levels = params->num_levels;
),
- TP_printk("ino %lu data_size %llu tree_size %llu merkle_block %u levels %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_size %llu tree_size %llu merkle_block %u levels %u",
+ __entry->ino,
__entry->data_size,
__entry->tree_size,
__entry->merkle_block,
@@ -42,7 +42,7 @@ TRACE_EVENT(fsverity_tree_done,
const struct merkle_tree_params *params),
TP_ARGS(inode, vi, params),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_size)
__field(u64, tree_size)
__field(unsigned int, merkle_block)
@@ -59,8 +59,8 @@ TRACE_EVENT(fsverity_tree_done,
memcpy(__get_dynamic_array(root_hash), vi->root_hash, __get_dynamic_array_len(root_hash));
memcpy(__get_dynamic_array(file_digest), vi->file_digest, __get_dynamic_array_len(file_digest));
),
- TP_printk("ino %lu data_size %llu tree_size %lld merkle_block %u levels %u root_hash %s digest %s",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_size %llu tree_size %lld merkle_block %u levels %u root_hash %s digest %s",
+ __entry->ino,
__entry->data_size,
__entry->tree_size,
__entry->merkle_block,
@@ -75,7 +75,7 @@ TRACE_EVENT(fsverity_verify_data_block,
u64 data_pos),
TP_ARGS(inode, params, data_pos),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_pos)
__field(unsigned int, merkle_block)
),
@@ -84,8 +84,8 @@ TRACE_EVENT(fsverity_verify_data_block,
__entry->data_pos = data_pos;
__entry->merkle_block = params->block_size;
),
- TP_printk("ino %lu data_pos %llu merkle_block %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_pos %llu merkle_block %u",
+ __entry->ino,
__entry->data_pos,
__entry->merkle_block)
);
@@ -96,7 +96,7 @@ TRACE_EVENT(fsverity_merkle_hit,
unsigned int hidx),
TP_ARGS(inode, data_pos, hblock_idx, level, hidx),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u64, data_pos)
__field(unsigned long, hblock_idx)
__field(unsigned int, level)
@@ -109,8 +109,8 @@ TRACE_EVENT(fsverity_merkle_hit,
__entry->level = level;
__entry->hidx = hidx;
),
- TP_printk("ino %lu data_pos %llu hblock_idx %lu level %u hidx %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu data_pos %llu hblock_idx %lu level %u hidx %u",
+ __entry->ino,
__entry->data_pos,
__entry->hblock_idx,
__entry->level,
@@ -122,7 +122,7 @@ TRACE_EVENT(fsverity_verify_merkle_block,
unsigned int level, unsigned int hidx),
TP_ARGS(inode, hblock_idx, level, hidx),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, hblock_idx)
__field(unsigned int, level)
__field(unsigned int, hidx)
@@ -133,8 +133,8 @@ TRACE_EVENT(fsverity_verify_merkle_block,
__entry->level = level;
__entry->hidx = hidx;
),
- TP_printk("ino %lu hblock_idx %lu level %u hidx %u",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu hblock_idx %lu level %u hidx %u",
+ __entry->ino,
__entry->hblock_idx,
__entry->level,
__entry->hidx)
diff --git a/include/trace/events/hugetlbfs.h b/include/trace/events/hugetlbfs.h
index 59605dfaeeb43d9e7657e338fdbe740e8486a286..d4fefa571b829f92729c7e175df9ad5ed701131a 100644
--- a/include/trace/events/hugetlbfs.h
+++ b/include/trace/events/hugetlbfs.h
@@ -15,8 +15,8 @@ TRACE_EVENT(hugetlbfs_alloc_inode,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
- __field(ino_t, dir)
+ __field(u64, ino)
+ __field(u64, dir)
__field(__u16, mode)
),
@@ -27,10 +27,10 @@ TRACE_EVENT(hugetlbfs_alloc_inode,
__entry->mode = mode;
),
- TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
+ TP_printk("dev %d,%d ino %llu dir %llu mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
- (unsigned long) __entry->dir, __entry->mode)
+ __entry->ino,
+ __entry->dir, __entry->mode)
);
DECLARE_EVENT_CLASS(hugetlbfs__inode,
@@ -41,7 +41,7 @@ DECLARE_EVENT_CLASS(hugetlbfs__inode,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(__u16, mode)
__field(loff_t, size)
__field(unsigned int, nlink)
@@ -59,8 +59,8 @@ DECLARE_EVENT_CLASS(hugetlbfs__inode,
__entry->blocks = inode->i_blocks;
),
- TP_printk("dev %d,%d ino %lu mode 0%o size %lld nlink %u seals %u blocks %llu",
- MAJOR(__entry->dev), MINOR(__entry->dev), (unsigned long) __entry->ino,
+ TP_printk("dev %d,%d ino %llu mode 0%o size %lld nlink %u seals %u blocks %llu",
+ MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
__entry->mode, __entry->size, __entry->nlink, __entry->seals,
(unsigned long long)__entry->blocks)
);
@@ -88,7 +88,7 @@ TRACE_EVENT(hugetlbfs_setattr,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, d_len)
__string(d_name, dentry->d_name.name)
__field(unsigned int, ia_valid)
@@ -108,8 +108,8 @@ TRACE_EVENT(hugetlbfs_setattr,
__entry->ia_size = attr->ia_size;
),
- TP_printk("dev %d,%d ino %lu name %.*s valid %#x mode 0%o old_size %lld size %lld",
- MAJOR(__entry->dev), MINOR(__entry->dev), (unsigned long)__entry->ino,
+ TP_printk("dev %d,%d ino %llu name %.*s valid %#x mode 0%o old_size %lld size %lld",
+ MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
__entry->d_len, __get_str(d_name), __entry->ia_valid, __entry->ia_mode,
__entry->old_size, __entry->ia_size)
);
@@ -123,7 +123,7 @@ TRACE_EVENT(hugetlbfs_fallocate,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, mode)
__field(loff_t, offset)
__field(loff_t, len)
@@ -141,9 +141,9 @@ TRACE_EVENT(hugetlbfs_fallocate,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu mode 0%o offset %lld len %lld size %lld ret %d",
+ TP_printk("dev %d,%d ino %llu mode 0%o offset %lld len %lld size %lld ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long)__entry->ino, __entry->mode,
+ __entry->ino, __entry->mode,
(unsigned long long)__entry->offset,
(unsigned long long)__entry->len,
(unsigned long long)__entry->size,
diff --git a/include/trace/events/netfs.h b/include/trace/events/netfs.h
index 64a382fbc31a8421607417f29f71f6ded97223ce..6d701903779017e7a1eeb67ede2833e7134849bb 100644
--- a/include/trace/events/netfs.h
+++ b/include/trace/events/netfs.h
@@ -484,7 +484,7 @@ TRACE_EVENT(netfs_folio,
TP_ARGS(folio, why),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, index)
__field(unsigned int, nr)
__field(enum netfs_folio_trace, why)
@@ -498,7 +498,7 @@ TRACE_EVENT(netfs_folio,
__entry->nr = folio_nr_pages(folio);
),
- TP_printk("i=%05lx ix=%05lx-%05lx %s",
+ TP_printk("i=%05llx ix=%05lx-%05lx %s",
__entry->ino, __entry->index, __entry->index + __entry->nr - 1,
__print_symbolic(__entry->why, netfs_folio_traces))
);
diff --git a/include/trace/events/readahead.h b/include/trace/events/readahead.h
index 0997ac5eceab1ac2de3b84b9d9d59cc338b9dd2b..928b2c67654735cc004d27beeee2066196e60a70 100644
--- a/include/trace/events/readahead.h
+++ b/include/trace/events/readahead.h
@@ -18,7 +18,7 @@ TRACE_EVENT(page_cache_ra_unbounded,
TP_ARGS(inode, index, nr_to_read, lookahead_size),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned long, nr_to_read)
@@ -34,7 +34,7 @@ TRACE_EVENT(page_cache_ra_unbounded,
),
TP_printk(
- "dev=%d:%d ino=%lx index=%lu nr_to_read=%lu lookahead_size=%lu",
+ "dev=%d:%d ino=%llx index=%lu nr_to_read=%lu lookahead_size=%lu",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->nr_to_read, __entry->lookahead_size
)
@@ -46,7 +46,7 @@ TRACE_EVENT(page_cache_ra_order,
TP_ARGS(inode, index, ra),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned int, order)
@@ -66,7 +66,7 @@ TRACE_EVENT(page_cache_ra_order,
),
TP_printk(
- "dev=%d:%d ino=%lx index=%lu order=%u size=%u async_size=%u ra_pages=%u",
+ "dev=%d:%d ino=%llx index=%lu order=%u size=%u async_size=%u ra_pages=%u",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->order, __entry->size,
__entry->async_size, __entry->ra_pages
@@ -80,7 +80,7 @@ DECLARE_EVENT_CLASS(page_cache_ra_op,
TP_ARGS(inode, index, ra, req_count),
TP_STRUCT__entry(
- __field(unsigned long, i_ino)
+ __field(u64, i_ino)
__field(dev_t, s_dev)
__field(pgoff_t, index)
__field(unsigned int, order)
@@ -106,7 +106,7 @@ DECLARE_EVENT_CLASS(page_cache_ra_op,
),
TP_printk(
- "dev=%d:%d ino=%lx index=%lu req_count=%lu order=%u size=%u async_size=%u ra_pages=%u mmap_miss=%u prev_pos=%lld",
+ "dev=%d:%d ino=%llx index=%lu req_count=%lu order=%u size=%u async_size=%u ra_pages=%u mmap_miss=%u prev_pos=%lld",
MAJOR(__entry->s_dev), MINOR(__entry->s_dev), __entry->i_ino,
__entry->index, __entry->req_count, __entry->order,
__entry->size, __entry->async_size, __entry->ra_pages,
diff --git a/include/trace/events/timestamp.h b/include/trace/events/timestamp.h
index c9e5ec930054887a6a7bae8e487611b5ded33d71..315ea8d57796617661768da24591d53095ac7649 100644
--- a/include/trace/events/timestamp.h
+++ b/include/trace/events/timestamp.h
@@ -19,7 +19,7 @@ DECLARE_EVENT_CLASS(ctime,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(time64_t, ctime_s)
__field(u32, ctime_ns)
__field(u32, gen)
@@ -33,7 +33,7 @@ DECLARE_EVENT_CLASS(ctime,
__entry->ctime_ns = ctime->tv_nsec;
),
- TP_printk("ino=%d:%d:%ld:%u ctime=%lld.%u",
+ TP_printk("ino=%d:%d:%llu:%u ctime=%lld.%u",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino, __entry->gen,
__entry->ctime_s, __entry->ctime_ns
)
@@ -59,7 +59,7 @@ TRACE_EVENT(ctime_ns_xchg,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(u32, gen)
__field(u32, old)
__field(u32, new)
@@ -75,7 +75,7 @@ TRACE_EVENT(ctime_ns_xchg,
__entry->cur = cur;
),
- TP_printk("ino=%d:%d:%ld:%u old=%u:%s new=%u cur=%u:%s",
+ TP_printk("ino=%d:%d:%llu:%u old=%u:%s new=%u cur=%u:%s",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino, __entry->gen,
__entry->old & ~I_CTIME_QUERIED,
__print_flags(__entry->old & I_CTIME_QUERIED, "|", CTIME_QUERIED_FLAGS),
@@ -94,7 +94,7 @@ TRACE_EVENT(fill_mg_cmtime,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(time64_t, ctime_s)
__field(time64_t, mtime_s)
__field(u32, ctime_ns)
@@ -112,7 +112,7 @@ TRACE_EVENT(fill_mg_cmtime,
__entry->mtime_ns = mtime->tv_nsec;
),
- TP_printk("ino=%d:%d:%ld:%u ctime=%lld.%u mtime=%lld.%u",
+ TP_printk("ino=%d:%d:%llu:%u ctime=%lld.%u mtime=%lld.%u",
MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino, __entry->gen,
__entry->ctime_s, __entry->ctime_ns,
__entry->mtime_s, __entry->mtime_ns
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 4d3d8c8f3a1bc3e5ef10fc96e3c6dbbd0cf00c98..cc7651749eb3ce1123cb3ea9496f0803a0f4c1a0 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(writeback_folio_template,
TP_STRUCT__entry (
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, index)
),
@@ -79,9 +79,9 @@ DECLARE_EVENT_CLASS(writeback_folio_template,
__entry->index = folio->index;
),
- TP_printk("bdi %s: ino=%lu index=%lu",
+ TP_printk("bdi %s: ino=%llu index=%lu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
__entry->index
)
);
@@ -108,7 +108,7 @@ DECLARE_EVENT_CLASS(writeback_dirty_inode_template,
TP_STRUCT__entry (
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, state)
__field(unsigned long, flags)
),
@@ -123,9 +123,9 @@ DECLARE_EVENT_CLASS(writeback_dirty_inode_template,
__entry->flags = flags;
),
- TP_printk("bdi %s: ino=%lu state=%s flags=%s",
+ TP_printk("bdi %s: ino=%llu state=%s flags=%s",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
show_inode_state(__entry->state),
show_inode_state(__entry->flags)
)
@@ -155,12 +155,12 @@ DEFINE_EVENT(writeback_dirty_inode_template, writeback_dirty_inode,
#ifdef CREATE_TRACE_POINTS
#ifdef CONFIG_CGROUP_WRITEBACK
-static inline ino_t __trace_wb_assign_cgroup(struct bdi_writeback *wb)
+static inline u64 __trace_wb_assign_cgroup(struct bdi_writeback *wb)
{
return cgroup_ino(wb->memcg_css->cgroup);
}
-static inline ino_t __trace_wbc_assign_cgroup(struct writeback_control *wbc)
+static inline u64 __trace_wbc_assign_cgroup(struct writeback_control *wbc)
{
if (wbc->wb)
return __trace_wb_assign_cgroup(wbc->wb);
@@ -169,12 +169,12 @@ static inline ino_t __trace_wbc_assign_cgroup(struct writeback_control *wbc)
}
#else /* CONFIG_CGROUP_WRITEBACK */
-static inline ino_t __trace_wb_assign_cgroup(struct bdi_writeback *wb)
+static inline u64 __trace_wb_assign_cgroup(struct bdi_writeback *wb)
{
return 1;
}
-static inline ino_t __trace_wbc_assign_cgroup(struct writeback_control *wbc)
+static inline u64 __trace_wbc_assign_cgroup(struct writeback_control *wbc)
{
return 1;
}
@@ -192,8 +192,8 @@ TRACE_EVENT(inode_foreign_history,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
- __field(ino_t, cgroup_ino)
+ __field(u64, ino)
+ __field(u64, cgroup_ino)
__field(unsigned int, history)
),
@@ -204,10 +204,10 @@ TRACE_EVENT(inode_foreign_history,
__entry->history = history;
),
- TP_printk("bdi %s: ino=%lu cgroup_ino=%lu history=0x%x",
+ TP_printk("bdi %s: ino=%llu cgroup_ino=%llu history=0x%x",
__entry->name,
- (unsigned long)__entry->ino,
- (unsigned long)__entry->cgroup_ino,
+ (unsigned long long)__entry->ino,
+ (unsigned long long)__entry->cgroup_ino,
__entry->history
)
);
@@ -221,8 +221,8 @@ TRACE_EVENT(inode_switch_wbs_queue,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, old_cgroup_ino)
- __field(ino_t, new_cgroup_ino)
+ __field(u64, old_cgroup_ino)
+ __field(u64, new_cgroup_ino)
__field(unsigned int, count)
),
@@ -233,10 +233,10 @@ TRACE_EVENT(inode_switch_wbs_queue,
__entry->count = count;
),
- TP_printk("bdi %s: old_cgroup_ino=%lu new_cgroup_ino=%lu count=%u",
+ TP_printk("bdi %s: old_cgroup_ino=%llu new_cgroup_ino=%llu count=%u",
__entry->name,
- (unsigned long)__entry->old_cgroup_ino,
- (unsigned long)__entry->new_cgroup_ino,
+ (unsigned long long)__entry->old_cgroup_ino,
+ (unsigned long long)__entry->new_cgroup_ino,
__entry->count
)
);
@@ -250,9 +250,9 @@ TRACE_EVENT(inode_switch_wbs,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
- __field(ino_t, old_cgroup_ino)
- __field(ino_t, new_cgroup_ino)
+ __field(u64, ino)
+ __field(u64, old_cgroup_ino)
+ __field(u64, new_cgroup_ino)
),
TP_fast_assign(
@@ -262,11 +262,11 @@ TRACE_EVENT(inode_switch_wbs,
__entry->new_cgroup_ino = __trace_wb_assign_cgroup(new_wb);
),
- TP_printk("bdi %s: ino=%lu old_cgroup_ino=%lu new_cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu old_cgroup_ino=%llu new_cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
- (unsigned long)__entry->old_cgroup_ino,
- (unsigned long)__entry->new_cgroup_ino
+ (unsigned long long)__entry->ino,
+ (unsigned long long)__entry->old_cgroup_ino,
+ (unsigned long long)__entry->new_cgroup_ino
)
);
@@ -279,10 +279,10 @@ TRACE_EVENT(track_foreign_dirty,
TP_STRUCT__entry(
__array(char, name, 32)
__field(u64, bdi_id)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, memcg_id)
- __field(ino_t, cgroup_ino)
- __field(ino_t, page_cgroup_ino)
+ __field(u64, cgroup_ino)
+ __field(u64, page_cgroup_ino)
),
TP_fast_assign(
@@ -297,13 +297,13 @@ TRACE_EVENT(track_foreign_dirty,
__entry->page_cgroup_ino = cgroup_ino(folio_memcg(folio)->css.cgroup);
),
- TP_printk("bdi %s[%llu]: ino=%lu memcg_id=%u cgroup_ino=%lu page_cgroup_ino=%lu",
+ TP_printk("bdi %s[%llu]: ino=%llu memcg_id=%u cgroup_ino=%llu page_cgroup_ino=%llu",
__entry->name,
__entry->bdi_id,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
__entry->memcg_id,
- (unsigned long)__entry->cgroup_ino,
- (unsigned long)__entry->page_cgroup_ino
+ (unsigned long long)__entry->cgroup_ino,
+ (unsigned long long)__entry->page_cgroup_ino
)
);
@@ -316,7 +316,7 @@ TRACE_EVENT(flush_foreign,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
__field(unsigned int, frn_bdi_id)
__field(unsigned int, frn_memcg_id)
),
@@ -328,9 +328,9 @@ TRACE_EVENT(flush_foreign,
__entry->frn_memcg_id = frn_memcg_id;
),
- TP_printk("bdi %s: cgroup_ino=%lu frn_bdi_id=%u frn_memcg_id=%u",
+ TP_printk("bdi %s: cgroup_ino=%llu frn_bdi_id=%u frn_memcg_id=%u",
__entry->name,
- (unsigned long)__entry->cgroup_ino,
+ (unsigned long long)__entry->cgroup_ino,
__entry->frn_bdi_id,
__entry->frn_memcg_id
)
@@ -345,9 +345,9 @@ DECLARE_EVENT_CLASS(writeback_write_inode_template,
TP_STRUCT__entry (
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, sync_mode)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -358,11 +358,11 @@ DECLARE_EVENT_CLASS(writeback_write_inode_template,
__entry->cgroup_ino = __trace_wbc_assign_cgroup(wbc);
),
- TP_printk("bdi %s: ino=%lu sync_mode=%d cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu sync_mode=%d cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
__entry->sync_mode,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -392,7 +392,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
__field(int, range_cyclic)
__field(int, for_background)
__field(int, reason)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
@@ -406,7 +406,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
),
TP_printk("bdi %s: sb_dev %d:%d nr_pages=%ld sync_mode=%d "
- "kupdate=%d range_cyclic=%d background=%d reason=%s cgroup_ino=%lu",
+ "kupdate=%d range_cyclic=%d background=%d reason=%s cgroup_ino=%llu",
__entry->name,
MAJOR(__entry->sb_dev), MINOR(__entry->sb_dev),
__entry->nr_pages,
@@ -415,7 +415,7 @@ DECLARE_EVENT_CLASS(writeback_work_class,
__entry->range_cyclic,
__entry->for_background,
__print_symbolic(__entry->reason, WB_WORK_REASON),
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
#define DEFINE_WRITEBACK_WORK_EVENT(name) \
@@ -445,15 +445,15 @@ DECLARE_EVENT_CLASS(writeback_class,
TP_ARGS(wb),
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
),
- TP_printk("bdi %s: cgroup_ino=%lu",
+ TP_printk("bdi %s: cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
#define DEFINE_WRITEBACK_EVENT(name) \
@@ -490,7 +490,7 @@ DECLARE_EVENT_CLASS(wbc_class,
__field(int, range_cyclic)
__field(long, range_start)
__field(long, range_end)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -507,7 +507,7 @@ DECLARE_EVENT_CLASS(wbc_class,
),
TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d bgrd=%d "
- "cyclic=%d start=0x%lx end=0x%lx cgroup_ino=%lu",
+ "cyclic=%d start=0x%lx end=0x%lx cgroup_ino=%llu",
__entry->name,
__entry->nr_to_write,
__entry->pages_skipped,
@@ -517,7 +517,7 @@ DECLARE_EVENT_CLASS(wbc_class,
__entry->range_cyclic,
__entry->range_start,
__entry->range_end,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
)
@@ -539,7 +539,7 @@ TRACE_EVENT(writeback_queue_io,
__field(long, age)
__field(int, moved)
__field(int, reason)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
@@ -549,13 +549,13 @@ TRACE_EVENT(writeback_queue_io,
__entry->reason = work->reason;
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
),
- TP_printk("bdi %s: older=%lu age=%ld enqueue=%d reason=%s cgroup_ino=%lu",
+ TP_printk("bdi %s: older=%lu age=%ld enqueue=%d reason=%s cgroup_ino=%llu",
__entry->name,
__entry->older, /* dirtied_before in jiffies */
__entry->age, /* dirtied_before in relative milliseconds */
__entry->moved,
__print_symbolic(__entry->reason, WB_WORK_REASON),
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -620,7 +620,7 @@ TRACE_EVENT(bdi_dirty_ratelimit,
__field(unsigned long, dirty_ratelimit)
__field(unsigned long, task_ratelimit)
__field(unsigned long, balanced_dirty_ratelimit)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -638,7 +638,7 @@ TRACE_EVENT(bdi_dirty_ratelimit,
TP_printk("bdi %s: "
"write_bw=%lu awrite_bw=%lu dirty_rate=%lu "
"dirty_ratelimit=%lu task_ratelimit=%lu "
- "balanced_dirty_ratelimit=%lu cgroup_ino=%lu",
+ "balanced_dirty_ratelimit=%lu cgroup_ino=%llu",
__entry->bdi,
__entry->write_bw, /* write bandwidth */
__entry->avg_write_bw, /* avg write bandwidth */
@@ -646,7 +646,7 @@ TRACE_EVENT(bdi_dirty_ratelimit,
__entry->dirty_ratelimit, /* base ratelimit */
__entry->task_ratelimit, /* ratelimit with position control */
__entry->balanced_dirty_ratelimit, /* the balanced ratelimit */
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -680,7 +680,7 @@ TRACE_EVENT(balance_dirty_pages,
__field( long, pause)
__field(unsigned long, period)
__field( long, think)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -711,7 +711,7 @@ TRACE_EVENT(balance_dirty_pages,
"wb_setpoint=%lu wb_dirty=%lu "
"dirty_ratelimit=%lu task_ratelimit=%lu "
"dirtied=%u dirtied_pause=%u "
- "paused=%lu pause=%ld period=%lu think=%ld cgroup_ino=%lu",
+ "paused=%lu pause=%ld period=%lu think=%ld cgroup_ino=%llu",
__entry->bdi,
__entry->limit,
__entry->setpoint,
@@ -726,7 +726,7 @@ TRACE_EVENT(balance_dirty_pages,
__entry->pause, /* ms */
__entry->period, /* ms */
__entry->think, /* ms */
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -737,10 +737,10 @@ TRACE_EVENT(writeback_sb_inodes_requeue,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, state)
__field(unsigned long, dirtied_when)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -752,13 +752,13 @@ TRACE_EVENT(writeback_sb_inodes_requeue,
__entry->cgroup_ino = __trace_wb_assign_cgroup(inode_to_wb(inode));
),
- TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu state=%s dirtied_when=%lu age=%lu cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
show_inode_state(__entry->state),
__entry->dirtied_when,
(jiffies - __entry->dirtied_when) / HZ,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -773,13 +773,13 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template,
TP_STRUCT__entry(
__array(char, name, 32)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned long, state)
__field(unsigned long, dirtied_when)
__field(unsigned long, writeback_index)
__field(long, nr_to_write)
__field(unsigned long, wrote)
- __field(ino_t, cgroup_ino)
+ __field(u64, cgroup_ino)
),
TP_fast_assign(
@@ -794,17 +794,17 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template,
__entry->cgroup_ino = __trace_wbc_assign_cgroup(wbc);
),
- TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu "
- "index=%lu to_write=%ld wrote=%lu cgroup_ino=%lu",
+ TP_printk("bdi %s: ino=%llu state=%s dirtied_when=%lu age=%lu "
+ "index=%lu to_write=%ld wrote=%lu cgroup_ino=%llu",
__entry->name,
- (unsigned long)__entry->ino,
+ (unsigned long long)__entry->ino,
show_inode_state(__entry->state),
__entry->dirtied_when,
(jiffies - __entry->dirtied_when) / HZ,
__entry->writeback_index,
__entry->nr_to_write,
__entry->wrote,
- (unsigned long)__entry->cgroup_ino
+ (unsigned long long)__entry->cgroup_ino
)
);
@@ -829,7 +829,7 @@ DECLARE_EVENT_CLASS(writeback_inode_template,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field(unsigned long, state )
__field( __u16, mode )
__field(unsigned long, dirtied_when )
@@ -843,9 +843,9 @@ DECLARE_EVENT_CLASS(writeback_inode_template,
__entry->dirtied_when = inode->dirtied_when;
),
- TP_printk("dev %d,%d ino %lu dirtied %lu state %s mode 0%o",
+ TP_printk("dev %d,%d ino %llu dirtied %lu state %s mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long)__entry->ino, __entry->dirtied_when,
+ (unsigned long long)__entry->ino, __entry->dirtied_when,
show_inode_state(__entry->state), __entry->mode)
);
--
2.53.0
^ permalink raw reply related
* [PATCH 04/61] ext4: update for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update ext4 trace events and filesystem code for u64 i_ino:
- Change __field(ino_t, ...) to __field(u64, ...) in trace events
- Update all %lu format strings to %llu for inode numbers
- Cast to (unsigned long long) where needed in TP_printk
- Update __ext4_grp_locked_error() ino parameter to u64
- Update ext_debug() format string
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/ext4/dir.c | 2 +-
fs/ext4/ext4.h | 4 +-
fs/ext4/extents.c | 8 +-
fs/ext4/extents_status.c | 28 +--
fs/ext4/fast_commit.c | 8 +-
fs/ext4/ialloc.c | 10 +-
fs/ext4/indirect.c | 2 +-
fs/ext4/inline.c | 14 +-
fs/ext4/inode.c | 22 +--
fs/ext4/ioctl.c | 4 +-
fs/ext4/mballoc.c | 6 +-
fs/ext4/migrate.c | 2 +-
fs/ext4/move_extent.c | 20 +--
fs/ext4/namei.c | 10 +-
fs/ext4/orphan.c | 16 +-
fs/ext4/page-io.c | 10 +-
fs/ext4/super.c | 22 +--
fs/ext4/xattr.c | 10 +-
include/trace/events/ext4.h | 427 ++++++++++++++++++++++----------------------
19 files changed, 313 insertions(+), 312 deletions(-)
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 28b2a3deb954fe275cd2f7290f2daeafa2d3dbed..17edd678fa87b8f024232081888c4054d42a7bd9 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -535,7 +535,7 @@ static int call_filldir(struct file *file, struct dir_context *ctx,
struct super_block *sb = inode->i_sb;
if (!fname) {
- ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: comm %s: "
+ ext4_msg(sb, KERN_ERR, "%s:%d: inode #%llu: comm %s: "
"called with null fname?!?", __func__, __LINE__,
inode->i_ino, current->comm);
return 0;
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 293f698b7042438b2757790717db22bca060797d..85e6c2b543a82e83b777c2cc2f54a6ed53b554f2 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -92,7 +92,7 @@
*/
#ifdef CONFIG_EXT4_DEBUG
#define ext_debug(ino, fmt, ...) \
- pr_debug("[%s/%d] EXT4-fs (%s): ino %lu: (%s, %d): %s:" fmt, \
+ pr_debug("[%s/%d] EXT4-fs (%s): ino %llu: (%s, %d): %s:" fmt, \
current->comm, task_pid_nr(current), \
ino->i_sb->s_id, ino->i_ino, __FILE__, __LINE__, \
__func__, ##__VA_ARGS__)
@@ -3229,7 +3229,7 @@ extern void __dump_mmp_msg(struct super_block *, struct mmp_struct *mmp,
extern __printf(7, 8)
void __ext4_grp_locked_error(const char *, unsigned int,
struct super_block *, ext4_group_t,
- unsigned long, ext4_fsblk_t,
+ u64, ext4_fsblk_t,
const char *, ...);
#define EXT4_ERROR_INODE(inode, fmt, a...) \
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ae3804f36535aeca4009bfae992e1f2f665aded2..042e1555a674149f8d47716f288ca175556b6b45 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4603,7 +4603,7 @@ static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
}
ret = ext4_map_blocks(handle, inode, &map, flags);
if (ret <= 0) {
- ext4_debug("inode #%lu: block %u: len %u: "
+ ext4_debug("inode #%llu: block %u: len %u: "
"ext4_ext_map_blocks returned %d",
inode->i_ino, map.m_lblk,
map.m_len, ret);
@@ -4955,7 +4955,7 @@ int ext4_convert_unwritten_extents_atomic(handle_t *handle, struct inode *inode,
ret = ext4_map_blocks(handle, inode, &map, flags);
if (ret != max_blocks)
ext4_msg(inode->i_sb, KERN_INFO,
- "inode #%lu: block %u: len %u: "
+ "inode #%llu: block %u: len %u: "
"split block mapping found for atomic write, "
"ret = %d",
inode->i_ino, map.m_lblk,
@@ -4974,7 +4974,7 @@ int ext4_convert_unwritten_extents_atomic(handle_t *handle, struct inode *inode,
if (ret <= 0 || ret2)
ext4_warning(inode->i_sb,
- "inode #%lu: block %u: len %u: "
+ "inode #%llu: block %u: len %u: "
"returned %d or %d",
inode->i_ino, map.m_lblk,
map.m_len, ret, ret2);
@@ -5031,7 +5031,7 @@ int ext4_convert_unwritten_extents(handle_t *handle, struct inode *inode,
EXT4_EX_NOCACHE);
if (ret <= 0)
ext4_warning(inode->i_sb,
- "inode #%lu: block %u: len %u: "
+ "inode #%llu: block %u: len %u: "
"ext4_ext_map_blocks returned %d",
inode->i_ino, map.m_lblk,
map.m_len, ret);
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index a1538bac51c61d81881be2e3fd67113f24c16df1..6e4a191e821915d2b61646f46304ffab6d531126 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -214,7 +214,7 @@ static void ext4_es_print_tree(struct inode *inode)
struct ext4_es_tree *tree;
struct rb_node *node;
- printk(KERN_DEBUG "status extents for inode %lu:", inode->i_ino);
+ printk(KERN_DEBUG "status extents for inode %llu:", inode->i_ino);
tree = &EXT4_I(inode)->i_es_tree;
node = rb_first(&tree->root);
while (node) {
@@ -703,7 +703,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
if (!ext4_es_is_written(es) && !ext4_es_is_unwritten(es)) {
if (in_range(es->es_lblk, ee_block, ee_len)) {
pr_warn("ES insert assertion failed for "
- "inode: %lu we can find an extent "
+ "inode: %llu we can find an extent "
"at block [%d/%d/%llu/%c], but we "
"want to add a delayed/hole extent "
"[%d/%d/%llu/%x]\n",
@@ -721,7 +721,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
*/
if (es->es_lblk < ee_block ||
ext4_es_pblock(es) != ee_start + es->es_lblk - ee_block) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"ex_status [%d/%d/%llu/%c] != "
"es_status [%d/%d/%llu/%c]\n", inode->i_ino,
ee_block, ee_len, ee_start,
@@ -731,7 +731,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
}
if (ee_status ^ es_status) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"ex_status [%d/%d/%llu/%c] != "
"es_status [%d/%d/%llu/%c]\n", inode->i_ino,
ee_block, ee_len, ee_start,
@@ -744,7 +744,7 @@ static void ext4_es_insert_extent_ext_check(struct inode *inode,
* that we don't want to add an written/unwritten extent.
*/
if (!ext4_es_is_delayed(es) && !ext4_es_is_hole(es)) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"can't find an extent at block %d but we want "
"to add a written/unwritten extent "
"[%d/%d/%llu/%x]\n", inode->i_ino,
@@ -779,7 +779,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
* We want to add a delayed/hole extent but this
* block has been allocated.
*/
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"We can find blocks but we want to add a "
"delayed/hole extent [%d/%d/%llu/%x]\n",
inode->i_ino, es->es_lblk, es->es_len,
@@ -788,13 +788,13 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
} else if (ext4_es_is_written(es)) {
if (retval != es->es_len) {
pr_warn("ES insert assertion failed for "
- "inode: %lu retval %d != es_len %d\n",
+ "inode: %llu retval %d != es_len %d\n",
inode->i_ino, retval, es->es_len);
return;
}
if (map.m_pblk != ext4_es_pblock(es)) {
pr_warn("ES insert assertion failed for "
- "inode: %lu m_pblk %llu != "
+ "inode: %llu m_pblk %llu != "
"es_pblk %llu\n",
inode->i_ino, map.m_pblk,
ext4_es_pblock(es));
@@ -809,7 +809,7 @@ static void ext4_es_insert_extent_ind_check(struct inode *inode,
}
} else if (retval == 0) {
if (ext4_es_is_written(es)) {
- pr_warn("ES insert assertion failed for inode: %lu "
+ pr_warn("ES insert assertion failed for inode: %llu "
"We can't find the block but we want to add "
"a written extent [%d/%d/%llu/%x]\n",
inode->i_ino, es->es_lblk, es->es_len,
@@ -919,7 +919,7 @@ void ext4_es_insert_extent(struct inode *inode, ext4_lblk_t lblk,
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- es_debug("add [%u/%u) %llu %x %d to extent status tree of inode %lu\n",
+ es_debug("add [%u/%u) %llu %x %d to extent status tree of inode %llu\n",
lblk, len, pblk, status, delalloc_reserve_used, inode->i_ino);
if (!len)
@@ -1631,7 +1631,7 @@ void ext4_es_remove_extent(struct inode *inode, ext4_lblk_t lblk,
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- es_debug("remove [%u/%u) from extent status tree of inode %lu\n",
+ es_debug("remove [%u/%u) from extent status tree of inode %llu\n",
lblk, len, inode->i_ino);
if (!len)
@@ -1821,7 +1821,7 @@ int ext4_seq_es_shrinker_info_show(struct seq_file *seq, void *v)
seq_printf(seq, " %lu shrunk objects\n", es_stats->es_stats_shrunk);
if (inode_cnt)
seq_printf(seq,
- "maximum:\n %lu inode (%u objects, %u reclaimable)\n"
+ "maximum:\n %llu inode (%u objects, %u reclaimable)\n"
" %llu us max scan time\n",
max->vfs_inode.i_ino, max->i_es_all_nr, max->i_es_shk_nr,
div_u64(es_stats->es_stats_max_scan_time, 1000));
@@ -1998,7 +1998,7 @@ static void ext4_print_pending_tree(struct inode *inode)
struct rb_node *node;
struct pending_reservation *pr;
- printk(KERN_DEBUG "pending reservations for inode %lu:", inode->i_ino);
+ printk(KERN_DEBUG "pending reservations for inode %llu:", inode->i_ino);
tree = &EXT4_I(inode)->i_pending_tree;
node = rb_first(&tree->root);
while (node) {
@@ -2214,7 +2214,7 @@ void ext4_es_insert_delayed_extent(struct inode *inode, ext4_lblk_t lblk,
if (EXT4_SB(inode->i_sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- es_debug("add [%u/%u) delayed to extent status tree of inode %lu\n",
+ es_debug("add [%u/%u) delayed to extent status tree of inode %llu\n",
lblk, len, inode->i_ino);
if (!len)
return;
diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c
index f575751f1cae430eead31afa4f7d03ade1099d4a..379fb66dedbcd1c87b960cfe8786601700f797f3 100644
--- a/fs/ext4/fast_commit.c
+++ b/fs/ext4/fast_commit.c
@@ -616,7 +616,7 @@ static int __track_range(handle_t *handle, struct inode *inode, void *arg,
(struct __track_range_args *)arg;
if (inode->i_ino < EXT4_FIRST_INO(inode->i_sb)) {
- ext4_debug("Special inode %ld being modified\n", inode->i_ino);
+ ext4_debug("Special inode %llu being modified\n", inode->i_ino);
return -ECANCELED;
}
@@ -914,7 +914,7 @@ static int ext4_fc_write_inode_data(struct inode *inode, u32 *crc)
spin_unlock(&ei->i_fc_lock);
cur_lblk_off = old_blk_size;
- ext4_debug("will try writing %d to %d for inode %ld\n",
+ ext4_debug("will try writing %d to %d for inode %llu\n",
cur_lblk_off, new_blk_size, inode->i_ino);
while (cur_lblk_off <= new_blk_size) {
@@ -1792,7 +1792,7 @@ static int ext4_fc_replay_add_range(struct super_block *sb,
cur = start;
remaining = len;
- ext4_debug("ADD_RANGE, lblk %d, pblk %lld, len %d, unwritten %d, inode %ld\n",
+ ext4_debug("ADD_RANGE, lblk %d, pblk %lld, len %d, unwritten %d, inode %llu\n",
start, start_pblk, len, ext4_ext_is_unwritten(ex),
inode->i_ino);
@@ -1903,7 +1903,7 @@ ext4_fc_replay_del_range(struct super_block *sb,
if (ret)
goto out;
- ext4_debug("DEL_RANGE, inode %ld, lblk %d, len %d\n",
+ ext4_debug("DEL_RANGE, inode %llu, lblk %d, len %d\n",
inode->i_ino, le32_to_cpu(lrange.fc_lblk),
le32_to_cpu(lrange.fc_len));
while (remaining > 0) {
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index b20a1bf866abedf3a768ee8a147f108ea09ecb01..628a74b2bbe6232eabbf2562ffd0e350ea37446e 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -253,13 +253,13 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
return;
}
if (icount_read(inode) > 1) {
- ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: count=%d",
+ ext4_msg(sb, KERN_ERR, "%s:%d: inode #%llu: count=%d",
__func__, __LINE__, inode->i_ino,
icount_read(inode));
return;
}
if (inode->i_nlink) {
- ext4_msg(sb, KERN_ERR, "%s:%d: inode #%lu: nlink=%d\n",
+ ext4_msg(sb, KERN_ERR, "%s:%d: inode #%llu: nlink=%d\n",
__func__, __LINE__, inode->i_ino, inode->i_nlink);
return;
}
@@ -631,7 +631,7 @@ static int find_group_other(struct super_block *sb, struct inode *parent,
*
* So add our directory's i_ino into the starting point for the hash.
*/
- *group = (*group + parent->i_ino) % ngroups;
+ *group = (*group + (unsigned int)parent->i_ino) % ngroups;
/*
* Use a quadratic hash to find a group with a free inode and some free
@@ -1275,7 +1275,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
* twice.
*/
err = -EIO;
- ext4_error(sb, "failed to insert inode %lu: doubly allocated?",
+ ext4_error(sb, "failed to insert inode %llu: doubly allocated?",
inode->i_ino);
ext4_mark_group_bitmap_corrupted(sb, group,
EXT4_GROUP_INFO_IBITMAP_CORRUPT);
@@ -1344,7 +1344,7 @@ struct inode *__ext4_new_inode(struct mnt_idmap *idmap,
goto fail_free_drop;
}
- ext4_debug("allocating inode %lu\n", inode->i_ino);
+ ext4_debug("allocating inode %llu\n", inode->i_ino);
trace_ext4_allocate_inode(inode, dir, mode);
brelse(inode_bitmap_bh);
return ret;
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index da76353b3a5750987d7b4803c388248b749a68a8..5aec759eed7055dbe954c25da0181ebd04bb0be3 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -102,7 +102,7 @@ static int ext4_block_to_path(struct inode *inode,
offsets[n++] = i_block & (ptrs - 1);
final = ptrs;
} else {
- ext4_warning(inode->i_sb, "block %lu > max in inode %lu",
+ ext4_warning(inode->i_sb, "block %lu > max in inode %llu",
i_block + direct_blocks +
indirect_blocks + double_blocks, inode->i_ino);
}
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 1f6bc05593df165776fda3ab2c272af586d80279..f846fcb7db2442149776fa2ba45ddc5e0b71245e 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -119,7 +119,7 @@ int ext4_get_max_inline_size(struct inode *inode)
error = ext4_get_inode_loc(inode, &iloc);
if (error) {
ext4_error_inode_err(inode, __func__, __LINE__, 0, -error,
- "can't get inode location %lu",
+ "can't get inode location %llu",
inode->i_ino);
return 0;
}
@@ -512,7 +512,7 @@ static int ext4_read_inline_folio(struct inode *inode, struct folio *folio)
BUG_ON(folio->index);
if (!EXT4_I(inode)->i_inline_off) {
- ext4_warning(inode->i_sb, "inode %lu doesn't have inline data.",
+ ext4_warning(inode->i_sb, "inode %llu doesn't have inline data.",
inode->i_ino);
goto out;
}
@@ -934,7 +934,7 @@ void ext4_show_inline_dir(struct inode *dir, struct buffer_head *bh,
struct ext4_dir_entry_2 *de = inline_start;
void *dlimit = inline_start + inline_size;
- trace_printk("inode %lu\n", dir->i_ino);
+ trace_printk("inode %llu\n", dir->i_ino);
offset = 0;
while ((void *)de < dlimit) {
de_len = ext4_rec_len_from_disk(de->rec_len, inline_size);
@@ -1071,7 +1071,7 @@ static void ext4_restore_inline_data(handle_t *handle, struct inode *inode,
ret = ext4_create_inline_data(handle, inode, inline_size);
if (ret) {
ext4_msg(inode->i_sb, KERN_EMERG,
- "error restoring inline_data for inode -- potential data loss! (inode %lu, error %d)",
+ "error restoring inline_data for inode -- potential data loss! (inode %llu, error %d)",
inode->i_ino, ret);
return;
}
@@ -1740,7 +1740,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data)
err = ext4_get_inode_loc(dir, &iloc);
if (err) {
EXT4_ERROR_INODE_ERR(dir, -err,
- "error %d getting inode %lu block",
+ "error %d getting inode %llu block",
err, dir->i_ino);
return false;
}
@@ -1755,7 +1755,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data)
de = (struct ext4_dir_entry_2 *)ext4_raw_inode(&iloc)->i_block;
if (!le32_to_cpu(de->inode)) {
ext4_warning(dir->i_sb,
- "bad inline directory (dir #%lu) - no `..'",
+ "bad inline directory (dir #%llu) - no `..'",
dir->i_ino);
goto out;
}
@@ -1769,7 +1769,7 @@ bool empty_inline_dir(struct inode *dir, int *has_inline_data)
iloc.bh, inline_pos,
inline_size, offset)) {
ext4_warning(dir->i_sb,
- "bad inline directory (dir #%lu) - "
+ "bad inline directory (dir #%llu) - "
"inode %u, rec_len %u, name_len %d"
"inline size %d",
dir->i_ino, le32_to_cpu(de->inode),
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 396dc3a5d16b4dc4d3e5c6541871a9bb896f6d7a..d50f31124a784ba6eeb916f9a2f62ec840aee52e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -262,7 +262,7 @@ void ext4_evict_inode(struct inode *inode)
err = ext4_truncate(inode);
if (err) {
ext4_error_err(inode->i_sb, -err,
- "couldn't truncate inode %lu (err %d)",
+ "couldn't truncate inode %llu (err %d)",
inode->i_ino, err);
goto stop_handle;
}
@@ -342,7 +342,7 @@ void ext4_da_update_reserve_space(struct inode *inode,
spin_lock(&ei->i_block_reservation_lock);
trace_ext4_da_update_reserve_space(inode, used, quota_claim);
if (unlikely(used > ei->i_reserved_data_blocks)) {
- ext4_warning(inode->i_sb, "%s: ino %lu, used %d "
+ ext4_warning(inode->i_sb, "%s: ino %llu, used %d "
"with only %d reserved data blocks",
__func__, inode->i_ino, used,
ei->i_reserved_data_blocks);
@@ -475,7 +475,7 @@ static void ext4_map_blocks_es_recheck(handle_t *handle,
if (es_map->m_lblk != map->m_lblk ||
es_map->m_flags != map->m_flags ||
es_map->m_pblk != map->m_pblk) {
- printk("ES cache assertion failed for inode: %lu "
+ printk("ES cache assertion failed for inode: %llu "
"es_cached ex [%d/%d/%llu/%x] != "
"found ex [%d/%d/%llu/%x] retval %d flags %x\n",
inode->i_ino, es_map->m_lblk, es_map->m_len,
@@ -515,7 +515,7 @@ static int ext4_map_query_blocks_next_in_leaf(handle_t *handle,
if (unlikely(retval != map2.m_len)) {
ext4_warning(inode->i_sb,
"ES len assertion failed for inode "
- "%lu: retval %d != map->m_len %d",
+ "%llu: retval %d != map->m_len %d",
inode->i_ino, retval, map2.m_len);
WARN_ON(1);
}
@@ -563,7 +563,7 @@ int ext4_map_query_blocks(handle_t *handle, struct inode *inode,
if (unlikely(retval != map->m_len)) {
ext4_warning(inode->i_sb,
"ES len assertion failed for inode "
- "%lu: retval %d != map->m_len %d",
+ "%llu: retval %d != map->m_len %d",
inode->i_ino, retval, map->m_len);
WARN_ON(1);
}
@@ -630,7 +630,7 @@ int ext4_map_create_blocks(handle_t *handle, struct inode *inode,
if (unlikely(retval != map->m_len)) {
ext4_warning(inode->i_sb,
- "ES len assertion failed for inode %lu: "
+ "ES len assertion failed for inode %llu: "
"retval %d != map->m_len %d",
inode->i_ino, retval, map->m_len);
WARN_ON(1);
@@ -937,7 +937,7 @@ int ext4_get_block_unwritten(struct inode *inode, sector_t iblock,
{
int ret = 0;
- ext4_debug("ext4_get_block_unwritten: inode %lu, create flag %d\n",
+ ext4_debug("ext4_get_block_unwritten: inode %llu, create flag %d\n",
inode->i_ino, create);
ret = _ext4_get_block(inode, iblock, bh_result,
EXT4_GET_BLOCKS_CREATE_UNWRIT_EXT);
@@ -1659,7 +1659,7 @@ void ext4_da_release_space(struct inode *inode, int to_free)
* harmless to return without any action.
*/
ext4_warning(inode->i_sb, "ext4_da_release_space: "
- "ino %lu, to_free %d with only %d reserved "
+ "ino %llu, to_free %d with only %d reserved "
"data blocks", inode->i_ino, to_free,
ei->i_reserved_data_blocks);
WARN_ON(1);
@@ -2491,7 +2491,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,
}
ext4_msg(sb, KERN_CRIT,
"Delayed block allocation failed for "
- "inode %lu at logical offset %llu with"
+ "inode %llu at logical offset %llu with"
" max blocks %u with error %d",
inode->i_ino,
(unsigned long long)map->m_lblk,
@@ -2535,7 +2535,7 @@ static int mpage_map_and_submit_extent(handle_t *handle,
err2 = ext4_mark_inode_dirty(handle, inode);
if (err2) {
ext4_error_err(inode->i_sb, -err2,
- "Failed to mark inode %lu dirty",
+ "Failed to mark inode %llu dirty",
inode->i_ino);
}
if (!err)
@@ -2909,7 +2909,7 @@ static int ext4_do_writepages(struct mpage_da_data *mpd)
if (IS_ERR(handle)) {
ret = PTR_ERR(handle);
ext4_msg(inode->i_sb, KERN_CRIT, "%s: jbd2_start: "
- "%ld pages, ino %lu; err %d", __func__,
+ "%ld pages, ino %llu; err %d", __func__,
wbc->nr_to_write, inode->i_ino, ret);
/* Release allocated io_end */
ext4_put_io_end(mpd->io_submit.io_end);
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 3ae9cb50a0c057f10f6bda8165ba45fd2c368cfb..1d0c3d4bdf472715a7070b184fdc7d9bf5885950 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -477,7 +477,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
if (err < 0) {
/* No need to update quota information. */
ext4_warning(inode->i_sb,
- "couldn't mark inode #%lu dirty (err %d)",
+ "couldn't mark inode #%llu dirty (err %d)",
inode->i_ino, err);
/* Revert all changes: */
swap_inode_data(inode, inode_bl);
@@ -493,7 +493,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
if (err < 0) {
/* No need to update quota information. */
ext4_warning(inode_bl->i_sb,
- "couldn't mark inode #%lu dirty (err %d)",
+ "couldn't mark inode #%llu dirty (err %d)",
inode_bl->i_ino, err);
goto revert;
}
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 20e9fdaf4301b61c9d54401ed95067db6b6b8173..9e8041ac56239e64326343b0adef062611189d6a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2266,7 +2266,7 @@ static void ext4_mb_use_best_found(struct ext4_allocation_context *ac,
folio_get(ac->ac_buddy_folio);
/* store last allocated for subsequent stream allocation */
if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
- int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
+ int hash = (unsigned int)ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
WRITE_ONCE(sbi->s_mb_last_groups[hash], ac->ac_f_ex.fe_group);
}
@@ -3032,7 +3032,7 @@ ext4_mb_regular_allocator(struct ext4_allocation_context *ac)
/* if stream allocation is enabled, use global goal */
if (ac->ac_flags & EXT4_MB_STREAM_ALLOC) {
- int hash = ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
+ int hash = (unsigned int)ac->ac_inode->i_ino % sbi->s_mb_nr_global_goals;
ac->ac_g_ex.fe_group = READ_ONCE(sbi->s_mb_last_groups[hash]);
ac->ac_g_ex.fe_start = -1;
@@ -5628,7 +5628,7 @@ void ext4_discard_preallocations(struct inode *inode)
if (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY)
return;
- mb_debug(sb, "discard preallocation for inode %lu\n",
+ mb_debug(sb, "discard preallocation for inode %llu\n",
inode->i_ino);
trace_ext4_discard_preallocations(inode,
atomic_read(&ei->i_prealloc_active));
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_INODES_PER_GROUP(inode->i_sb)) + 1;
owner[0] = i_uid_read(inode);
owner[1] = i_gid_read(inode);
diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
index ce1f738dff938c5685ef87099df4c87702657a39..ab17c1d3a7b51198c2332e8a1dd44f7a1bff40cf 100644
--- a/fs/ext4/move_extent.c
+++ b/fs/ext4/move_extent.c
@@ -420,21 +420,21 @@ static int mext_check_validity(struct inode *orig_inode,
/* origin and donor should be different inodes */
if (orig_inode == donor_inode) {
- ext4_debug("ext4 move extent: The argument files should not be same inode [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should not be same inode [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
/* origin and donor should belone to the same filesystem */
if (orig_inode->i_sb != donor_inode->i_sb) {
- ext4_debug("ext4 move extent: The argument files should be in same FS [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should be in same FS [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
/* Regular file check */
if (!S_ISREG(orig_inode->i_mode) || !S_ISREG(donor_inode->i_mode)) {
- ext4_debug("ext4 move extent: The argument files should be regular file [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should be regular file [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
@@ -477,26 +477,26 @@ static int mext_check_validity(struct inode *orig_inode,
}
if (donor_inode->i_mode & (S_ISUID|S_ISGID)) {
- ext4_debug("ext4 move extent: suid or sgid is set to donor file [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: suid or sgid is set to donor file [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
if (IS_IMMUTABLE(donor_inode) || IS_APPEND(donor_inode)) {
- ext4_debug("ext4 move extent: donor should not be immutable or append file [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: donor should not be immutable or append file [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EPERM;
}
/* Ext4 move extent does not support swap files */
if (IS_SWAPFILE(orig_inode) || IS_SWAPFILE(donor_inode)) {
- ext4_debug("ext4 move extent: The argument files should not be swap files [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should not be swap files [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -ETXTBSY;
}
if (ext4_is_quota_file(orig_inode) || ext4_is_quota_file(donor_inode)) {
- ext4_debug("ext4 move extent: The argument files should not be quota files [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: The argument files should not be quota files [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EOPNOTSUPP;
}
@@ -523,7 +523,7 @@ static int mext_check_adjust_range(struct inode *orig_inode,
/* Start offset should be same */
if ((orig_start & ~(PAGE_MASK >> orig_inode->i_blkbits)) !=
(donor_start & ~(PAGE_MASK >> orig_inode->i_blkbits))) {
- ext4_debug("ext4 move extent: orig and donor's start offsets are not aligned [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: orig and donor's start offsets are not aligned [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
@@ -533,7 +533,7 @@ static int mext_check_adjust_range(struct inode *orig_inode,
(*len > EXT_MAX_BLOCKS) ||
(donor_start + *len >= EXT_MAX_BLOCKS) ||
(orig_start + *len >= EXT_MAX_BLOCKS)) {
- ext4_debug("ext4 move extent: Can't handle over [%u] blocks [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: Can't handle over [%u] blocks [ino:orig %llu, donor %llu]\n",
EXT_MAX_BLOCKS,
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
@@ -550,7 +550,7 @@ static int mext_check_adjust_range(struct inode *orig_inode,
else if (donor_eof < donor_start + *len - 1)
*len = donor_eof - donor_start;
if (!*len) {
- ext4_debug("ext4 move extent: len should not be 0 [ino:orig %lu, donor %lu]\n",
+ ext4_debug("ext4 move extent: len should not be 0 [ino:orig %llu, donor %llu]\n",
orig_inode->i_ino, donor_inode->i_ino);
return -EINVAL;
}
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index c4b5e252af0efbfcbaf83688a32d445327a74a02..503dc9ffd61465686bb1a253bfeee41c0e9acd59 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -144,7 +144,7 @@ static struct buffer_head *__ext4_read_dirblock(struct inode *inode,
bh = ext4_bread(NULL, inode, block, 0);
if (IS_ERR(bh)) {
__ext4_warning(inode->i_sb, func, line,
- "inode #%lu: lblock %lu: comm %s: "
+ "inode #%llu: lblock %lu: comm %s: "
"error %ld reading directory block",
inode->i_ino, (unsigned long)block,
current->comm, PTR_ERR(bh));
@@ -841,7 +841,7 @@ dx_probe(struct ext4_filename *fname, struct inode *dir,
indirect = root->info.indirect_levels;
if (indirect >= ext4_dir_htree_level(dir->i_sb)) {
ext4_warning(dir->i_sb,
- "Directory (ino: %lu) htree depth %#06x exceed"
+ "Directory (ino: %llu) htree depth %#06x exceed"
"supported value", dir->i_ino,
ext4_dir_htree_level(dir->i_sb));
if (ext4_dir_htree_level(dir->i_sb) < EXT4_HTREE_LEVEL) {
@@ -1793,7 +1793,7 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi
(S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) &&
!fscrypt_has_permitted_context(dir, inode)) {
ext4_warning(inode->i_sb,
- "Inconsistent encryption contexts: %lu/%lu",
+ "Inconsistent encryption contexts: %llu/%llu",
dir->i_ino, inode->i_ino);
iput(inode);
return ERR_PTR(-EPERM);
@@ -2227,7 +2227,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
csum_size = sizeof(struct ext4_dir_entry_tail);
blocksize = dir->i_sb->s_blocksize;
- dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino));
+ dxtrace(printk(KERN_DEBUG "Creating index: inode %llu\n", dir->i_ino));
BUFFER_TRACE(bh, "get_write_access");
retval = ext4_journal_get_write_access(handle, dir->i_sb, bh,
EXT4_JTR_NONE);
@@ -2523,7 +2523,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
restart = 1;
}
if (add_level && levels == ext4_dir_htree_level(sb)) {
- ext4_warning(sb, "Directory (ino: %lu) index full, "
+ ext4_warning(sb, "Directory (ino: %llu) index full, "
"reach max htree level :%d",
dir->i_ino, levels);
if (ext4_dir_htree_level(sb) < EXT4_HTREE_LEVEL) {
diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c
index c0022f0bff8749badfe80d2a7628bea5ce96ab1e..64ea4762423386db79e739a2448bf70c12415ef8 100644
--- a/fs/ext4/orphan.c
+++ b/fs/ext4/orphan.c
@@ -179,8 +179,8 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
} else
brelse(iloc.bh);
- ext4_debug("superblock will point to %lu\n", inode->i_ino);
- ext4_debug("orphan inode %lu will point to %d\n",
+ ext4_debug("superblock will point to %llu\n", inode->i_ino);
+ ext4_debug("orphan inode %llu will point to %d\n",
inode->i_ino, NEXT_ORPHAN(inode));
out:
ext4_std_error(sb, err);
@@ -249,7 +249,7 @@ int ext4_orphan_del(handle_t *handle, struct inode *inode)
}
mutex_lock(&sbi->s_orphan_lock);
- ext4_debug("remove inode %lu from orphan list\n", inode->i_ino);
+ ext4_debug("remove inode %llu from orphan list\n", inode->i_ino);
prev = ei->i_orphan.prev;
list_del_init(&ei->i_orphan);
@@ -284,7 +284,7 @@ int ext4_orphan_del(handle_t *handle, struct inode *inode)
struct inode *i_prev =
&list_entry(prev, struct ext4_inode_info, i_orphan)->vfs_inode;
- ext4_debug("orphan inode %lu will point to %u\n",
+ ext4_debug("orphan inode %llu will point to %u\n",
i_prev->i_ino, ino_next);
err = ext4_reserve_inode_write(handle, i_prev, &iloc2);
if (err) {
@@ -328,9 +328,9 @@ static void ext4_process_orphan(struct inode *inode,
if (inode->i_nlink) {
if (test_opt(sb, DEBUG))
ext4_msg(sb, KERN_DEBUG,
- "%s: truncating inode %lu to %lld bytes",
+ "%s: truncating inode %llu to %lld bytes",
__func__, inode->i_ino, inode->i_size);
- ext4_debug("truncating inode %lu to %lld bytes\n",
+ ext4_debug("truncating inode %llu to %lld bytes\n",
inode->i_ino, inode->i_size);
inode_lock(inode);
truncate_inode_pages(inode->i_mapping, inode->i_size);
@@ -349,9 +349,9 @@ static void ext4_process_orphan(struct inode *inode,
} else {
if (test_opt(sb, DEBUG))
ext4_msg(sb, KERN_DEBUG,
- "%s: deleting unreferenced inode %lu",
+ "%s: deleting unreferenced inode %llu",
__func__, inode->i_ino);
- ext4_debug("deleting unreferenced inode %lu\n",
+ ext4_debug("deleting unreferenced inode %llu\n",
inode->i_ino);
(*nr_orphans)++;
}
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index a8c95eee91b79e36ebde09fac9033be359baf8fc..86011275ad83668d591488fad90959ec04625c55 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -180,7 +180,7 @@ static int ext4_end_io_end(ext4_io_end_t *io_end)
struct super_block *sb = inode->i_sb;
int ret = 0;
- ext4_debug("ext4_end_io_nolock: io_end 0x%p from inode %lu,list->next 0x%p,"
+ ext4_debug("ext4_end_io_nolock: io_end 0x%p from inode %llu,list->next 0x%p,"
"list->prev 0x%p\n",
io_end, inode->i_ino, io_end->list.next, io_end->list.prev);
@@ -204,7 +204,7 @@ static int ext4_end_io_end(ext4_io_end_t *io_end)
ext4_msg(sb, KERN_EMERG,
"failed to convert unwritten extents to written "
"extents -- potential data loss! "
- "(inode %lu, error %d)", inode->i_ino, ret);
+ "(inode %llu, error %d)", inode->i_ino, ret);
}
ext4_clear_io_unwritten_flag(io_end);
@@ -221,7 +221,7 @@ static void dump_completed_IO(struct inode *inode, struct list_head *head)
if (list_empty(head))
return;
- ext4_debug("Dump inode %lu completed io list\n", inode->i_ino);
+ ext4_debug("Dump inode %llu completed io list\n", inode->i_ino);
list_for_each_entry(io_end, head, list) {
cur = &io_end->list;
before = cur->prev;
@@ -229,7 +229,7 @@ static void dump_completed_IO(struct inode *inode, struct list_head *head)
after = cur->next;
io_end1 = container_of(after, ext4_io_end_t, list);
- ext4_debug("io 0x%p from inode %lu,prev 0x%p,next 0x%p\n",
+ ext4_debug("io 0x%p from inode %llu,prev 0x%p,next 0x%p\n",
io_end, inode->i_ino, io_end0, io_end1);
}
#endif
@@ -366,7 +366,7 @@ static void ext4_end_bio(struct bio *bio)
if (bio->bi_status) {
struct inode *inode = io_end->inode;
- ext4_warning(inode->i_sb, "I/O error %d writing to inode %lu "
+ ext4_warning(inode->i_sb, "I/O error %d writing to inode %llu "
"starting block %llu)",
bio->bi_status, inode->i_ino,
(unsigned long long)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 43f680c750ae6b2cacb35bcaad262ba234676ef4..781c083000c2ea2232846b0827c7d4799d87bd5d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -848,12 +848,12 @@ void __ext4_error_inode(struct inode *inode, const char *function,
vaf.va = &args;
if (block)
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: "
- "inode #%lu: block %llu: comm %s: %pV\n",
+ "inode #%llu: block %llu: comm %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
block, current->comm, &vaf);
else
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: "
- "inode #%lu: comm %s: %pV\n",
+ "inode #%llu: comm %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
current->comm, &vaf);
va_end(args);
@@ -888,13 +888,13 @@ void __ext4_error_file(struct file *file, const char *function,
vaf.va = &args;
if (block)
printk(KERN_CRIT
- "EXT4-fs error (device %s): %s:%d: inode #%lu: "
+ "EXT4-fs error (device %s): %s:%d: inode #%llu: "
"block %llu: comm %s: path %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
block, current->comm, path, &vaf);
else
printk(KERN_CRIT
- "EXT4-fs error (device %s): %s:%d: inode #%lu: "
+ "EXT4-fs error (device %s): %s:%d: inode #%llu: "
"comm %s: path %s: %pV\n",
inode->i_sb->s_id, function, line, inode->i_ino,
current->comm, path, &vaf);
@@ -1035,14 +1035,14 @@ void __ext4_warning_inode(const struct inode *inode, const char *function,
vaf.fmt = fmt;
vaf.va = &args;
printk(KERN_WARNING "EXT4-fs warning (device %s): %s:%d: "
- "inode #%lu: comm %s: %pV\n", inode->i_sb->s_id,
+ "inode #%llu: comm %s: %pV\n", inode->i_sb->s_id,
function, line, inode->i_ino, current->comm, &vaf);
va_end(args);
}
void __ext4_grp_locked_error(const char *function, unsigned int line,
struct super_block *sb, ext4_group_t grp,
- unsigned long ino, ext4_fsblk_t block,
+ u64 ino, ext4_fsblk_t block,
const char *fmt, ...)
__releases(bitlock)
__acquires(bitlock)
@@ -1061,7 +1061,7 @@ __acquires(bitlock)
printk(KERN_CRIT "EXT4-fs error (device %s): %s:%d: group %u, ",
sb->s_id, function, line, grp);
if (ino)
- printk(KERN_CONT "inode %lu: ", ino);
+ printk(KERN_CONT "inode %llu: ", ino);
if (block)
printk(KERN_CONT "block %llu:",
(unsigned long long) block);
@@ -1170,7 +1170,7 @@ static void dump_orphan_list(struct super_block *sb, struct ext4_sb_info *sbi)
list_for_each(l, &sbi->s_orphan) {
struct inode *inode = orphan_list_entry(l);
printk(KERN_ERR " "
- "inode %s:%lu at %p: mode %o, nlink %d, next %d\n",
+ "inode %s:%llu at %p: mode %o, nlink %d, next %d\n",
inode->i_sb->s_id, inode->i_ino, inode,
inode->i_mode, inode->i_nlink,
NEXT_ORPHAN(inode));
@@ -1446,7 +1446,7 @@ static void ext4_free_in_core_inode(struct inode *inode)
{
fscrypt_free_inode(inode);
if (!list_empty(&(EXT4_I(inode)->i_fc_list))) {
- pr_warn("%s: inode %ld still in fc list",
+ pr_warn("%s: inode %llu still in fc list",
__func__, inode->i_ino);
}
kmem_cache_free(ext4_inode_cachep, EXT4_I(inode));
@@ -1456,7 +1456,7 @@ static void ext4_destroy_inode(struct inode *inode)
{
if (ext4_inode_orphan_tracked(inode)) {
ext4_msg(inode->i_sb, KERN_ERR,
- "Inode %lu (%p): inode tracked as orphan!",
+ "Inode %llu (%p): inode tracked as orphan!",
inode->i_ino, EXT4_I(inode));
print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS, 16, 4,
EXT4_I(inode), sizeof(struct ext4_inode_info),
@@ -1467,7 +1467,7 @@ static void ext4_destroy_inode(struct inode *inode)
if (!(EXT4_SB(inode->i_sb)->s_mount_state & EXT4_ERROR_FS) &&
WARN_ON_ONCE(EXT4_I(inode)->i_reserved_data_blocks))
ext4_msg(inode->i_sb, KERN_ERR,
- "Inode %lu (%p): i_reserved_data_blocks (%u) not cleared!",
+ "Inode %llu (%p): i_reserved_data_blocks (%u) not cleared!",
inode->i_ino, EXT4_I(inode),
EXT4_I(inode)->i_reserved_data_blocks);
}
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 7bf9ba19a89db2cd9e9536191eb904afe4c5f5d8..60aec4712f7fc52a8cc8ce31e4d5bd740a193903 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -64,7 +64,7 @@
#ifdef EXT4_XATTR_DEBUG
# define ea_idebug(inode, fmt, ...) \
- printk(KERN_DEBUG "inode %s:%lu: " fmt "\n", \
+ printk(KERN_DEBUG "inode %s:%llu: " fmt "\n", \
inode->i_sb->s_id, inode->i_ino, ##__VA_ARGS__)
# define ea_bdebug(bh, fmt, ...) \
printk(KERN_DEBUG "block %pg:%lu: " fmt "\n", \
@@ -1035,7 +1035,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
ref_count = ext4_xattr_inode_get_ref(ea_inode);
if ((ref_count == 0 && ref_change < 0) || (ref_count == U64_MAX && ref_change > 0)) {
ext4_error_inode(ea_inode, __func__, __LINE__, 0,
- "EA inode %lu ref wraparound: ref_count=%lld ref_change=%d",
+ "EA inode %llu ref wraparound: ref_count=%lld ref_change=%d",
ea_inode->i_ino, ref_count, ref_change);
brelse(iloc.bh);
ret = -EFSCORRUPTED;
@@ -1046,7 +1046,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
if (ref_change > 0) {
if (ref_count == 1) {
- WARN_ONCE(ea_inode->i_nlink, "EA inode %lu i_nlink=%u",
+ WARN_ONCE(ea_inode->i_nlink, "EA inode %llu i_nlink=%u",
ea_inode->i_ino, ea_inode->i_nlink);
set_nlink(ea_inode, 1);
@@ -1055,7 +1055,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode,
} else {
if (ref_count == 0) {
WARN_ONCE(ea_inode->i_nlink != 1,
- "EA inode %lu i_nlink=%u",
+ "EA inode %llu i_nlink=%u",
ea_inode->i_ino, ea_inode->i_nlink);
clear_nlink(ea_inode);
@@ -2854,7 +2854,7 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
cleanup:
if (error && (mnt_count != le16_to_cpu(sbi->s_es->s_mnt_count))) {
- ext4_warning(inode->i_sb, "Unable to expand inode %lu. Delete some EAs or run e2fsck.",
+ ext4_warning(inode->i_sb, "Unable to expand inode %llu. Delete some EAs or run e2fsck.",
inode->i_ino);
mnt_count = le16_to_cpu(sbi->s_es->s_mnt_count);
}
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index a3e8fe414df85c53e8aa15836ab93c3ae514c815..2f8b44d16df196f1439ed7f01160779a9fc4d14c 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -144,8 +144,8 @@ TRACE_EVENT(ext4_other_inode_update_time,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, orig_ino )
+ __field( u64, ino )
+ __field( u64, orig_ino )
__field( uid_t, uid )
__field( gid_t, gid )
__field( __u16, mode )
@@ -160,10 +160,10 @@ TRACE_EVENT(ext4_other_inode_update_time,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d orig_ino %lu ino %lu mode 0%o uid %u gid %u",
+ TP_printk("dev %d,%d orig_ino %llu ino %llu mode 0%o uid %u gid %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->orig_ino,
- (unsigned long) __entry->ino, __entry->mode,
+ (unsigned long long) __entry->orig_ino,
+ (unsigned long long) __entry->ino, __entry->mode,
__entry->uid, __entry->gid)
);
@@ -174,7 +174,7 @@ TRACE_EVENT(ext4_free_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( uid_t, uid )
__field( gid_t, gid )
__field( __u64, blocks )
@@ -190,9 +190,9 @@ TRACE_EVENT(ext4_free_inode,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
+ TP_printk("dev %d,%d ino %llu mode 0%o uid %u gid %u blocks %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->mode,
+ (unsigned long long) __entry->ino, __entry->mode,
__entry->uid, __entry->gid, __entry->blocks)
);
@@ -203,7 +203,7 @@ TRACE_EVENT(ext4_request_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, dir )
+ __field( u64, dir )
__field( __u16, mode )
),
@@ -213,9 +213,9 @@ TRACE_EVENT(ext4_request_inode,
__entry->mode = mode;
),
- TP_printk("dev %d,%d dir %lu mode 0%o",
+ TP_printk("dev %d,%d dir %llu mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->dir, __entry->mode)
+ (unsigned long long) __entry->dir, __entry->mode)
);
TRACE_EVENT(ext4_allocate_inode,
@@ -225,8 +225,8 @@ TRACE_EVENT(ext4_allocate_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, dir )
+ __field( u64, ino )
+ __field( u64, dir )
__field( __u16, mode )
),
@@ -237,10 +237,10 @@ TRACE_EVENT(ext4_allocate_inode,
__entry->mode = mode;
),
- TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
+ TP_printk("dev %d,%d ino %llu dir %llu mode 0%o",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
- (unsigned long) __entry->dir, __entry->mode)
+ (unsigned long long) __entry->ino,
+ (unsigned long long) __entry->dir, __entry->mode)
);
TRACE_EVENT(ext4_evict_inode,
@@ -250,7 +250,7 @@ TRACE_EVENT(ext4_evict_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, nlink )
),
@@ -260,9 +260,9 @@ TRACE_EVENT(ext4_evict_inode,
__entry->nlink = inode->i_nlink;
),
- TP_printk("dev %d,%d ino %lu nlink %d",
+ TP_printk("dev %d,%d ino %llu nlink %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->nlink)
+ (unsigned long long) __entry->ino, __entry->nlink)
);
TRACE_EVENT(ext4_drop_inode,
@@ -272,7 +272,7 @@ TRACE_EVENT(ext4_drop_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, drop )
),
@@ -282,9 +282,9 @@ TRACE_EVENT(ext4_drop_inode,
__entry->drop = drop;
),
- TP_printk("dev %d,%d ino %lu drop %d",
+ TP_printk("dev %d,%d ino %llu drop %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->drop)
+ (unsigned long long) __entry->ino, __entry->drop)
);
TRACE_EVENT(ext4_nfs_commit_metadata,
@@ -294,7 +294,7 @@ TRACE_EVENT(ext4_nfs_commit_metadata,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
),
TP_fast_assign(
@@ -302,9 +302,9 @@ TRACE_EVENT(ext4_nfs_commit_metadata,
__entry->ino = inode->i_ino;
),
- TP_printk("dev %d,%d ino %lu",
+ TP_printk("dev %d,%d ino %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino)
+ (unsigned long long) __entry->ino)
);
TRACE_EVENT(ext4_mark_inode_dirty,
@@ -314,7 +314,7 @@ TRACE_EVENT(ext4_mark_inode_dirty,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field(unsigned long, ip )
),
@@ -324,9 +324,9 @@ TRACE_EVENT(ext4_mark_inode_dirty,
__entry->ip = IP;
),
- TP_printk("dev %d,%d ino %lu caller %pS",
+ TP_printk("dev %d,%d ino %llu caller %pS",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, (void *)__entry->ip)
+ (unsigned long long) __entry->ino, (void *)__entry->ip)
);
TRACE_EVENT(ext4_begin_ordered_truncate,
@@ -336,7 +336,7 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, new_size )
),
@@ -346,9 +346,9 @@ TRACE_EVENT(ext4_begin_ordered_truncate,
__entry->new_size = new_size;
),
- TP_printk("dev %d,%d ino %lu new_size %lld",
+ TP_printk("dev %d,%d ino %llu new_size %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->new_size)
);
@@ -360,7 +360,7 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, pos )
__field( unsigned int, len )
),
@@ -372,9 +372,9 @@ DECLARE_EVENT_CLASS(ext4__write_begin,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu pos %lld len %u",
+ TP_printk("dev %d,%d ino %llu pos %lld len %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pos, __entry->len)
);
@@ -400,7 +400,7 @@ DECLARE_EVENT_CLASS(ext4__write_end,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, pos )
__field( unsigned int, len )
__field( unsigned int, copied )
@@ -414,9 +414,9 @@ DECLARE_EVENT_CLASS(ext4__write_end,
__entry->copied = copied;
),
- TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
+ TP_printk("dev %d,%d ino %llu pos %lld len %u copied %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pos, __entry->len, __entry->copied)
);
@@ -451,7 +451,7 @@ TRACE_EVENT(ext4_writepages,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( long, nr_to_write )
__field( long, pages_skipped )
__field( loff_t, range_start )
@@ -475,11 +475,11 @@ TRACE_EVENT(ext4_writepages,
__entry->range_cyclic = wbc->range_cyclic;
),
- TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
+ TP_printk("dev %d,%d ino %llu nr_to_write %ld pages_skipped %ld "
"range_start %lld range_end %lld sync_mode %d "
"for_kupdate %d range_cyclic %d writeback_index %lu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->nr_to_write,
+ (unsigned long long) __entry->ino, __entry->nr_to_write,
__entry->pages_skipped, __entry->range_start,
__entry->range_end, __entry->sync_mode,
__entry->for_kupdate, __entry->range_cyclic,
@@ -494,7 +494,7 @@ TRACE_EVENT(ext4_da_write_folios_start,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, start_pos )
__field( loff_t, next_pos )
__field( long, nr_to_write )
@@ -510,9 +510,9 @@ TRACE_EVENT(ext4_da_write_folios_start,
__entry->sync_mode = wbc->sync_mode;
),
- TP_printk("dev %d,%d ino %lu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld sync_mode %d",
+ TP_printk("dev %d,%d ino %llu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld sync_mode %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->start_pos, __entry->next_pos,
+ (unsigned long long) __entry->ino, __entry->start_pos, __entry->next_pos,
__entry->nr_to_write, __entry->sync_mode)
);
@@ -524,7 +524,7 @@ TRACE_EVENT(ext4_da_write_folios_end,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, start_pos )
__field( loff_t, next_pos )
__field( long, nr_to_write )
@@ -540,9 +540,9 @@ TRACE_EVENT(ext4_da_write_folios_end,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld ret %d",
+ TP_printk("dev %d,%d ino %llu start_pos 0x%llx next_pos 0x%llx nr_to_write %ld ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->start_pos, __entry->next_pos,
+ (unsigned long long) __entry->ino, __entry->start_pos, __entry->next_pos,
__entry->nr_to_write, __entry->ret)
);
@@ -553,7 +553,7 @@ TRACE_EVENT(ext4_da_write_pages_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, lblk )
__field( __u32, len )
__field( __u32, flags )
@@ -567,9 +567,9 @@ TRACE_EVENT(ext4_da_write_pages_extent,
__entry->flags = map->m_flags;
),
- TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s",
+ TP_printk("dev %d,%d ino %llu lblk %llu len %u flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->lblk, __entry->len,
+ (unsigned long long) __entry->ino, __entry->lblk, __entry->len,
show_mflags(__entry->flags))
);
@@ -581,7 +581,7 @@ TRACE_EVENT(ext4_writepages_result,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, ret )
__field( int, pages_written )
__field( long, pages_skipped )
@@ -599,10 +599,10 @@ TRACE_EVENT(ext4_writepages_result,
__entry->sync_mode = wbc->sync_mode;
),
- TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
+ TP_printk("dev %d,%d ino %llu ret %d pages_written %d pages_skipped %ld "
"sync_mode %d writeback_index %lu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->ret,
+ (unsigned long long) __entry->ino, __entry->ret,
__entry->pages_written, __entry->pages_skipped,
__entry->sync_mode,
(unsigned long) __entry->writeback_index)
@@ -615,7 +615,7 @@ DECLARE_EVENT_CLASS(ext4__folio_op,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( pgoff_t, index )
),
@@ -626,9 +626,9 @@ DECLARE_EVENT_CLASS(ext4__folio_op,
__entry->index = folio->index;
),
- TP_printk("dev %d,%d ino %lu folio_index %lu",
+ TP_printk("dev %d,%d ino %llu folio_index %lu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned long) __entry->index)
);
@@ -653,7 +653,7 @@ DECLARE_EVENT_CLASS(ext4_invalidate_folio_op,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( pgoff_t, index )
__field( size_t, offset )
__field( size_t, length )
@@ -667,9 +667,9 @@ DECLARE_EVENT_CLASS(ext4_invalidate_folio_op,
__entry->length = length;
),
- TP_printk("dev %d,%d ino %lu folio_index %lu offset %zu length %zu",
+ TP_printk("dev %d,%d ino %llu folio_index %lu offset %zu length %zu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned long) __entry->index,
__entry->offset, __entry->length)
);
@@ -718,7 +718,7 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, pa_pstart )
__field( __u64, pa_lstart )
__field( __u32, pa_len )
@@ -733,9 +733,9 @@ DECLARE_EVENT_CLASS(ext4__mb_new_pa,
__entry->pa_len = pa->pa_len;
),
- TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
+ TP_printk("dev %d,%d ino %llu pstart %llu len %u lstart %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
);
@@ -763,7 +763,7 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( __u32, count )
@@ -776,9 +776,9 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
__entry->count = count;
),
- TP_printk("dev %d,%d ino %lu block %llu count %u",
+ TP_printk("dev %d,%d ino %llu block %llu count %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->block, __entry->count)
);
@@ -812,7 +812,7 @@ TRACE_EVENT(ext4_discard_preallocations,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, len )
),
@@ -823,9 +823,9 @@ TRACE_EVENT(ext4_discard_preallocations,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu len: %u",
+ TP_printk("dev %d,%d ino %llu len: %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->len)
+ (unsigned long long) __entry->ino, __entry->len)
);
TRACE_EVENT(ext4_mb_discard_preallocations,
@@ -856,7 +856,7 @@ TRACE_EVENT(ext4_request_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, len )
__field( __u32, logical )
__field( __u32, lleft )
@@ -880,10 +880,10 @@ TRACE_EVENT(ext4_request_blocks,
__entry->flags = ar->flags;
),
- TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu "
+ TP_printk("dev %d,%d ino %llu flags %s len %u lblk %u goal %llu "
"lleft %u lright %u pleft %llu pright %llu ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
+ (unsigned long long) __entry->ino, show_mballoc_flags(__entry->flags),
__entry->len, __entry->logical, __entry->goal,
__entry->lleft, __entry->lright, __entry->pleft,
__entry->pright)
@@ -896,7 +896,7 @@ TRACE_EVENT(ext4_allocate_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( unsigned int, len )
__field( __u32, logical )
@@ -922,10 +922,10 @@ TRACE_EVENT(ext4_allocate_blocks,
__entry->flags = ar->flags;
),
- TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u "
+ TP_printk("dev %d,%d ino %llu flags %s len %u block %llu lblk %u "
"goal %llu lleft %u lright %u pleft %llu pright %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
+ (unsigned long long) __entry->ino, show_mballoc_flags(__entry->flags),
__entry->len, __entry->block, __entry->logical,
__entry->goal, __entry->lleft, __entry->lright,
__entry->pleft, __entry->pright)
@@ -939,7 +939,7 @@ TRACE_EVENT(ext4_free_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( unsigned long, count )
__field( int, flags )
@@ -955,9 +955,9 @@ TRACE_EVENT(ext4_free_blocks,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s",
+ TP_printk("dev %d,%d ino %llu mode 0%o block %llu count %lu flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->block, __entry->count,
show_free_flags(__entry->flags))
);
@@ -969,8 +969,8 @@ TRACE_EVENT(ext4_sync_file_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, parent )
+ __field( u64, ino )
+ __field( u64, parent )
__field( int, datasync )
),
@@ -983,10 +983,10 @@ TRACE_EVENT(ext4_sync_file_enter,
__entry->parent = d_inode(dentry->d_parent)->i_ino;
),
- TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
+ TP_printk("dev %d,%d ino %llu parent %llu datasync %d ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
- (unsigned long) __entry->parent, __entry->datasync)
+ (unsigned long long) __entry->ino,
+ (unsigned long long) __entry->parent, __entry->datasync)
);
TRACE_EVENT(ext4_sync_file_exit,
@@ -996,7 +996,7 @@ TRACE_EVENT(ext4_sync_file_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, ret )
),
@@ -1006,9 +1006,9 @@ TRACE_EVENT(ext4_sync_file_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu ret %d",
+ TP_printk("dev %d,%d ino %llu ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->ret)
);
@@ -1040,7 +1040,7 @@ TRACE_EVENT(ext4_alloc_da_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, data_blocks )
),
@@ -1050,9 +1050,9 @@ TRACE_EVENT(ext4_alloc_da_blocks,
__entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
),
- TP_printk("dev %d,%d ino %lu reserved_data_blocks %u",
+ TP_printk("dev %d,%d ino %llu reserved_data_blocks %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->data_blocks)
);
@@ -1063,7 +1063,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u32, orig_logical )
__field( int, orig_start )
__field( __u32, orig_group )
@@ -1107,11 +1107,11 @@ TRACE_EVENT(ext4_mballoc_alloc,
__entry->cr = ac->ac_criteria;
),
- TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
+ TP_printk("dev %d,%d inode %llu orig %u/%d/%u@%u goal %u/%d/%u@%u "
"result %u/%d/%u@%u blks %u grps %u cr %s flags %s "
"tail %u broken %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->orig_group, __entry->orig_start,
__entry->orig_len, __entry->orig_logical,
__entry->goal_group, __entry->goal_start,
@@ -1130,7 +1130,7 @@ TRACE_EVENT(ext4_mballoc_prealloc,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u32, orig_logical )
__field( int, orig_start )
__field( __u32, orig_group )
@@ -1154,9 +1154,9 @@ TRACE_EVENT(ext4_mballoc_prealloc,
__entry->result_len = ac->ac_b_ex.fe_len;
),
- TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
+ TP_printk("dev %d,%d inode %llu orig %u/%d/%u@%u result %u/%d/%u@%u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->orig_group, __entry->orig_start,
__entry->orig_len, __entry->orig_logical,
__entry->result_group, __entry->result_start,
@@ -1174,7 +1174,7 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, result_start )
__field( __u32, result_group )
__field( int, result_len )
@@ -1188,9 +1188,9 @@ DECLARE_EVENT_CLASS(ext4__mballoc,
__entry->result_len = len;
),
- TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
+ TP_printk("dev %d,%d inode %llu extent %u/%d/%d ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->result_group, __entry->result_start,
__entry->result_len)
);
@@ -1224,7 +1224,7 @@ TRACE_EVENT(ext4_forget,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, block )
__field( int, is_metadata )
__field( __u16, mode )
@@ -1238,9 +1238,9 @@ TRACE_EVENT(ext4_forget,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
+ TP_printk("dev %d,%d ino %llu mode 0%o is_metadata %d block %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->is_metadata, __entry->block)
);
@@ -1251,7 +1251,7 @@ TRACE_EVENT(ext4_da_update_reserve_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, i_blocks )
__field( int, used_blocks )
__field( int, reserved_data_blocks )
@@ -1270,10 +1270,10 @@ TRACE_EVENT(ext4_da_update_reserve_space,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
+ TP_printk("dev %d,%d ino %llu mode 0%o i_blocks %llu used_blocks %d "
"reserved_data_blocks %d quota_claim %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->i_blocks,
__entry->used_blocks, __entry->reserved_data_blocks,
__entry->quota_claim)
@@ -1286,7 +1286,7 @@ TRACE_EVENT(ext4_da_reserve_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, i_blocks )
__field( int, reserve_blocks )
__field( int, reserved_data_blocks )
@@ -1302,10 +1302,10 @@ TRACE_EVENT(ext4_da_reserve_space,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu reserve_blocks %d"
+ TP_printk("dev %d,%d ino %llu mode 0%o i_blocks %llu reserve_blocks %d"
"reserved_data_blocks %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->i_blocks,
__entry->reserve_blocks, __entry->reserved_data_blocks)
);
@@ -1317,7 +1317,7 @@ TRACE_EVENT(ext4_da_release_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, i_blocks )
__field( int, freed_blocks )
__field( int, reserved_data_blocks )
@@ -1333,10 +1333,10 @@ TRACE_EVENT(ext4_da_release_space,
__entry->mode = inode->i_mode;
),
- TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
+ TP_printk("dev %d,%d ino %llu mode 0%o i_blocks %llu freed_blocks %d "
"reserved_data_blocks %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->mode, __entry->i_blocks,
__entry->freed_blocks, __entry->reserved_data_blocks)
);
@@ -1413,7 +1413,7 @@ DECLARE_EVENT_CLASS(ext4__fallocate_mode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, offset )
__field( loff_t, len )
__field( int, mode )
@@ -1427,9 +1427,9 @@ DECLARE_EVENT_CLASS(ext4__fallocate_mode,
__entry->mode = mode;
),
- TP_printk("dev %d,%d ino %lu offset %lld len %lld mode %s",
+ TP_printk("dev %d,%d ino %llu offset %lld len %lld mode %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->len,
show_falloc_mode(__entry->mode))
);
@@ -1463,7 +1463,7 @@ TRACE_EVENT(ext4_fallocate_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, pos )
__field( unsigned int, blocks )
__field( int, ret )
@@ -1477,9 +1477,9 @@ TRACE_EVENT(ext4_fallocate_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
+ TP_printk("dev %d,%d ino %llu pos %lld blocks %u ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->pos, __entry->blocks,
__entry->ret)
);
@@ -1491,8 +1491,8 @@ TRACE_EVENT(ext4_unlink_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
- __field( ino_t, parent )
+ __field( u64, ino )
+ __field( u64, parent )
__field( loff_t, size )
),
@@ -1503,10 +1503,10 @@ TRACE_EVENT(ext4_unlink_enter,
__entry->size = d_inode(dentry)->i_size;
),
- TP_printk("dev %d,%d ino %lu size %lld parent %lu",
+ TP_printk("dev %d,%d ino %llu size %lld parent %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->size,
- (unsigned long) __entry->parent)
+ (unsigned long long) __entry->ino, __entry->size,
+ (unsigned long long) __entry->parent)
);
TRACE_EVENT(ext4_unlink_exit,
@@ -1516,7 +1516,7 @@ TRACE_EVENT(ext4_unlink_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, ret )
),
@@ -1526,9 +1526,9 @@ TRACE_EVENT(ext4_unlink_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu ret %d",
+ TP_printk("dev %d,%d ino %llu ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->ret)
);
@@ -1539,7 +1539,7 @@ DECLARE_EVENT_CLASS(ext4__truncate,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( __u64, blocks )
),
@@ -1549,9 +1549,9 @@ DECLARE_EVENT_CLASS(ext4__truncate,
__entry->blocks = inode->i_blocks;
),
- TP_printk("dev %d,%d ino %lu blocks %llu",
+ TP_printk("dev %d,%d ino %llu blocks %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->blocks)
+ (unsigned long long) __entry->ino, __entry->blocks)
);
DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
@@ -1577,7 +1577,7 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, m_lblk )
__field( unsigned, m_len )
__field( ext4_lblk_t, u_lblk )
@@ -1595,10 +1595,10 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
__entry->u_pblk = ext4_ext_pblock(ux);
),
- TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
+ TP_printk("dev %d,%d ino %llu m_lblk %u m_len %u u_lblk %u u_len %u "
"u_pblk %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->m_lblk, __entry->m_len,
__entry->u_lblk, __entry->u_len, __entry->u_pblk)
);
@@ -1615,7 +1615,7 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, m_lblk )
__field( unsigned, m_len )
__field( ext4_lblk_t, u_lblk )
@@ -1639,11 +1639,11 @@ TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
__entry->i_pblk = ext4_ext_pblock(ix);
),
- TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
+ TP_printk("dev %d,%d ino %llu m_lblk %u m_len %u "
"u_lblk %u u_len %u u_pblk %llu "
"i_lblk %u i_len %u i_pblk %llu ",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->m_lblk, __entry->m_len,
__entry->u_lblk, __entry->u_len, __entry->u_pblk,
__entry->i_lblk, __entry->i_len, __entry->i_pblk)
@@ -1657,7 +1657,7 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( unsigned int, len )
__field( unsigned int, flags )
@@ -1671,9 +1671,9 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
__entry->flags = flags;
),
- TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s",
+ TP_printk("dev %d,%d ino %llu lblk %u len %u flags %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len, show_map_flags(__entry->flags))
);
@@ -1699,7 +1699,7 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( unsigned int, flags )
__field( ext4_fsblk_t, pblk )
__field( ext4_lblk_t, lblk )
@@ -1719,10 +1719,10 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u "
+ TP_printk("dev %d,%d ino %llu flags %s lblk %u pblk %llu len %u "
"mflags %s ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
show_map_flags(__entry->flags), __entry->lblk, __entry->pblk,
__entry->len, show_mflags(__entry->mflags), __entry->ret)
);
@@ -1748,7 +1748,7 @@ TRACE_EVENT(ext4_ext_load_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_fsblk_t, pblk )
__field( ext4_lblk_t, lblk )
),
@@ -1760,9 +1760,9 @@ TRACE_EVENT(ext4_ext_load_extent,
__entry->lblk = lblk;
),
- TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
+ TP_printk("dev %d,%d ino %llu lblk %u pblk %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->pblk)
);
@@ -1773,7 +1773,7 @@ TRACE_EVENT(ext4_load_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
),
TP_fast_assign(
@@ -1781,9 +1781,9 @@ TRACE_EVENT(ext4_load_inode,
__entry->ino = ino;
),
- TP_printk("dev %d,%d ino %ld",
+ TP_printk("dev %d,%d ino %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino)
+ (unsigned long long) __entry->ino)
);
TRACE_EVENT(ext4_journal_start_sb,
@@ -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( u64, ino )
__field( dev_t, dev )
__field( unsigned long, ip )
__field( int, blocks )
@@ -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),
+ " type %d, ino %llu, caller %pS", MAJOR(__entry->dev),
MINOR(__entry->dev), __entry->blocks, __entry->rsv_blocks,
- __entry->revoke_creds, __entry->type, __entry->ino,
+ __entry->revoke_creds, __entry->type,
+ (unsigned long long) __entry->ino,
(void *)__entry->ip)
);
@@ -1928,7 +1929,7 @@ TRACE_EVENT(ext4_ext_handle_unwritten_extents,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( int, flags )
__field( ext4_lblk_t, lblk )
__field( ext4_fsblk_t, pblk )
@@ -1948,10 +1949,10 @@ TRACE_EVENT(ext4_ext_handle_unwritten_extents,
__entry->newblk = newblock;
),
- TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s "
+ TP_printk("dev %d,%d ino %llu m_lblk %u m_pblk %llu m_len %u flags %s "
"allocated %d newblock %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
__entry->len, show_map_flags(__entry->flags),
(unsigned int) __entry->allocated,
@@ -1995,7 +1996,7 @@ TRACE_EVENT(ext4_ext_show_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_fsblk_t, pblk )
__field( ext4_lblk_t, lblk )
__field( unsigned short, len )
@@ -2009,9 +2010,9 @@ TRACE_EVENT(ext4_ext_show_extent,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
+ TP_printk("dev %d,%d ino %llu lblk %u pblk %llu len %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->lblk,
(unsigned long long) __entry->pblk,
(unsigned short) __entry->len)
@@ -2026,7 +2027,7 @@ TRACE_EVENT(ext4_remove_blocks,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, from )
__field( ext4_lblk_t, to )
__field( ext4_fsblk_t, ee_pblk )
@@ -2050,10 +2051,10 @@ TRACE_EVENT(ext4_remove_blocks,
__entry->pc_state = pc->state;
),
- TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
+ TP_printk("dev %d,%d ino %llu extent [%u(%llu), %u]"
"from %u to %u partial [pclu %lld lblk %u state %d]",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->ee_lblk,
(unsigned long long) __entry->ee_pblk,
(unsigned short) __entry->ee_len,
@@ -2073,7 +2074,7 @@ TRACE_EVENT(ext4_ext_rm_leaf,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, start )
__field( ext4_lblk_t, ee_lblk )
__field( ext4_fsblk_t, ee_pblk )
@@ -2095,10 +2096,10 @@ TRACE_EVENT(ext4_ext_rm_leaf,
__entry->pc_state = pc->state;
),
- TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
+ TP_printk("dev %d,%d ino %llu start_lblk %u last_extent [%u(%llu), %u]"
"partial [pclu %lld lblk %u state %d]",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->start,
(unsigned) __entry->ee_lblk,
(unsigned long long) __entry->ee_pblk,
@@ -2115,7 +2116,7 @@ TRACE_EVENT(ext4_ext_rm_idx,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_fsblk_t, pblk )
),
@@ -2125,9 +2126,9 @@ TRACE_EVENT(ext4_ext_rm_idx,
__entry->pblk = pblk;
),
- TP_printk("dev %d,%d ino %lu index_pblk %llu",
+ TP_printk("dev %d,%d ino %llu index_pblk %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned long long) __entry->pblk)
);
@@ -2139,7 +2140,7 @@ TRACE_EVENT(ext4_ext_remove_space,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, start )
__field( ext4_lblk_t, end )
__field( int, depth )
@@ -2153,9 +2154,9 @@ TRACE_EVENT(ext4_ext_remove_space,
__entry->depth = depth;
),
- TP_printk("dev %d,%d ino %lu since %u end %u depth %d",
+ TP_printk("dev %d,%d ino %llu since %u end %u depth %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->start,
(unsigned) __entry->end,
__entry->depth)
@@ -2169,7 +2170,7 @@ TRACE_EVENT(ext4_ext_remove_space_done,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, start )
__field( ext4_lblk_t, end )
__field( int, depth )
@@ -2191,11 +2192,11 @@ TRACE_EVENT(ext4_ext_remove_space_done,
__entry->eh_entries = le16_to_cpu(eh_entries);
),
- TP_printk("dev %d,%d ino %lu since %u end %u depth %d "
+ TP_printk("dev %d,%d ino %llu since %u end %u depth %d "
"partial [pclu %lld lblk %u state %d] "
"remaining_entries %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
(unsigned) __entry->start,
(unsigned) __entry->end,
__entry->depth,
@@ -2212,7 +2213,7 @@ DECLARE_EVENT_CLASS(ext4__es_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2230,9 +2231,9 @@ DECLARE_EVENT_CLASS(ext4__es_extent,
__entry->seq = EXT4_I(inode)->i_es_seq;
),
- TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s seq %llu",
+ TP_printk("dev %d,%d ino %llu es [%u/%u) mapped %llu status %s seq %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len,
__entry->pblk, show_extent_status(__entry->status),
__entry->seq)
@@ -2257,7 +2258,7 @@ TRACE_EVENT(ext4_es_remove_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( loff_t, lblk )
__field( loff_t, len )
__field( u64, seq )
@@ -2271,9 +2272,9 @@ TRACE_EVENT(ext4_es_remove_extent,
__entry->seq = EXT4_I(inode)->i_es_seq;
),
- TP_printk("dev %d,%d ino %lu es [%lld/%lld) seq %llu",
+ TP_printk("dev %d,%d ino %llu es [%lld/%lld) seq %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len, __entry->seq)
);
@@ -2284,7 +2285,7 @@ TRACE_EVENT(ext4_es_find_extent_range_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
),
@@ -2294,9 +2295,9 @@ TRACE_EVENT(ext4_es_find_extent_range_enter,
__entry->lblk = lblk;
),
- TP_printk("dev %d,%d ino %lu lblk %u",
+ TP_printk("dev %d,%d ino %llu lblk %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->lblk)
+ (unsigned long long) __entry->ino, __entry->lblk)
);
TRACE_EVENT(ext4_es_find_extent_range_exit,
@@ -2306,7 +2307,7 @@ TRACE_EVENT(ext4_es_find_extent_range_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2322,9 +2323,9 @@ TRACE_EVENT(ext4_es_find_extent_range_exit,
__entry->status = ext4_es_status(es);
),
- TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
+ TP_printk("dev %d,%d ino %llu es [%u/%u) mapped %llu status %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len,
__entry->pblk, show_extent_status(__entry->status))
);
@@ -2336,7 +2337,7 @@ TRACE_EVENT(ext4_es_lookup_extent_enter,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
),
@@ -2346,9 +2347,9 @@ TRACE_EVENT(ext4_es_lookup_extent_enter,
__entry->lblk = lblk;
),
- TP_printk("dev %d,%d ino %lu lblk %u",
+ TP_printk("dev %d,%d ino %llu lblk %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->lblk)
+ (unsigned long long) __entry->ino, __entry->lblk)
);
TRACE_EVENT(ext4_es_lookup_extent_exit,
@@ -2359,7 +2360,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2377,9 +2378,9 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
__entry->found = found;
),
- TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s",
+ TP_printk("dev %d,%d ino %llu found %d [%u/%u) %llu %s",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino, __entry->found,
+ (unsigned long long) __entry->ino, __entry->found,
__entry->lblk, __entry->len,
__entry->found ? __entry->pblk : 0,
show_extent_status(__entry->found ? __entry->status : 0))
@@ -2448,7 +2449,7 @@ TRACE_EVENT(ext4_collapse_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, offset)
__field(loff_t, len)
),
@@ -2460,9 +2461,9 @@ TRACE_EVENT(ext4_collapse_range,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu offset %lld len %lld",
+ TP_printk("dev %d,%d ino %llu offset %lld len %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->len)
);
@@ -2473,7 +2474,7 @@ TRACE_EVENT(ext4_insert_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, offset)
__field(loff_t, len)
),
@@ -2485,9 +2486,9 @@ TRACE_EVENT(ext4_insert_range,
__entry->len = len;
),
- TP_printk("dev %d,%d ino %lu offset %lld len %lld",
+ TP_printk("dev %d,%d ino %llu offset %lld len %lld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->len)
);
@@ -2527,7 +2528,7 @@ TRACE_EVENT(ext4_es_insert_delayed_extent,
TP_STRUCT__entry(
__field( dev_t, dev )
- __field( ino_t, ino )
+ __field( u64, ino )
__field( ext4_lblk_t, lblk )
__field( ext4_lblk_t, len )
__field( ext4_fsblk_t, pblk )
@@ -2549,9 +2550,9 @@ TRACE_EVENT(ext4_es_insert_delayed_extent,
__entry->seq = EXT4_I(inode)->i_es_seq;
),
- TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s allocated %d %d seq %llu",
+ TP_printk("dev %d,%d ino %llu es [%u/%u) mapped %llu status %s allocated %d %d seq %llu",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->ino,
+ (unsigned long long) __entry->ino,
__entry->lblk, __entry->len,
__entry->pblk, show_extent_status(__entry->status),
__entry->lclu_allocated, __entry->end_allocated,
@@ -2877,7 +2878,7 @@ DECLARE_EVENT_CLASS(ext4_fc_track_dentry,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(tid_t, t_tid)
- __field(ino_t, i_ino)
+ __field(u64, i_ino)
__field(tid_t, i_sync_tid)
__field(int, error)
),
@@ -2892,9 +2893,9 @@ DECLARE_EVENT_CLASS(ext4_fc_track_dentry,
__entry->error = ret;
),
- TP_printk("dev %d,%d, t_tid %u, ino %lu, i_sync_tid %u, error %d",
+ TP_printk("dev %d,%d, t_tid %u, ino %llu, i_sync_tid %u, error %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->t_tid, __entry->i_ino, __entry->i_sync_tid,
+ __entry->t_tid, (unsigned long long) __entry->i_ino, __entry->i_sync_tid,
__entry->error
)
);
@@ -2918,7 +2919,7 @@ TRACE_EVENT(ext4_fc_track_inode,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(tid_t, t_tid)
- __field(ino_t, i_ino)
+ __field(u64, i_ino)
__field(tid_t, i_sync_tid)
__field(int, error)
),
@@ -2933,9 +2934,9 @@ TRACE_EVENT(ext4_fc_track_inode,
__entry->error = ret;
),
- TP_printk("dev %d:%d, t_tid %u, inode %lu, i_sync_tid %u, error %d",
+ TP_printk("dev %d:%d, t_tid %u, inode %llu, i_sync_tid %u, error %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->t_tid, __entry->i_ino, __entry->i_sync_tid,
+ __entry->t_tid, (unsigned long long) __entry->i_ino, __entry->i_sync_tid,
__entry->error)
);
@@ -2948,7 +2949,7 @@ TRACE_EVENT(ext4_fc_track_range,
TP_STRUCT__entry(
__field(dev_t, dev)
__field(tid_t, t_tid)
- __field(ino_t, i_ino)
+ __field(u64, i_ino)
__field(tid_t, i_sync_tid)
__field(long, start)
__field(long, end)
@@ -2967,9 +2968,9 @@ TRACE_EVENT(ext4_fc_track_range,
__entry->error = ret;
),
- TP_printk("dev %d:%d, t_tid %u, inode %lu, i_sync_tid %u, error %d, start %ld, end %ld",
+ TP_printk("dev %d:%d, t_tid %u, inode %llu, i_sync_tid %u, error %d, start %ld, end %ld",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->t_tid, __entry->i_ino, __entry->i_sync_tid,
+ __entry->t_tid, (unsigned long long) __entry->i_ino, __entry->i_sync_tid,
__entry->error, __entry->start, __entry->end)
);
@@ -3030,10 +3031,10 @@ TRACE_EVENT(ext4_move_extent_enter,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, orig_ino)
+ __field(u64, orig_ino)
__field(ext4_lblk_t, orig_lblk)
__field(unsigned int, orig_flags)
- __field(ino_t, donor_ino)
+ __field(u64, donor_ino)
__field(ext4_lblk_t, donor_lblk)
__field(unsigned int, len)
),
@@ -3048,11 +3049,11 @@ TRACE_EVENT(ext4_move_extent_enter,
__entry->len = orig_map->m_len;
),
- TP_printk("dev %d,%d origin ino %lu lblk %u flags %s donor ino %lu lblk %u len %u",
+ TP_printk("dev %d,%d origin ino %llu lblk %u flags %s donor ino %llu lblk %u len %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->orig_ino, __entry->orig_lblk,
+ (unsigned long long) __entry->orig_ino, __entry->orig_lblk,
show_mflags(__entry->orig_flags),
- (unsigned long) __entry->donor_ino, __entry->donor_lblk,
+ (unsigned long long) __entry->donor_ino, __entry->donor_lblk,
__entry->len)
);
@@ -3066,9 +3067,9 @@ TRACE_EVENT(ext4_move_extent_exit,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, orig_ino)
+ __field(u64, orig_ino)
__field(ext4_lblk_t, orig_lblk)
- __field(ino_t, donor_ino)
+ __field(u64, donor_ino)
__field(ext4_lblk_t, donor_lblk)
__field(unsigned int, m_len)
__field(u64, move_len)
@@ -3088,10 +3089,10 @@ TRACE_EVENT(ext4_move_extent_exit,
__entry->ret = ret;
),
- TP_printk("dev %d,%d origin ino %lu lblk %u donor ino %lu lblk %u m_len %u, move_len %llu type %d ret %d",
+ TP_printk("dev %d,%d origin ino %llu lblk %u donor ino %llu lblk %u m_len %u, move_len %llu type %d ret %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
- (unsigned long) __entry->orig_ino, __entry->orig_lblk,
- (unsigned long) __entry->donor_ino, __entry->donor_lblk,
+ (unsigned long long) __entry->orig_ino, __entry->orig_lblk,
+ (unsigned long long) __entry->donor_ino, __entry->donor_lblk,
__entry->m_len, __entry->move_len, __entry->move_type,
__entry->ret)
);
--
2.53.0
^ permalink raw reply related
* [PATCH 05/61] jbd2: update format strings for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update %lu to %llu in jbd2 debug/warning messages that print i_ino,
since i_ino is now u64.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/jbd2/journal.c | 4 ++--
fs/jbd2/transaction.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index cb2c529a8f1bea33df6d4135e5782b9a77792732..dcb38453fcda1ea666db5c692dc48f90a40e0d7d 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1677,7 +1677,7 @@ journal_t *jbd2_journal_init_inode(struct inode *inode)
return err ? ERR_PTR(err) : ERR_PTR(-EINVAL);
}
- jbd2_debug(1, "JBD2: inode %s/%ld, size %lld, bits %d, blksize %ld\n",
+ jbd2_debug(1, "JBD2: inode %s/%lld, size %lld, bits %d, blksize %ld\n",
inode->i_sb->s_id, inode->i_ino, (long long) inode->i_size,
inode->i_sb->s_blocksize_bits, inode->i_sb->s_blocksize);
@@ -1689,7 +1689,7 @@ journal_t *jbd2_journal_init_inode(struct inode *inode)
journal->j_inode = inode;
snprintf(journal->j_devname, sizeof(journal->j_devname),
- "%pg-%lu", journal->j_dev, journal->j_inode->i_ino);
+ "%pg-%llu", journal->j_dev, journal->j_inode->i_ino);
strreplace(journal->j_devname, '/', '!');
jbd2_stats_proc_init(journal);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index dca4b5d8aaaa3e1505b09fab42eb45bb201a8db8..a90f9092706cceea56c1100f7d40ccba0d50adba 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -2651,7 +2651,7 @@ static int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *jinode,
return -EROFS;
journal = transaction->t_journal;
- jbd2_debug(4, "Adding inode %lu, tid:%d\n", jinode->i_vfs_inode->i_ino,
+ jbd2_debug(4, "Adding inode %llu, tid:%d\n", jinode->i_vfs_inode->i_ino,
transaction->t_tid);
spin_lock(&journal->j_list_lock);
--
2.53.0
^ permalink raw reply related
* [PATCH 06/61] f2fs: update for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update f2fs trace events and filesystem code for u64 i_ino:
- Change __field(ino_t, ...) to __field(u64, ...) in trace events
- Update show_dev_ino() macro format strings from %lu to %llu
- Cast inode numbers to (unsigned long long) in TP_printk
- Update format string in fs/f2fs/node.c
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/f2fs/compress.c | 4 +-
fs/f2fs/dir.c | 2 +-
fs/f2fs/extent_cache.c | 8 +--
fs/f2fs/f2fs.h | 6 +-
fs/f2fs/file.c | 12 ++--
fs/f2fs/gc.c | 2 +-
fs/f2fs/inline.c | 4 +-
fs/f2fs/inode.c | 48 ++++++-------
fs/f2fs/namei.c | 8 +--
fs/f2fs/node.c | 12 ++--
fs/f2fs/recovery.c | 10 +--
fs/f2fs/xattr.c | 10 +--
include/trace/events/f2fs.h | 172 ++++++++++++++++++++++----------------------
13 files changed, 149 insertions(+), 149 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 8c76400ba6317d9b62428a1d7b53a54d7c5d07ef..0b8be500db656f8439725cac2f6a927c2f06ca4f 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -773,7 +773,7 @@ void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task)
if (!is_inode_flag_set(dic->inode, FI_COMPRESS_CORRUPT)) {
set_inode_flag(dic->inode, FI_COMPRESS_CORRUPT);
f2fs_info_ratelimited(sbi,
- "checksum invalid, nid = %lu, %x vs %x",
+ "checksum invalid, nid = %llu, %x vs %x",
dic->inode->i_ino,
provided, calculated);
}
@@ -932,7 +932,7 @@ bool f2fs_sanity_check_cluster(struct dnode_of_data *dn)
return false;
out:
- f2fs_warn(sbi, "access invalid cluster, ino:%lu, nid:%u, ofs_in_node:%u, reason:%s",
+ f2fs_warn(sbi, "access invalid cluster, ino:%llu, nid:%u, ofs_in_node:%u, reason:%s",
dn->inode->i_ino, dn->nid, dn->ofs_in_node, reason);
set_sbi_flag(sbi, SBI_NEED_FSCK);
return true;
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index f70092e231f0f47e589d648b0c6f83ef3aa8fd6c..38802ee2e40deb4995a4e5f4118330b90b2f10e2 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -368,7 +368,7 @@ struct f2fs_dir_entry *__f2fs_find_entry(struct inode *dir,
max_depth = F2FS_I(dir)->i_current_depth;
if (unlikely(max_depth > MAX_DIR_HASH_DEPTH)) {
- f2fs_warn(F2FS_I_SB(dir), "Corrupted max_depth of %lu: %u",
+ f2fs_warn(F2FS_I_SB(dir), "Corrupted max_depth of %llu: %u",
dir->i_ino, max_depth);
max_depth = MAX_DIR_HASH_DEPTH;
f2fs_i_depth_write(dir, max_depth);
diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c
index 0ed84cc065a7eda66c50eae97d70e9ab93de31c3..d73aeef333a24766aaab9914a02b99fbf035e78d 100644
--- a/fs/f2fs/extent_cache.c
+++ b/fs/f2fs/extent_cache.c
@@ -34,7 +34,7 @@ bool sanity_check_extent_cache(struct inode *inode, struct folio *ifolio)
if (!f2fs_is_valid_blkaddr(sbi, ei.blk, DATA_GENERIC_ENHANCE) ||
!f2fs_is_valid_blkaddr(sbi, ei.blk + ei.len - 1,
DATA_GENERIC_ENHANCE)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) extent info [%u, %u, %u] is incorrect, run fsck to fix",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) extent info [%u, %u, %u] is incorrect, run fsck to fix",
__func__, inode->i_ino,
ei.blk, ei.fofs, ei.len);
return false;
@@ -50,14 +50,14 @@ bool sanity_check_extent_cache(struct inode *inode, struct folio *ifolio)
if (devi == 0) {
f2fs_warn(sbi,
- "%s: inode (ino=%lx) is an alias of meta device",
+ "%s: inode (ino=%llx) is an alias of meta device",
__func__, inode->i_ino);
return false;
}
if (bdev_is_zoned(FDEV(devi).bdev)) {
f2fs_warn(sbi,
- "%s: device alias inode (ino=%lx)'s extent info "
+ "%s: device alias inode (ino=%llx)'s extent info "
"[%u, %u, %u] maps to zoned block device",
__func__, inode->i_ino, ei.blk, ei.fofs, ei.len);
return false;
@@ -65,7 +65,7 @@ bool sanity_check_extent_cache(struct inode *inode, struct folio *ifolio)
return true;
}
- f2fs_warn(sbi, "%s: device alias inode (ino=%lx)'s extent info "
+ f2fs_warn(sbi, "%s: device alias inode (ino=%llx)'s extent info "
"[%u, %u, %u] is inconsistent w/ any devices",
__func__, inode->i_ino, ei.blk, ei.fofs, ei.len);
return false;
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index bb34e864d0efc742c651a285c5989bd73530fbe3..760e6d80bbddd8393394c30c740ba05faded332f 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2706,7 +2706,7 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
spin_lock(&sbi->stat_lock);
if (unlikely(sbi->total_valid_block_count < count)) {
- f2fs_warn(sbi, "Inconsistent total_valid_block_count:%u, ino:%lu, count:%u",
+ f2fs_warn(sbi, "Inconsistent total_valid_block_count:%u, ino:%llu, count:%u",
sbi->total_valid_block_count, inode->i_ino, count);
sbi->total_valid_block_count = 0;
set_sbi_flag(sbi, SBI_NEED_FSCK);
@@ -2719,7 +2719,7 @@ static inline void dec_valid_block_count(struct f2fs_sb_info *sbi,
sbi->current_reserved_blocks + count);
spin_unlock(&sbi->stat_lock);
if (unlikely(inode->i_blocks < sectors)) {
- f2fs_warn(sbi, "Inconsistent i_blocks, ino:%lu, iblocks:%llu, sectors:%llu",
+ f2fs_warn(sbi, "Inconsistent i_blocks, ino:%llu, iblocks:%llu, sectors:%llu",
inode->i_ino,
(unsigned long long)inode->i_blocks,
(unsigned long long)sectors);
@@ -2993,7 +2993,7 @@ static inline void dec_valid_node_count(struct f2fs_sb_info *sbi,
dquot_free_inode(inode);
} else {
if (unlikely(inode->i_blocks == 0)) {
- f2fs_warn(sbi, "dec_valid_node_count: inconsistent i_blocks, ino:%lu, iblocks:%llu",
+ f2fs_warn(sbi, "dec_valid_node_count: inconsistent i_blocks, ino:%llu, iblocks:%llu",
inode->i_ino,
(unsigned long long)inode->i_blocks);
set_sbi_flag(sbi, SBI_NEED_FSCK);
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index c8a2f17a8f11cfc746c6a6ec4a225199929c2ee6..a56bbcca7898282eab1fea7e1b2acee5ea00df88 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -1917,7 +1917,7 @@ static int f2fs_expand_inode_data(struct inode *inode, loff_t offset,
f2fs_up_write(&sbi->pin_sem);
err = -ENOSPC;
f2fs_warn_ratelimited(sbi,
- "ino:%lu, start:%lu, end:%lu, need to trigger GC to "
+ "ino:%llu, start:%lu, end:%lu, need to trigger GC to"
"reclaim enough free segment when checkpoint is enabled",
inode->i_ino, pg_start, pg_end);
goto out_err;
@@ -2307,7 +2307,7 @@ static int f2fs_ioc_start_atomic_write(struct file *filp, bool truncate)
* f2fs_is_atomic_file.
*/
if (get_dirty_pages(inode))
- f2fs_warn(sbi, "Unexpected flush for atomic writes: ino=%lu, npages=%u",
+ f2fs_warn(sbi, "Unexpected flush for atomic writes: ino=%llu, npages=%u",
inode->i_ino, get_dirty_pages(inode));
ret = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
if (ret)
@@ -3494,7 +3494,7 @@ int f2fs_pin_file_control(struct inode *inode, bool inc)
return -EINVAL;
if (fi->i_gc_failures >= sbi->gc_pin_file_threshold) {
- f2fs_warn(sbi, "%s: Enable GC = ino %lx after %x GC trials",
+ f2fs_warn(sbi, "%s: Enable GC = ino %llx after %x GC trials",
__func__, inode->i_ino, fi->i_gc_failures);
clear_inode_flag(inode, FI_PIN_FILE);
return -EAGAIN;
@@ -3679,7 +3679,7 @@ static int f2fs_ioc_enable_verity(struct file *filp, unsigned long arg)
if (!f2fs_sb_has_verity(F2FS_I_SB(inode))) {
f2fs_warn(F2FS_I_SB(inode),
- "Can't enable fs-verity on inode %lu: the verity feature is not enabled on this filesystem",
+ "Can't enable fs-verity on inode %llu: the verity feature is not enabled on this filesystem",
inode->i_ino);
return -EOPNOTSUPP;
}
@@ -3950,7 +3950,7 @@ static int f2fs_release_compress_blocks(struct file *filp, unsigned long arg)
} else if (released_blocks &&
atomic_read(&fi->i_compr_blocks)) {
set_sbi_flag(sbi, SBI_NEED_FSCK);
- f2fs_warn(sbi, "%s: partial blocks were released i_ino=%lx "
+ f2fs_warn(sbi, "%s: partial blocks were released i_ino=%llx "
"iblocks=%llu, released=%u, compr_blocks=%u, "
"run fsck to fix.",
__func__, inode->i_ino, inode->i_blocks,
@@ -4133,7 +4133,7 @@ static int f2fs_reserve_compress_blocks(struct file *filp, unsigned long arg)
} else if (reserved_blocks &&
atomic_read(&fi->i_compr_blocks)) {
set_sbi_flag(sbi, SBI_NEED_FSCK);
- f2fs_warn(sbi, "%s: partial blocks were reserved i_ino=%lx "
+ f2fs_warn(sbi, "%s: partial blocks were reserved i_ino=%llx "
"iblocks=%llu, reserved=%u, compr_blocks=%u, "
"run fsck to fix.",
__func__, inode->i_ino, inode->i_blocks,
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index f46b2673d31f5a334bac543947e713cfe85dc68a..c0c8a1056d6b089397b4aa92b88b14cfd88c9de5 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1622,7 +1622,7 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
iput(inode);
set_sbi_flag(sbi, SBI_NEED_FSCK);
f2fs_err_ratelimited(sbi,
- "inode %lx has both inline_data flag and "
+ "inode %llu has both inline_data flag and "
"data block, nid=%u, ofs_in_node=%u",
inode->i_ino, dni.nid, ofs_in_node);
continue;
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 0a1052d5ee624e68ba27200b100a567a5d216f2a..2669439b941387a96318f77fca7dfe35723e59d9 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -176,7 +176,7 @@ int f2fs_convert_inline_folio(struct dnode_of_data *dn, struct folio *folio)
if (unlikely(dn->data_blkaddr != NEW_ADDR)) {
f2fs_put_dnode(dn);
set_sbi_flag(fio.sbi, SBI_NEED_FSCK);
- f2fs_warn(fio.sbi, "%s: corrupted inline inode ino=%lx, i_addr[0]:0x%x, run fsck to fix.",
+ f2fs_warn(fio.sbi, "%s: corrupted inline inode ino=%llu, i_addr[0]:0x%x, run fsck to fix.",
__func__, dn->inode->i_ino, dn->data_blkaddr);
f2fs_handle_error(fio.sbi, ERROR_INVALID_BLKADDR);
return -EFSCORRUPTED;
@@ -431,7 +431,7 @@ static int f2fs_move_inline_dirents(struct inode *dir, struct folio *ifolio,
if (unlikely(dn.data_blkaddr != NEW_ADDR)) {
f2fs_put_dnode(&dn);
set_sbi_flag(F2FS_F_SB(folio), SBI_NEED_FSCK);
- f2fs_warn(F2FS_F_SB(folio), "%s: corrupted inline inode ino=%lx, i_addr[0]:0x%x, run fsck to fix.",
+ f2fs_warn(F2FS_F_SB(folio), "%s: corrupted inline inode ino=%llu, i_addr[0]:0x%x, run fsck to fix.",
__func__, dir->i_ino, dn.data_blkaddr);
f2fs_handle_error(F2FS_F_SB(folio), ERROR_INVALID_BLKADDR);
err = -EFSCORRUPTED;
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index e0f850b3f0c38797fbba726af424161a147ee4f7..f27198d6695b91d2a041318aeecd04c65d38a4ba 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -203,14 +203,14 @@ static bool sanity_check_compress_inode(struct inode *inode,
if (ri->i_compress_algorithm >= COMPRESS_MAX) {
f2fs_warn(sbi,
- "%s: inode (ino=%lx) has unsupported compress algorithm: %u, run fsck to fix",
+ "%s: inode (ino=%llx) has unsupported compress algorithm: %u, run fsck to fix",
__func__, inode->i_ino, ri->i_compress_algorithm);
return false;
}
if (le64_to_cpu(ri->i_compr_blocks) >
SECTOR_TO_BLOCK(inode->i_blocks)) {
f2fs_warn(sbi,
- "%s: inode (ino=%lx) has inconsistent i_compr_blocks:%llu, i_blocks:%llu, run fsck to fix",
+ "%s: inode (ino=%llx) has inconsistent i_compr_blocks:%llu, i_blocks:%llu, run fsck to fix",
__func__, inode->i_ino, le64_to_cpu(ri->i_compr_blocks),
SECTOR_TO_BLOCK(inode->i_blocks));
return false;
@@ -218,7 +218,7 @@ static bool sanity_check_compress_inode(struct inode *inode,
if (ri->i_log_cluster_size < MIN_COMPRESS_LOG_SIZE ||
ri->i_log_cluster_size > MAX_COMPRESS_LOG_SIZE) {
f2fs_warn(sbi,
- "%s: inode (ino=%lx) has unsupported log cluster size: %u, run fsck to fix",
+ "%s: inode (ino=%llx) has unsupported log cluster size: %u, run fsck to fix",
__func__, inode->i_ino, ri->i_log_cluster_size);
return false;
}
@@ -262,7 +262,7 @@ static bool sanity_check_compress_inode(struct inode *inode,
return true;
err_level:
- f2fs_warn(sbi, "%s: inode (ino=%lx) has unsupported compress level: %u, run fsck to fix",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has unsupported compress level: %u, run fsck to fix",
__func__, inode->i_ino, clevel);
return false;
}
@@ -276,40 +276,40 @@ static bool sanity_check_inode(struct inode *inode, struct folio *node_folio)
iblocks = le64_to_cpu(F2FS_INODE(node_folio)->i_blocks);
if (!iblocks) {
- f2fs_warn(sbi, "%s: corrupted inode i_blocks i_ino=%lx iblocks=%llu, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode i_blocks i_ino=%llx iblocks=%llu, run fsck to fix.",
__func__, inode->i_ino, iblocks);
return false;
}
if (ino_of_node(node_folio) != nid_of_node(node_folio)) {
- f2fs_warn(sbi, "%s: corrupted inode footer i_ino=%lx, ino,nid: [%u, %u] run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode footer i_ino=%llx, ino,nid: [%u, %u] run fsck to fix.",
__func__, inode->i_ino,
ino_of_node(node_folio), nid_of_node(node_folio));
return false;
}
if (ino_of_node(node_folio) == fi->i_xattr_nid) {
- f2fs_warn(sbi, "%s: corrupted inode i_ino=%lx, xnid=%x, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode i_ino=%llx, xnid=%x, run fsck to fix.",
__func__, inode->i_ino, fi->i_xattr_nid);
return false;
}
if (S_ISDIR(inode->i_mode) && unlikely(inode->i_nlink == 1)) {
- f2fs_warn(sbi, "%s: directory inode (ino=%lx) has a single i_nlink",
+ f2fs_warn(sbi, "%s: directory inode (ino=%llx) has a single i_nlink",
__func__, inode->i_ino);
return false;
}
if (f2fs_has_extra_attr(inode)) {
if (!f2fs_sb_has_extra_attr(sbi)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) is with extra_attr, but extra_attr feature is off",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) is with extra_attr, but extra_attr feature is off",
__func__, inode->i_ino);
return false;
}
if (fi->i_extra_isize > F2FS_TOTAL_EXTRA_ATTR_SIZE ||
fi->i_extra_isize < F2FS_MIN_EXTRA_ATTR_SIZE ||
fi->i_extra_isize % sizeof(__le32)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has corrupted i_extra_isize: %d, max: %zu",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has corrupted i_extra_isize: %d, max: %zu",
__func__, inode->i_ino, fi->i_extra_isize,
F2FS_TOTAL_EXTRA_ATTR_SIZE);
return false;
@@ -327,7 +327,7 @@ static bool sanity_check_inode(struct inode *inode, struct folio *node_folio)
f2fs_has_inline_xattr(inode) &&
(fi->i_inline_xattr_size < MIN_INLINE_XATTR_SIZE ||
fi->i_inline_xattr_size > MAX_INLINE_XATTR_SIZE)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has corrupted i_inline_xattr_size: %d, min: %zu, max: %lu",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has corrupted i_inline_xattr_size: %d, min: %zu, max: %lu",
__func__, inode->i_ino, fi->i_inline_xattr_size,
MIN_INLINE_XATTR_SIZE, MAX_INLINE_XATTR_SIZE);
return false;
@@ -335,64 +335,64 @@ static bool sanity_check_inode(struct inode *inode, struct folio *node_folio)
if (!f2fs_sb_has_extra_attr(sbi)) {
if (f2fs_sb_has_project_quota(sbi)) {
- f2fs_warn(sbi, "%s: corrupted inode ino=%lx, wrong feature flag: %u, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode ino=%llx, wrong feature flag: %u, run fsck to fix.",
__func__, inode->i_ino, F2FS_FEATURE_PRJQUOTA);
return false;
}
if (f2fs_sb_has_inode_chksum(sbi)) {
- f2fs_warn(sbi, "%s: corrupted inode ino=%lx, wrong feature flag: %u, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode ino=%llx, wrong feature flag: %u, run fsck to fix.",
__func__, inode->i_ino, F2FS_FEATURE_INODE_CHKSUM);
return false;
}
if (f2fs_sb_has_flexible_inline_xattr(sbi)) {
- f2fs_warn(sbi, "%s: corrupted inode ino=%lx, wrong feature flag: %u, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode ino=%llx, wrong feature flag: %u, run fsck to fix.",
__func__, inode->i_ino, F2FS_FEATURE_FLEXIBLE_INLINE_XATTR);
return false;
}
if (f2fs_sb_has_inode_crtime(sbi)) {
- f2fs_warn(sbi, "%s: corrupted inode ino=%lx, wrong feature flag: %u, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode ino=%llx, wrong feature flag: %u, run fsck to fix.",
__func__, inode->i_ino, F2FS_FEATURE_INODE_CRTIME);
return false;
}
if (f2fs_sb_has_compression(sbi)) {
- f2fs_warn(sbi, "%s: corrupted inode ino=%lx, wrong feature flag: %u, run fsck to fix.",
+ f2fs_warn(sbi, "%s: corrupted inode ino=%llx, wrong feature flag: %u, run fsck to fix.",
__func__, inode->i_ino, F2FS_FEATURE_COMPRESSION);
return false;
}
}
if (f2fs_sanity_check_inline_data(inode, node_folio)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx, mode=%u) should not have inline_data, run fsck to fix",
+ f2fs_warn(sbi, "%s: inode (ino=%llx, mode=%u) should not have inline_data, run fsck to fix",
__func__, inode->i_ino, inode->i_mode);
return false;
}
if (f2fs_has_inline_dentry(inode) && !S_ISDIR(inode->i_mode)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx, mode=%u) should not have inline_dentry, run fsck to fix",
+ f2fs_warn(sbi, "%s: inode (ino=%llx, mode=%u) should not have inline_dentry, run fsck to fix",
__func__, inode->i_ino, inode->i_mode);
return false;
}
if ((fi->i_flags & F2FS_CASEFOLD_FL) && !f2fs_sb_has_casefold(sbi)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has casefold flag, but casefold feature is off",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has casefold flag, but casefold feature is off",
__func__, inode->i_ino);
return false;
}
if (fi->i_xattr_nid && f2fs_check_nid_range(sbi, fi->i_xattr_nid)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has corrupted i_xattr_nid: %u, run fsck to fix.",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has corrupted i_xattr_nid: %u, run fsck to fix.",
__func__, inode->i_ino, fi->i_xattr_nid);
return false;
}
if (IS_DEVICE_ALIASING(inode)) {
if (!f2fs_sb_has_device_alias(sbi)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has device alias flag, but the feature is off",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has device alias flag, but the feature is off",
__func__, inode->i_ino);
return false;
}
if (!f2fs_is_pinned_file(inode)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has device alias flag, but is not pinned",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has device alias flag, but is not pinned",
__func__, inode->i_ino);
return false;
}
@@ -925,7 +925,7 @@ void f2fs_evict_inode(struct inode *inode)
*/
if (is_inode_flag_set(inode, FI_DIRTY_INODE)) {
f2fs_warn(F2FS_I_SB(inode),
- "f2fs_evict_inode: inconsistent node id, ino:%lu",
+ "f2fs_evict_inode: inconsistent node id, ino:%llu",
inode->i_ino);
f2fs_inode_synced(inode);
set_sbi_flag(sbi, SBI_NEED_FSCK);
@@ -954,7 +954,7 @@ void f2fs_evict_inode(struct inode *inode)
*/
if (is_inode_flag_set(inode, FI_DIRTY_INODE)) {
f2fs_warn(sbi,
- "f2fs_evict_inode: inode is dirty, ino:%lu",
+ "f2fs_evict_inode: inode is dirty, ino:%llu",
inode->i_ino);
f2fs_inode_synced(inode);
set_sbi_flag(sbi, SBI_NEED_FSCK);
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index e360f08a9586ab5b75d6e1e1748219c3190a7580..efbb0732d4206f63b5221605a08ffa5c17e8a8b6 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -505,7 +505,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
}
if (inode->i_nlink == 0) {
- f2fs_warn(F2FS_I_SB(inode), "%s: inode (ino=%lx) has zero i_nlink",
+ f2fs_warn(F2FS_I_SB(inode), "%s: inode (ino=%llx) has zero i_nlink",
__func__, inode->i_ino);
err = -EFSCORRUPTED;
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
@@ -515,7 +515,7 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
if (IS_ENCRYPTED(dir) &&
(S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) &&
!fscrypt_has_permitted_context(dir, inode)) {
- f2fs_warn(F2FS_I_SB(inode), "Inconsistent encryption contexts: %lu/%lu",
+ f2fs_warn(F2FS_I_SB(inode), "Inconsistent encryption contexts: %llu/%llu",
dir->i_ino, inode->i_ino);
err = -EPERM;
goto out_iput;
@@ -573,11 +573,11 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
}
if (unlikely(inode->i_nlink == 0)) {
- f2fs_warn(sbi, "%s: inode (ino=%lx) has zero i_nlink",
+ f2fs_warn(sbi, "%s: inode (ino=%llx) has zero i_nlink",
__func__, inode->i_ino);
goto corrupted;
} else if (S_ISDIR(inode->i_mode) && unlikely(inode->i_nlink == 1)) {
- f2fs_warn(sbi, "%s: directory inode (ino=%lx) has a single i_nlink",
+ f2fs_warn(sbi, "%s: directory inode (ino=%llx) has a single i_nlink",
__func__, inode->i_ino);
goto corrupted;
}
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 2030e943ab9b3d5e2deb20efe9a44cf5093a61fb..2856d5dbdd00a659b548ca6a0d8a973fc1341297 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -847,7 +847,7 @@ int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode)
err = -EFSCORRUPTED;
f2fs_err_ratelimited(sbi,
"inode mapping table is corrupted, run fsck to fix it, "
- "ino:%lu, nid:%u, level:%d, offset:%d",
+ "ino:%llu, nid:%u, level:%d, offset:%d",
dn->inode->i_ino, nids[i], level, offset[level]);
set_sbi_flag(sbi, SBI_NEED_FSCK);
goto release_pages;
@@ -1013,7 +1013,7 @@ static int truncate_dnode(struct dnode_of_data *dn)
return PTR_ERR(folio);
if (IS_INODE(folio) || ino_of_node(folio) != dn->inode->i_ino) {
- f2fs_err(sbi, "incorrect node reference, ino: %lu, nid: %u, ino_of_node: %u",
+ f2fs_err(sbi, "incorrect node reference, ino: %llu, nid: %u, ino_of_node: %u",
dn->inode->i_ino, dn->nid, ino_of_node(folio));
set_sbi_flag(sbi, SBI_NEED_FSCK);
f2fs_handle_error(sbi, ERROR_INVALID_NODE_REFERENCE);
@@ -1194,7 +1194,7 @@ int f2fs_truncate_inode_blocks(struct inode *inode, pgoff_t from)
if (level <= 0) {
if (!level) {
level = -EFSCORRUPTED;
- f2fs_err(sbi, "%s: inode ino=%lx has corrupted node block, from:%lu addrs:%u",
+ f2fs_err(sbi, "%s: inode ino=%llx has corrupted node block, from:%lu addrs:%u",
__func__, inode->i_ino,
from, ADDRS_PER_INODE(inode));
set_sbi_flag(sbi, SBI_NEED_FSCK);
@@ -1265,7 +1265,7 @@ int f2fs_truncate_inode_blocks(struct inode *inode, pgoff_t from)
set_sbi_flag(F2FS_F_SB(folio), SBI_NEED_FSCK);
f2fs_handle_error(sbi, ERROR_INVALID_BLKADDR);
f2fs_err_ratelimited(sbi,
- "truncate node fail, ino:%lu, nid:%u, "
+ "truncate node fail, ino:%llu, nid:%u, "
"offset[0]:%d, offset[1]:%d, nofs:%d",
inode->i_ino, dn.nid, offset[0],
offset[1], nofs);
@@ -1351,7 +1351,7 @@ int f2fs_remove_inode_page(struct inode *inode)
if (unlikely(inode->i_blocks != 0 && inode->i_blocks != 8)) {
f2fs_warn(F2FS_I_SB(inode),
- "f2fs_remove_inode_page: inconsistent i_blocks, ino:%lu, iblocks:%llu",
+ "f2fs_remove_inode_page: inconsistent i_blocks, ino:%llu, iblocks:%llu",
inode->i_ino, (unsigned long long)inode->i_blocks);
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
}
@@ -1997,7 +1997,7 @@ int f2fs_fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode,
return ret;
}
-static int f2fs_match_ino(struct inode *inode, unsigned long ino, void *data)
+static int f2fs_match_ino(struct inode *inode, u64 ino, void *data)
{
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
bool clean;
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index a26071f2b0bc81fb768982841e37a63b2ca701b3..3d3dacec94825f6695d67043fd3ca42329aa5929 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -232,7 +232,7 @@ static int recover_dentry(struct inode *inode, struct folio *ifolio,
name = "<encrypted>";
else
name = raw_inode->i_name;
- f2fs_notice(F2FS_I_SB(inode), "%s: ino = %x, name = %s, dir = %lx, err = %d",
+ f2fs_notice(F2FS_I_SB(inode), "%s: ino = %x, name = %s, dir = %llu, err = %d",
__func__, ino_of_node(ifolio), name,
IS_ERR(dir) ? 0 : dir->i_ino, err);
return err;
@@ -532,7 +532,7 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
max_addrs = ADDRS_PER_PAGE(dn->node_folio, dn->inode);
if (ofs_in_node >= max_addrs) {
- f2fs_err(sbi, "Inconsistent ofs_in_node:%u in summary, ino:%lu, nid:%u, max:%u",
+ f2fs_err(sbi, "Inconsistent ofs_in_node:%u in summary, ino:%llu, nid:%u, max:%u",
ofs_in_node, dn->inode->i_ino, nid, max_addrs);
f2fs_handle_error(sbi, ERROR_INCONSISTENT_SUMMARY);
return -EFSCORRUPTED;
@@ -674,7 +674,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
f2fs_bug_on(sbi, ni.ino != ino_of_node(folio));
if (ofs_of_node(dn.node_folio) != ofs_of_node(folio)) {
- f2fs_warn(sbi, "Inconsistent ofs_of_node, ino:%lu, ofs:%u, %u",
+ f2fs_warn(sbi, "Inconsistent ofs_of_node, ino:%llu, ofs:%u, %u",
inode->i_ino, ofs_of_node(dn.node_folio),
ofs_of_node(folio));
err = -EFSCORRUPTED;
@@ -748,7 +748,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
if (f2fs_is_valid_blkaddr(sbi, dest,
DATA_GENERIC_ENHANCE_UPDATE)) {
- f2fs_err(sbi, "Inconsistent dest blkaddr:%u, ino:%lu, ofs:%u",
+ f2fs_err(sbi, "Inconsistent dest blkaddr:%u, ino:%llu, ofs:%u",
dest, inode->i_ino, dn.ofs_in_node);
err = -EFSCORRUPTED;
goto err;
@@ -768,7 +768,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
err:
f2fs_put_dnode(&dn);
out:
- f2fs_notice(sbi, "recover_data: ino = %lx, nid = %x (i_size: %s), "
+ f2fs_notice(sbi, "recover_data: ino = %llx, nid = %x (i_size: %s), "
"range (%u, %u), recovered = %d, err = %d",
inode->i_ino, nid_of_node(folio),
file_keep_isize(inode) ? "keep" : "recover",
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 941dc62a6d6f7c50c1a661397ef1bbb611e6c304..610d5810074dc501d02c93a4feb308e12a21a056 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -365,7 +365,7 @@ static int lookup_all_xattrs(struct inode *inode, struct folio *ifolio,
*xe = __find_xattr(cur_addr, last_txattr_addr, NULL, index, len, name);
if (!*xe) {
- f2fs_err(F2FS_I_SB(inode), "lookup inode (%lu) has corrupted xattr",
+ f2fs_err(F2FS_I_SB(inode), "lookup inode (%llu) has corrupted xattr",
inode->i_ino);
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
err = -ENODATA;
@@ -585,7 +585,7 @@ ssize_t f2fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
if ((void *)(entry) + sizeof(__u32) > last_base_addr ||
(void *)XATTR_NEXT_ENTRY(entry) > last_base_addr) {
- f2fs_err(F2FS_I_SB(inode), "list inode (%lu) has corrupted xattr",
+ f2fs_err(F2FS_I_SB(inode), "list inode (%llu) has corrupted xattr",
inode->i_ino);
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
f2fs_handle_error(F2FS_I_SB(inode),
@@ -664,14 +664,14 @@ static int __f2fs_setxattr(struct inode *inode, int index,
if (!F2FS_I(inode)->i_xattr_nid) {
error = f2fs_recover_xattr_data(inode, NULL);
f2fs_notice(F2FS_I_SB(inode),
- "recover xattr in inode (%lu), error(%d)",
+ "recover xattr in inode (%llu), error(%d)",
inode->i_ino, error);
if (!error) {
kfree(base_addr);
goto retry;
}
}
- f2fs_err(F2FS_I_SB(inode), "set inode (%lu) has corrupted xattr",
+ f2fs_err(F2FS_I_SB(inode), "set inode (%llu) has corrupted xattr",
inode->i_ino);
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
error = -EFSCORRUPTED;
@@ -699,7 +699,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
while (!IS_XATTR_LAST_ENTRY(last)) {
if ((void *)(last) + sizeof(__u32) > last_base_addr ||
(void *)XATTR_NEXT_ENTRY(last) > last_base_addr) {
- f2fs_err(F2FS_I_SB(inode), "inode (%lu) has invalid last xattr entry, entry_size: %zu",
+ f2fs_err(F2FS_I_SB(inode), "inode (%llu) has invalid last xattr entry, entry_size: %zu",
inode->i_ino, ENTRY_SIZE(last));
set_sbi_flag(F2FS_I_SB(inode), SBI_NEED_FSCK);
error = -EFSCORRUPTED;
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 9364e677556207ac041353a9eb2d5c2ee49b9dff..109b4f5771cbd5b019a1a9cfdc178892a19b7c54 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -9,7 +9,7 @@
#include <uapi/linux/f2fs.h>
#define show_dev(dev) MAJOR(dev), MINOR(dev)
-#define show_dev_ino(entry) show_dev(entry->dev), (unsigned long)entry->ino
+#define show_dev_ino(entry) show_dev(entry->dev), (unsigned long long)entry->ino
TRACE_DEFINE_ENUM(NODE);
TRACE_DEFINE_ENUM(DATA);
@@ -207,8 +207,8 @@ DECLARE_EVENT_CLASS(f2fs__inode,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
- __field(ino_t, pino)
+ __field(u64, ino)
+ __field(u64, pino)
__field(umode_t, mode)
__field(loff_t, size)
__field(unsigned int, nlink)
@@ -227,10 +227,10 @@ DECLARE_EVENT_CLASS(f2fs__inode,
__entry->advise = F2FS_I(inode)->i_advise;
),
- TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
+ TP_printk("dev = (%d,%d), ino = %llu, pino = %llu, i_mode = 0x%hx, "
"i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
show_dev_ino(__entry),
- (unsigned long)__entry->pino,
+ (unsigned long long)__entry->pino,
__entry->mode,
__entry->size,
(unsigned int)__entry->nlink,
@@ -246,7 +246,7 @@ DECLARE_EVENT_CLASS(f2fs__inode_exit,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(umode_t, mode)
__field(int, ret)
),
@@ -258,7 +258,7 @@ DECLARE_EVENT_CLASS(f2fs__inode_exit,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, type: %s, mode = 0%o, ret = %d",
+ TP_printk("dev = (%d,%d), ino = %llu, type: %s, mode = 0%o, ret = %d",
show_dev_ino(__entry),
show_inode_type(__entry->mode & S_IFMT),
__entry->mode & S_ALL_PERM,
@@ -280,7 +280,7 @@ TRACE_EVENT(f2fs_sync_file_exit,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, cp_reason)
__field(int, datasync)
__field(int, ret)
@@ -294,7 +294,7 @@ TRACE_EVENT(f2fs_sync_file_exit,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, cp_reason: %s, "
+ TP_printk("dev = (%d,%d), ino = %llu, cp_reason: %s, "
"datasync = %d, ret = %d",
show_dev_ino(__entry),
show_fsync_cpreason(__entry->cp_reason),
@@ -362,7 +362,7 @@ TRACE_EVENT(f2fs_unlink_enter,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, size)
__field(blkcnt_t, blocks)
__string(name, dentry->d_name.name)
@@ -376,7 +376,7 @@ TRACE_EVENT(f2fs_unlink_enter,
__assign_str(name);
),
- TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
+ TP_printk("dev = (%d,%d), dir ino = %llu, i_size = %lld, "
"i_blocks = %llu, name = %s",
show_dev_ino(__entry),
__entry->size,
@@ -413,7 +413,7 @@ TRACE_EVENT(f2fs_truncate_data_blocks_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(nid_t, nid)
__field(unsigned int, ofs)
__field(int, free)
@@ -427,7 +427,7 @@ TRACE_EVENT(f2fs_truncate_data_blocks_range,
__entry->free = free;
),
- TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
+ TP_printk("dev = (%d,%d), ino = %llu, nid = %u, offset = %u, freed = %d",
show_dev_ino(__entry),
(unsigned int)__entry->nid,
__entry->ofs,
@@ -442,7 +442,7 @@ DECLARE_EVENT_CLASS(f2fs__truncate_op,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, size)
__field(blkcnt_t, blocks)
__field(u64, from)
@@ -456,7 +456,7 @@ DECLARE_EVENT_CLASS(f2fs__truncate_op,
__entry->from = from;
),
- TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
+ TP_printk("dev = (%d,%d), ino = %llu, i_size = %lld, i_blocks = %llu, "
"start file offset = %llu",
show_dev_ino(__entry),
__entry->size,
@@ -500,7 +500,7 @@ DECLARE_EVENT_CLASS(f2fs__truncate_node,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(nid_t, nid)
__field(block_t, blk_addr)
),
@@ -512,7 +512,7 @@ DECLARE_EVENT_CLASS(f2fs__truncate_node,
__entry->blk_addr = blk_addr;
),
- TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
+ TP_printk("dev = (%d,%d), ino = %llu, nid = %u, block_address = 0x%llx",
show_dev_ino(__entry),
(unsigned int)__entry->nid,
(unsigned long long)__entry->blk_addr)
@@ -547,7 +547,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__array(nid_t, nid, 3)
__field(int, depth)
__field(int, err)
@@ -563,7 +563,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes,
__entry->err = err;
),
- TP_printk("dev = (%d,%d), ino = %lu, "
+ TP_printk("dev = (%d,%d), ino = %llu, "
"nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
show_dev_ino(__entry),
(unsigned int)__entry->nid[0],
@@ -582,7 +582,7 @@ TRACE_EVENT(f2fs_file_write_iter,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, offset)
__field(size_t, length)
__field(ssize_t, ret)
@@ -596,7 +596,7 @@ TRACE_EVENT(f2fs_file_write_iter,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, "
+ TP_printk("dev = (%d,%d), ino = %llu, "
"offset = %lld, length = %zu, written(err) = %zd",
show_dev_ino(__entry),
__entry->offset,
@@ -612,7 +612,7 @@ TRACE_EVENT(f2fs_fadvise,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, size)
__field(loff_t, offset)
__field(loff_t, len)
@@ -628,7 +628,7 @@ TRACE_EVENT(f2fs_fadvise,
__entry->advice = advice;
),
- TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld offset:%llu, len:%llu, advise:%d",
+ TP_printk("dev = (%d,%d), ino = %llu, i_size = %lld offset:%llu, len:%llu, advise:%d",
show_dev_ino(__entry),
(unsigned long long)__entry->size,
__entry->offset,
@@ -644,7 +644,7 @@ TRACE_EVENT(f2fs_map_blocks,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(block_t, m_lblk)
__field(block_t, m_pblk)
__field(unsigned int, m_len)
@@ -670,7 +670,7 @@ TRACE_EVENT(f2fs_map_blocks,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
+ TP_printk("dev = (%d,%d), ino = %llu, file offset = %llu, "
"start blkaddr = 0x%llx, len = 0x%llx, flags = %u, "
"seg_type = %d, may_create = %d, multidevice = %d, "
"flag = %d, err = %d",
@@ -886,7 +886,7 @@ TRACE_EVENT(f2fs_lookup_start,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__string(name, dentry->d_name.name)
__field(unsigned int, flags)
),
@@ -898,7 +898,7 @@ TRACE_EVENT(f2fs_lookup_start,
__entry->flags = flags;
),
- TP_printk("dev = (%d,%d), pino = %lu, name:%s, flags:%u",
+ TP_printk("dev = (%d,%d), pino = %llu, name:%s, flags:%u",
show_dev_ino(__entry),
__get_str(name),
__entry->flags)
@@ -913,7 +913,7 @@ TRACE_EVENT(f2fs_lookup_end,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__string(name, dentry->d_name.name)
__field(nid_t, cino)
__field(int, err)
@@ -927,7 +927,7 @@ TRACE_EVENT(f2fs_lookup_end,
__entry->err = err;
),
- TP_printk("dev = (%d,%d), pino = %lu, name:%s, ino:%u, err:%d",
+ TP_printk("dev = (%d,%d), pino = %llu, name:%s, ino:%u, err:%d",
show_dev_ino(__entry),
__get_str(name),
__entry->cino,
@@ -944,9 +944,9 @@ TRACE_EVENT(f2fs_rename_start,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__string(old_name, old_dentry->d_name.name)
- __field(ino_t, new_pino)
+ __field(u64, new_pino)
__string(new_name, new_dentry->d_name.name)
__field(unsigned int, flags)
),
@@ -960,8 +960,8 @@ TRACE_EVENT(f2fs_rename_start,
__entry->flags = flags;
),
- TP_printk("dev = (%d,%d), old_dir = %lu, old_name: %s, "
- "new_dir = %lu, new_name: %s, flags = %u",
+ TP_printk("dev = (%d,%d), old_dir = %llu, old_name: %s, "
+ "new_dir = %llu, new_name: %s, flags = %u",
show_dev_ino(__entry),
__get_str(old_name),
__entry->new_pino,
@@ -978,7 +978,7 @@ TRACE_EVENT(f2fs_rename_end,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__string(old_name, old_dentry->d_name.name)
__string(new_name, new_dentry->d_name.name)
__field(unsigned int, flags)
@@ -994,7 +994,7 @@ TRACE_EVENT(f2fs_rename_end,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, old_name: %s, "
+ TP_printk("dev = (%d,%d), ino = %llu, old_name: %s, "
"new_name: %s, flags = %u, ret = %d",
show_dev_ino(__entry),
__get_str(old_name),
@@ -1011,7 +1011,7 @@ TRACE_EVENT(f2fs_readdir,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, start)
__field(loff_t, end)
__field(int, err)
@@ -1025,7 +1025,7 @@ TRACE_EVENT(f2fs_readdir,
__entry->err = err;
),
- TP_printk("dev = (%d,%d), ino = %lu, start_pos:%llu, end_pos:%llu, err:%d",
+ TP_printk("dev = (%d,%d), ino = %llu, start_pos:%llu, end_pos:%llu, err:%d",
show_dev_ino(__entry),
__entry->start,
__entry->end,
@@ -1041,7 +1041,7 @@ TRACE_EVENT(f2fs_fallocate,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, mode)
__field(loff_t, offset)
__field(loff_t, len)
@@ -1061,7 +1061,7 @@ TRACE_EVENT(f2fs_fallocate,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
+ TP_printk("dev = (%d,%d), ino = %llu, mode = %x, offset = %lld, "
"len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
show_dev_ino(__entry),
__entry->mode,
@@ -1080,7 +1080,7 @@ TRACE_EVENT(f2fs_direct_IO_enter,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, ki_pos)
__field(int, ki_flags)
__field(u16, ki_ioprio)
@@ -1098,7 +1098,7 @@ TRACE_EVENT(f2fs_direct_IO_enter,
__entry->rw = rw;
),
- TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu ki_flags = %x ki_ioprio = %x rw = %d",
+ TP_printk("dev = (%d,%d), ino = %llu pos = %lld len = %lu ki_flags = %x ki_ioprio = %x rw = %d",
show_dev_ino(__entry),
__entry->ki_pos,
__entry->len,
@@ -1116,7 +1116,7 @@ TRACE_EVENT(f2fs_direct_IO_exit,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, pos)
__field(unsigned long, len)
__field(int, rw)
@@ -1132,7 +1132,7 @@ TRACE_EVENT(f2fs_direct_IO_exit,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
+ TP_printk("dev = (%d,%d), ino = %llu pos = %lld len = %lu "
"rw = %d ret = %d",
show_dev_ino(__entry),
__entry->pos,
@@ -1177,7 +1177,7 @@ DECLARE_EVENT_CLASS(f2fs__submit_folio_bio,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, index)
__field(block_t, old_blkaddr)
__field(block_t, new_blkaddr)
@@ -1199,7 +1199,7 @@ DECLARE_EVENT_CLASS(f2fs__submit_folio_bio,
__entry->type = fio->type;
),
- TP_printk("dev = (%d,%d), ino = %lu, folio_index = 0x%lx, "
+ TP_printk("dev = (%d,%d), ino = %llu, folio_index = 0x%lx, "
"oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s(%s), type = %s_%s",
show_dev_ino(__entry),
(unsigned long)__entry->index,
@@ -1307,7 +1307,7 @@ TRACE_EVENT(f2fs_write_begin,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, pos)
__field(unsigned int, len)
),
@@ -1319,7 +1319,7 @@ TRACE_EVENT(f2fs_write_begin,
__entry->len = len;
),
- TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u",
+ TP_printk("dev = (%d,%d), ino = %llu, pos = %llu, len = %u",
show_dev_ino(__entry),
(unsigned long long)__entry->pos,
__entry->len)
@@ -1334,7 +1334,7 @@ TRACE_EVENT(f2fs_write_end,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, pos)
__field(unsigned int, len)
__field(unsigned int, copied)
@@ -1348,7 +1348,7 @@ TRACE_EVENT(f2fs_write_end,
__entry->copied = copied;
),
- TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
+ TP_printk("dev = (%d,%d), ino = %llu, pos = %llu, len = %u, copied = %u",
show_dev_ino(__entry),
(unsigned long long)__entry->pos,
__entry->len,
@@ -1363,7 +1363,7 @@ DECLARE_EVENT_CLASS(f2fs__folio,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, type)
__field(int, dir)
__field(pgoff_t, index)
@@ -1383,7 +1383,7 @@ DECLARE_EVENT_CLASS(f2fs__folio,
__entry->uptodate = folio_test_uptodate(folio);
),
- TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, nr_pages = %lu, "
+ TP_printk("dev = (%d,%d), ino = %llu, %s, %s, index = %lu, nr_pages = %lu, "
"dirty = %d, uptodate = %d",
show_dev_ino(__entry),
show_block_type(__entry->type),
@@ -1438,8 +1438,8 @@ TRACE_EVENT(f2fs_replace_atomic_write_block,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
- __field(ino_t, cow_ino)
+ __field(u64, ino)
+ __field(u64, cow_ino)
__field(pgoff_t, index)
__field(block_t, old_addr)
__field(block_t, new_addr)
@@ -1456,7 +1456,7 @@ TRACE_EVENT(f2fs_replace_atomic_write_block,
__entry->recovery = recovery;
),
- TP_printk("dev = (%d,%d), ino = %lu, cow_ino = %lu, index = %lu, "
+ TP_printk("dev = (%d,%d), ino = %llu, cow_ino = %llu, index = %lu, "
"old_addr = 0x%llx, new_addr = 0x%llx, recovery = %d",
show_dev_ino(__entry),
__entry->cow_ino,
@@ -1475,7 +1475,7 @@ DECLARE_EVENT_CLASS(f2fs_mmap,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, index)
__field(vm_flags_t, flags)
__field(vm_fault_t, ret)
@@ -1489,7 +1489,7 @@ DECLARE_EVENT_CLASS(f2fs_mmap,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, index = %lu, flags: %s, ret: %s",
+ TP_printk("dev = (%d,%d), ino = %llu, index = %lu, flags: %s, ret: %s",
show_dev_ino(__entry),
(unsigned long)__entry->index,
__print_flags(__entry->flags, "|", FAULT_FLAG_TRACE),
@@ -1520,7 +1520,7 @@ TRACE_EVENT(f2fs_writepages,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(int, type)
__field(int, dir)
__field(long, nr_to_write)
@@ -1554,7 +1554,7 @@ TRACE_EVENT(f2fs_writepages,
__entry->for_sync = wbc->for_sync;
),
- TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
+ TP_printk("dev = (%d,%d), ino = %llu, %s, %s, nr_to_write %ld, "
"skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
"kupdate %u background %u tagged %u cyclic %u sync %u",
show_dev_ino(__entry),
@@ -1581,7 +1581,7 @@ TRACE_EVENT(f2fs_readpages,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, start)
__field(unsigned int, nrpage)
),
@@ -1593,7 +1593,7 @@ TRACE_EVENT(f2fs_readpages,
__entry->nrpage = nrpage;
),
- TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
+ TP_printk("dev = (%d,%d), ino = %llu, start = %lu nrpage = %u",
show_dev_ino(__entry),
(unsigned long)__entry->start,
__entry->nrpage)
@@ -1739,7 +1739,7 @@ TRACE_EVENT(f2fs_lookup_extent_tree_start,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, pgofs)
__field(enum extent_type, type)
),
@@ -1751,7 +1751,7 @@ TRACE_EVENT(f2fs_lookup_extent_tree_start,
__entry->type = type;
),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, type = %s",
+ TP_printk("dev = (%d,%d), ino = %llu, pgofs = %u, type = %s",
show_dev_ino(__entry),
__entry->pgofs,
show_extent_type(__entry->type))
@@ -1768,7 +1768,7 @@ TRACE_EVENT_CONDITION(f2fs_lookup_read_extent_tree_end,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, pgofs)
__field(unsigned int, fofs)
__field(unsigned int, len)
@@ -1784,7 +1784,7 @@ TRACE_EVENT_CONDITION(f2fs_lookup_read_extent_tree_end,
__entry->blk = ei->blk;
),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
+ TP_printk("dev = (%d,%d), ino = %llu, pgofs = %u, "
"read_ext_info(fofs: %u, len: %u, blk: %u)",
show_dev_ino(__entry),
__entry->pgofs,
@@ -1804,7 +1804,7 @@ TRACE_EVENT_CONDITION(f2fs_lookup_age_extent_tree_end,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, pgofs)
__field(unsigned int, fofs)
__field(unsigned int, len)
@@ -1822,7 +1822,7 @@ TRACE_EVENT_CONDITION(f2fs_lookup_age_extent_tree_end,
__entry->blocks = ei->last_blocks;
),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
+ TP_printk("dev = (%d,%d), ino = %llu, pgofs = %u, "
"age_ext_info(fofs: %u, len: %u, age: %llu, blocks: %llu)",
show_dev_ino(__entry),
__entry->pgofs,
@@ -1842,7 +1842,7 @@ TRACE_EVENT(f2fs_update_read_extent_tree_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, pgofs)
__field(u32, blk)
__field(unsigned int, len)
@@ -1858,7 +1858,7 @@ TRACE_EVENT(f2fs_update_read_extent_tree_range,
__entry->c_len = c_len;
),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
+ TP_printk("dev = (%d,%d), ino = %llu, pgofs = %u, "
"len = %u, blkaddr = %u, c_len = %u",
show_dev_ino(__entry),
__entry->pgofs,
@@ -1877,7 +1877,7 @@ TRACE_EVENT(f2fs_update_age_extent_tree_range,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, pgofs)
__field(unsigned int, len)
__field(unsigned long long, age)
@@ -1893,7 +1893,7 @@ TRACE_EVENT(f2fs_update_age_extent_tree_range,
__entry->blocks = last_blks;
),
- TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
+ TP_printk("dev = (%d,%d), ino = %llu, pgofs = %u, "
"len = %u, age = %llu, blocks = %llu",
show_dev_ino(__entry),
__entry->pgofs,
@@ -1939,7 +1939,7 @@ TRACE_EVENT(f2fs_destroy_extent_tree,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(unsigned int, node_cnt)
__field(enum extent_type, type)
),
@@ -1951,7 +1951,7 @@ TRACE_EVENT(f2fs_destroy_extent_tree,
__entry->type = type;
),
- TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u, type = %s",
+ TP_printk("dev = (%d,%d), ino = %llu, destroyed: node_cnt = %u, type = %s",
show_dev_ino(__entry),
__entry->node_cnt,
show_extent_type(__entry->type))
@@ -2028,7 +2028,7 @@ DECLARE_EVENT_CLASS(f2fs_zip_start,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, idx)
__field(unsigned int, size)
__field(unsigned int, algtype)
@@ -2042,7 +2042,7 @@ DECLARE_EVENT_CLASS(f2fs_zip_start,
__entry->algtype = algtype;
),
- TP_printk("dev = (%d,%d), ino = %lu, cluster_idx:%lu, "
+ TP_printk("dev = (%d,%d), ino = %llu, cluster_idx:%lu, "
"cluster_size = %u, algorithm = %s",
show_dev_ino(__entry),
__entry->idx,
@@ -2059,7 +2059,7 @@ DECLARE_EVENT_CLASS(f2fs_zip_end,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(pgoff_t, idx)
__field(unsigned int, size)
__field(unsigned int, ret)
@@ -2073,7 +2073,7 @@ DECLARE_EVENT_CLASS(f2fs_zip_end,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, cluster_idx:%lu, "
+ TP_printk("dev = (%d,%d), ino = %llu, cluster_idx:%lu, "
"compressed_size = %u, ret = %d",
show_dev_ino(__entry),
__entry->idx,
@@ -2312,7 +2312,7 @@ TRACE_EVENT(f2fs_bmap,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(sector_t, lblock)
__field(sector_t, pblock)
),
@@ -2324,7 +2324,7 @@ TRACE_EVENT(f2fs_bmap,
__entry->pblock = pblock;
),
- TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld",
+ TP_printk("dev = (%d,%d), ino = %llu, lblock:%lld, pblock:%lld",
show_dev_ino(__entry),
(unsigned long long)__entry->lblock,
(unsigned long long)__entry->pblock)
@@ -2339,7 +2339,7 @@ TRACE_EVENT(f2fs_fiemap,
TP_STRUCT__entry(
__field(dev_t, dev)
- __field(ino_t, ino)
+ __field(u64, ino)
__field(sector_t, lblock)
__field(sector_t, pblock)
__field(unsigned long long, len)
@@ -2357,7 +2357,7 @@ TRACE_EVENT(f2fs_fiemap,
__entry->ret = ret;
),
- TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld, "
+ TP_printk("dev = (%d,%d), ino = %llu, lblock:%lld, pblock:%lld, "
"len:%llu, flags:%u, ret:%d",
show_dev_ino(__entry),
(unsigned long long)__entry->lblock,
@@ -2381,7 +2381,7 @@ DECLARE_EVENT_CLASS(f2fs__rw_start,
__field(loff_t, i_size)
__string(cmdline, command)
__field(pid_t, pid)
- __field(ino_t, ino)
+ __field(u64, ino)
),
TP_fast_assign(
@@ -2402,10 +2402,10 @@ DECLARE_EVENT_CLASS(f2fs__rw_start,
),
TP_printk("entry_name %s, offset %llu, bytes %d, cmdline %s,"
- " pid %d, i_size %llu, ino %lu",
+ " pid %d, i_size %llu, ino %llu",
__get_str(pathbuf), __entry->offset, __entry->bytes,
__get_str(cmdline), __entry->pid, __entry->i_size,
- (unsigned long) __entry->ino)
+ (unsigned long long) __entry->ino)
);
DECLARE_EVENT_CLASS(f2fs__rw_end,
@@ -2415,7 +2415,7 @@ DECLARE_EVENT_CLASS(f2fs__rw_end,
TP_ARGS(inode, offset, bytes),
TP_STRUCT__entry(
- __field(ino_t, ino)
+ __field(u64, ino)
__field(loff_t, offset)
__field(int, bytes)
),
@@ -2426,8 +2426,8 @@ DECLARE_EVENT_CLASS(f2fs__rw_end,
__entry->bytes = bytes;
),
- TP_printk("ino %lu, offset %llu, bytes %d",
- (unsigned long) __entry->ino,
+ TP_printk("ino %llu, offset %llu, bytes %d",
+ (unsigned long long) __entry->ino,
__entry->offset, __entry->bytes)
);
--
2.53.0
^ permalink raw reply related
* [PATCH 07/61] lockd: update format strings for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update format strings from %ld/%lu to %lld/%llu for i_ino, which is
now a u64.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/lockd/svclock.c | 8 ++++----
fs/lockd/svcsubs.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 255a847ca0b6b9f7ab5a99c3aaa6856044ac0535..e29cbf8baf21a4ad61f4c55f7664e2063f0afcda 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -487,7 +487,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
int async_block = 0;
__be32 ret;
- dprintk("lockd: nlmsvc_lock(%s/%ld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n",
+ dprintk("lockd: nlmsvc_lock(%s/%lld, ty=%d, pi=%d, %Ld-%Ld, bl=%d)\n",
inode->i_sb->s_id, inode->i_ino,
lock->fl.c.flc_type,
lock->fl.c.flc_pid,
@@ -617,7 +617,7 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
int mode;
__be32 ret;
- dprintk("lockd: nlmsvc_testlock(%s/%ld, ty=%d, %Ld-%Ld)\n",
+ dprintk("lockd: nlmsvc_testlock(%s/%lld, ty=%d, %Ld-%Ld)\n",
nlmsvc_file_inode(file)->i_sb->s_id,
nlmsvc_file_inode(file)->i_ino,
lock->fl.c.flc_type,
@@ -676,7 +676,7 @@ nlmsvc_unlock(struct net *net, struct nlm_file *file, struct nlm_lock *lock)
{
int error = 0;
- dprintk("lockd: nlmsvc_unlock(%s/%ld, pi=%d, %Ld-%Ld)\n",
+ dprintk("lockd: nlmsvc_unlock(%s/%lld, pi=%d, %Ld-%Ld)\n",
nlmsvc_file_inode(file)->i_sb->s_id,
nlmsvc_file_inode(file)->i_ino,
lock->fl.c.flc_pid,
@@ -716,7 +716,7 @@ nlmsvc_cancel_blocked(struct net *net, struct nlm_file *file, struct nlm_lock *l
int status = 0;
int mode;
- dprintk("lockd: nlmsvc_cancel(%s/%ld, pi=%d, %Ld-%Ld)\n",
+ dprintk("lockd: nlmsvc_cancel(%s/%lld, pi=%d, %Ld-%Ld)\n",
nlmsvc_file_inode(file)->i_sb->s_id,
nlmsvc_file_inode(file)->i_ino,
lock->fl.c.flc_pid,
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index dd0214dcb69503006181a1533c440fc04a329d73..79f3dd2fd3666d835161a54a6b3d2b69e7741dd5 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -47,7 +47,7 @@ static inline void nlm_debug_print_file(char *msg, struct nlm_file *file)
{
struct inode *inode = nlmsvc_file_inode(file);
- dprintk("lockd: %s %s/%ld\n",
+ dprintk("lockd: %s %s/%llu\n",
msg, inode->i_sb->s_id, inode->i_ino);
}
#else
--
2.53.0
^ permalink raw reply related
* [PATCH 08/61] nfs: update for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update NFS for u64 i_ino:
- Simplify nfs_fileid_to_ino_t() to return u64 directly, since i_ino
can now store a full 64-bit fileid without folding on 32-bit
- Update nfs_fattr_to_ino_t() to return u64
- Update format strings from %lu/%lx to %llu/%llx
- Remove unnecessary (unsigned long) casts on i_ino
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/dir.c | 20 ++++++++++----------
fs/nfs/file.c | 8 ++++----
fs/nfs/filelayout/filelayout.c | 8 ++++----
fs/nfs/flexfilelayout/flexfilelayout.c | 8 ++++----
fs/nfs/inode.c | 10 +++++-----
fs/nfs/nfs4proc.c | 4 ++--
fs/nfs/pnfs.c | 12 ++++++------
include/linux/nfs_fs.h | 7 ++-----
8 files changed, 37 insertions(+), 40 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2402f57c8e7d932c4656a1439f1deff7954e0dc4..ddc3789363a5f8a2ef0169e37aa2292d075092c4 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1906,7 +1906,7 @@ static int nfs_weak_revalidate(struct dentry *dentry, unsigned int flags)
}
error = nfs_lookup_verify_inode(inode, flags);
- dfprintk(LOOKUPCACHE, "NFS: %s: inode %lu is %s\n",
+ dfprintk(LOOKUPCACHE, "NFS: %s: inode %llu is %s\n",
__func__, inode->i_ino, error ? "invalid" : "valid");
return !error;
}
@@ -2121,7 +2121,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
/* Expect a negative dentry */
BUG_ON(d_inode(dentry));
- dfprintk(VFS, "NFS: atomic_open(%s/%lu), %pd\n",
+ dfprintk(VFS, "NFS: atomic_open(%s/%llu), %pd\n",
dir->i_sb->s_id, dir->i_ino, dentry);
err = nfs_check_flags(open_flags);
@@ -2404,7 +2404,7 @@ static int nfs_do_create(struct inode *dir, struct dentry *dentry,
open_flags |= O_CREAT;
- dfprintk(VFS, "NFS: create(%s/%lu), %pd\n",
+ dfprintk(VFS, "NFS: create(%s/%llu), %pd\n",
dir->i_sb->s_id, dir->i_ino, dentry);
attr.ia_mode = mode;
@@ -2442,7 +2442,7 @@ nfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
struct iattr attr;
int status;
- dfprintk(VFS, "NFS: mknod(%s/%lu), %pd\n",
+ dfprintk(VFS, "NFS: mknod(%s/%llu), %pd\n",
dir->i_sb->s_id, dir->i_ino, dentry);
attr.ia_mode = mode;
@@ -2469,7 +2469,7 @@ struct dentry *nfs_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct iattr attr;
struct dentry *ret;
- dfprintk(VFS, "NFS: mkdir(%s/%lu), %pd\n",
+ dfprintk(VFS, "NFS: mkdir(%s/%llu), %pd\n",
dir->i_sb->s_id, dir->i_ino, dentry);
attr.ia_valid = ATTR_MODE;
@@ -2507,7 +2507,7 @@ int nfs_rmdir(struct inode *dir, struct dentry *dentry)
{
int error;
- dfprintk(VFS, "NFS: rmdir(%s/%lu), %pd\n",
+ dfprintk(VFS, "NFS: rmdir(%s/%llu), %pd\n",
dir->i_sb->s_id, dir->i_ino, dentry);
trace_nfs_rmdir_enter(dir, dentry);
@@ -2578,7 +2578,7 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
{
int error;
- dfprintk(VFS, "NFS: unlink(%s/%lu, %pd)\n", dir->i_sb->s_id,
+ dfprintk(VFS, "NFS: unlink(%s/%llu, %pd)\n", dir->i_sb->s_id,
dir->i_ino, dentry);
trace_nfs_unlink_enter(dir, dentry);
@@ -2638,7 +2638,7 @@ int nfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
unsigned int pathlen = strlen(symname);
int error;
- dfprintk(VFS, "NFS: symlink(%s/%lu, %pd, %s)\n", dir->i_sb->s_id,
+ dfprintk(VFS, "NFS: symlink(%s/%llu, %pd, %s)\n", dir->i_sb->s_id,
dir->i_ino, dentry, symname);
if (pathlen > PAGE_SIZE)
@@ -2660,7 +2660,7 @@ int nfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
error = NFS_PROTO(dir)->symlink(dir, dentry, folio, pathlen, &attr);
trace_nfs_symlink_exit(dir, dentry, error);
if (error != 0) {
- dfprintk(VFS, "NFS: symlink(%s/%lu, %pd, %s) error %d\n",
+ dfprintk(VFS, "NFS: symlink(%s/%llu, %pd, %s) error %d\n",
dir->i_sb->s_id, dir->i_ino,
dentry, symname, error);
d_drop(dentry);
@@ -3414,7 +3414,7 @@ int nfs_permission(struct mnt_idmap *idmap,
if (!res && (mask & MAY_EXEC))
res = nfs_execute_ok(inode, mask);
- dfprintk(VFS, "NFS: permission(%s/%lu), mask=0x%x, res=%d\n",
+ dfprintk(VFS, "NFS: permission(%s/%llu), mask=0x%x, res=%d\n",
inode->i_sb->s_id, inode->i_ino, mask, res);
return res;
out_notsup:
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 5d08b6409c284f1ee78f1c2fa327e447eee1ab69..25048a3c236436f334c87e2d58614f8af8929560 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -391,7 +391,7 @@ static int nfs_write_begin(const struct kiocb *iocb,
trace_nfs_write_begin(file_inode(file), pos, len);
- dfprintk(PAGECACHE, "NFS: write_begin(%pD2(%lu), %u@%lld)\n",
+ dfprintk(PAGECACHE, "NFS: write_begin(%pD2(%llu), %u@%lld)\n",
file, mapping->host->i_ino, len, (long long) pos);
nfs_truncate_last_folio(mapping, i_size_read(mapping->host), pos);
@@ -432,7 +432,7 @@ static int nfs_write_end(const struct kiocb *iocb,
int status;
trace_nfs_write_end(file_inode(file), pos, len);
- dfprintk(PAGECACHE, "NFS: write_end(%pD2(%lu), %u@%lld)\n",
+ dfprintk(PAGECACHE, "NFS: write_end(%pD2(%llu), %u@%lld)\n",
file, mapping->host->i_ino, len, (long long) pos);
/*
@@ -557,7 +557,7 @@ static int nfs_launder_folio(struct folio *folio)
struct inode *inode = folio->mapping->host;
int ret;
- dfprintk(PAGECACHE, "NFS: launder_folio(%ld, %llu)\n",
+ dfprintk(PAGECACHE, "NFS: launder_folio(%llu, %llu)\n",
inode->i_ino, folio_pos(folio));
folio_wait_private_2(folio); /* [DEPRECATED] */
@@ -647,7 +647,7 @@ static vm_fault_t nfs_vm_page_mkwrite(struct vm_fault *vmf)
struct address_space *mapping;
struct folio *folio = page_folio(vmf->page);
- dfprintk(PAGECACHE, "NFS: vm_page_mkwrite(%pD2(%lu), offset %lld)\n",
+ dfprintk(PAGECACHE, "NFS: vm_page_mkwrite(%pD2(%llu), offset %lld)\n",
filp, filp->f_mapping->host->i_ino,
(long long)folio_pos(folio));
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index 90a11afa5d05423bb289c7f2020ef3b82707a79c..e85380e3b11d7271a9b795e62840074834d77a72 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -241,7 +241,7 @@ filelayout_set_layoutcommit(struct nfs_pgio_header *hdr)
/* Note: if the write is unstable, don't set end_offs until commit */
pnfs_set_layoutcommit(hdr->inode, hdr->lseg, end_offs);
- dprintk("%s inode %lu pls_end_pos %lu\n", __func__, hdr->inode->i_ino,
+ dprintk("%s inode %llu pls_end_pos %lu\n", __func__, hdr->inode->i_ino,
(unsigned long) NFS_I(hdr->inode)->layout->plh_lwb);
}
@@ -456,7 +456,7 @@ filelayout_read_pagelist(struct nfs_pgio_header *hdr)
u32 j, idx;
struct nfs_fh *fh;
- dprintk("--> %s ino %lu pgbase %u req %zu@%llu\n",
+ dprintk("--> %s ino %llu pgbase %u req %zu@%llu\n",
__func__, hdr->inode->i_ino,
hdr->args.pgbase, (size_t)hdr->args.count, offset);
@@ -514,7 +514,7 @@ filelayout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
if (IS_ERR(ds_clnt))
return PNFS_NOT_ATTEMPTED;
- dprintk("%s ino %lu sync %d req %zu@%llu DS: %s cl_count %d\n",
+ dprintk("%s ino %llu sync %d req %zu@%llu DS: %s cl_count %d\n",
__func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count,
offset, ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count));
@@ -1001,7 +1001,7 @@ static int filelayout_initiate_commit(struct nfs_commit_data *data, int how)
if (IS_ERR(ds_clnt))
goto out_err;
- dprintk("%s ino %lu, how %d cl_count %d\n", __func__,
+ dprintk("%s ino %llu, how %d cl_count %d\n", __func__,
data->inode->i_ino, how, refcount_read(&ds->ds_clp->cl_count));
data->commit_done_cb = filelayout_commit_done_cb;
refcount_inc(&ds->ds_clp->cl_count);
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index f67773d52830d2ab4d12dd04caccc2077d4105e0..8b1559171fe3977f1b8461db6266c8c0d6c51ba5 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1631,7 +1631,7 @@ ff_layout_set_layoutcommit(struct inode *inode,
return;
pnfs_set_layoutcommit(inode, lseg, end_offset);
- dprintk("%s inode %lu pls_end_pos %llu\n", __func__, inode->i_ino,
+ dprintk("%s inode %llu pls_end_pos %llu\n", __func__, inode->i_ino,
(unsigned long long) NFS_I(inode)->layout->plh_lwb);
}
@@ -2136,7 +2136,7 @@ ff_layout_read_pagelist(struct nfs_pgio_header *hdr)
u32 dss_id;
bool ds_fatal_error = false;
- dprintk("--> %s ino %lu pgbase %u req %zu@%llu\n",
+ dprintk("--> %s ino %llu pgbase %u req %zu@%llu\n",
__func__, hdr->inode->i_ino,
hdr->args.pgbase, (size_t)hdr->args.count, offset);
@@ -2245,7 +2245,7 @@ ff_layout_write_pagelist(struct nfs_pgio_header *hdr, int sync)
vers = nfs4_ff_layout_ds_version(mirror, dss_id);
- dprintk("%s ino %lu sync %d req %zu@%llu DS: %s cl_count %d vers %d\n",
+ dprintk("%s ino %llu sync %d req %zu@%llu DS: %s cl_count %d vers %d\n",
__func__, hdr->inode->i_ino, sync, (size_t) hdr->args.count,
offset, ds->ds_remotestr, refcount_read(&ds->ds_clp->cl_count),
vers);
@@ -2336,7 +2336,7 @@ static int ff_layout_initiate_commit(struct nfs_commit_data *data, int how)
vers = nfs4_ff_layout_ds_version(mirror, dss_id);
- dprintk("%s ino %lu, how %d cl_count %d vers %d\n", __func__,
+ dprintk("%s ino %llu, how %d cl_count %d vers %d\n", __func__,
data->inode->i_ino, how, refcount_read(&ds->ds_clp->cl_count),
vers);
data->commit_done_cb = ff_layout_commit_done_cb;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 4786343eeee0f874aa1f31ace2f35fdcb83fc7a6..38c7b79e76b3f9eb21d325b98708fe67d159076f 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -66,10 +66,10 @@ static int nfs_update_inode(struct inode *, struct nfs_fattr *);
static struct kmem_cache * nfs_inode_cachep;
-static inline unsigned long
+static inline u64
nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
{
- return nfs_fileid_to_ino_t(fattr->fileid);
+ return fattr->fileid;
}
int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
@@ -2258,7 +2258,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
bool attr_changed = false;
bool have_delegation;
- dfprintk(VFS, "NFS: %s(%s/%lu fh_crc=0x%08x ct=%d info=0x%llx)\n",
+ dfprintk(VFS, "NFS: %s(%s/%llu fh_crc=0x%08x ct=%d info=0x%llx)\n",
__func__, inode->i_sb->s_id, inode->i_ino,
nfs_display_fhandle_hash(NFS_FH(inode)),
icount_read(inode), fattr->valid);
@@ -2288,7 +2288,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
/*
* Big trouble! The inode has become a different object.
*/
- printk(KERN_DEBUG "NFS: %s: inode %lu mode changed, %07o to %07o\n",
+ printk(KERN_DEBUG "NFS: %s: inode %llu mode changed, %07o to %07o\n",
__func__, inode->i_ino, inode->i_mode, fattr->mode);
goto out_err;
}
@@ -2358,7 +2358,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
if (S_ISDIR(inode->i_mode))
nfs_force_lookup_revalidate(inode);
attr_changed = true;
- dprintk("NFS: change_attr change on server for file %s/%ld\n",
+ dprintk("NFS: change_attr change on server for file %s/%lld\n",
inode->i_sb->s_id,
inode->i_ino);
} else if (!have_delegation) {
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 91bcf67bd743f72a008a9dcde29207bf7a36c407..d839a97df822abb9fb0efd25f3402fcca82d4038 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4714,7 +4714,7 @@ static int _nfs4_proc_lookupp(struct inode *inode,
nfs_fattr_init(fattr);
nfs4_init_sequence(server->nfs_client, &args.seq_args, &res.seq_res, 0, 0);
- dprintk("NFS call lookupp ino=0x%lx\n", inode->i_ino);
+ dprintk("NFS call lookupp ino=0x%llx\n", inode->i_ino);
status = nfs4_do_call_sync(clnt, server, &msg, &args.seq_args,
&res.seq_res, task_flags);
dprintk("NFS reply lookupp: %d\n", status);
@@ -10019,7 +10019,7 @@ nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *data, bool sync)
int status = 0;
dprintk("NFS: initiating layoutcommit call. sync %d "
- "lbw: %llu inode %lu\n", sync,
+ "lbw: %llu inode %llu\n", sync,
data->args.lastbytewritten,
data->args.inode->i_ino);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index bc13d1e69449ce9bb3ed3ef0bbff06dfab5c60b5..e79deb9bf664df3424d9c26d3390799969d0499e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -891,7 +891,7 @@ pnfs_layout_free_bulk_destroy_list(struct list_head *layout_list,
while (!list_empty(layout_list)) {
lo = list_entry(layout_list->next, struct pnfs_layout_hdr,
plh_bulk_destroy);
- dprintk("%s freeing layout for inode %lu\n", __func__,
+ dprintk("%s freeing layout for inode %llu\n", __func__,
lo->plh_inode->i_ino);
inode = lo->plh_inode;
@@ -1440,7 +1440,7 @@ _pnfs_return_layout(struct inode *ino)
int status = 0;
bool send, valid_layout;
- dprintk("NFS: %s for inode %lu\n", __func__, ino->i_ino);
+ dprintk("NFS: %s for inode %llu\n", __func__, ino->i_ino);
spin_lock(&ino->i_lock);
lo = nfsi->layout;
@@ -3055,7 +3055,7 @@ pnfs_try_to_write_data(struct nfs_pgio_header *hdr,
hdr->mds_ops = call_ops;
- dprintk("%s: Writing ino:%lu %u@%llu (how %d)\n", __func__,
+ dprintk("%s: Writing ino:%llu %u@%llu (how %d)\n", __func__,
inode->i_ino, hdr->args.count, hdr->args.offset, how);
trypnfs = nfss->pnfs_curr_ld->write_pagelist(hdr, how);
if (trypnfs != PNFS_NOT_ATTEMPTED)
@@ -3181,7 +3181,7 @@ pnfs_try_to_read_data(struct nfs_pgio_header *hdr,
hdr->mds_ops = call_ops;
- dprintk("%s: Reading ino:%lu %u@%llu\n",
+ dprintk("%s: Reading ino:%llu %u@%llu\n",
__func__, inode->i_ino, hdr->args.count, hdr->args.offset);
trypnfs = nfss->pnfs_curr_ld->read_pagelist(hdr);
@@ -3314,7 +3314,7 @@ pnfs_set_layoutcommit(struct inode *inode, struct pnfs_layout_segment *lseg,
if (!test_and_set_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags)) {
nfsi->layout->plh_lwb = end_pos;
mark_as_dirty = true;
- dprintk("%s: Set layoutcommit for inode %lu ",
+ dprintk("%s: Set layoutcommit for inode %llu ",
__func__, inode->i_ino);
} else if (end_pos > nfsi->layout->plh_lwb)
nfsi->layout->plh_lwb = end_pos;
@@ -3363,7 +3363,7 @@ pnfs_layoutcommit_inode(struct inode *inode, bool sync)
if (!pnfs_layoutcommit_outstanding(inode))
return 0;
- dprintk("--> %s inode %lu\n", __func__, inode->i_ino);
+ dprintk("--> %s inode %llu\n", __func__, inode->i_ino);
status = -EAGAIN;
if (test_and_set_bit(NFS_INO_LAYOUTCOMMITTING, &nfsi->flags)) {
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 8dd79a3f3d662bfe8ef8f72bb88ad1e2cd40527e..0e6d03c10c3de91cac4cd4d08c961e171cbf9a41 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -667,13 +667,10 @@ static inline loff_t nfs_size_to_loff_t(__u64 size)
return min_t(u64, size, OFFSET_MAX);
}
-static inline ino_t
+static inline u64
nfs_fileid_to_ino_t(u64 fileid)
{
- ino_t ino = (ino_t) fileid;
- if (sizeof(ino_t) < sizeof(u64))
- ino ^= fileid >> (sizeof(u64)-sizeof(ino_t)) * 8;
- return ino;
+ return fileid;
}
static inline void nfs_ooo_clear(struct nfs_inode *nfsi)
--
2.53.0
^ permalink raw reply related
* [PATCH 09/61] nfs: remove nfs_fattr_to_ino_t() and nfs_fileid_to_ino_t()
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Now that i_ino is u64, these helpers are trivial identity functions that
just return the fileid unchanged. Remove them and use fattr->fileid
directly at the two call sites.
nfs_fileid_to_ino_t() had no callers at all.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/inode.c | 17 +++--------------
include/linux/nfs_fs.h | 6 ------
2 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 38c7b79e76b3f9eb21d325b98708fe67d159076f..d88f5689548bcb4e27d6087a49b525762fbaa9e2 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -66,12 +66,6 @@ static int nfs_update_inode(struct inode *, struct nfs_fattr *);
static struct kmem_cache * nfs_inode_cachep;
-static inline u64
-nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
-{
- return fattr->fileid;
-}
-
int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
{
if (unlikely(nfs_current_task_exiting()))
@@ -413,14 +407,12 @@ nfs_ilookup(struct super_block *sb, struct nfs_fattr *fattr, struct nfs_fh *fh)
.fattr = fattr,
};
struct inode *inode;
- unsigned long hash;
if (!(fattr->valid & NFS_ATTR_FATTR_FILEID) ||
!(fattr->valid & NFS_ATTR_FATTR_TYPE))
return NULL;
- hash = nfs_fattr_to_ino_t(fattr);
- inode = ilookup5(sb, hash, nfs_find_actor, &desc);
+ inode = ilookup5(sb, fattr->fileid, nfs_find_actor, &desc);
dprintk("%s: returning %p\n", __func__, inode);
return inode;
@@ -456,7 +448,6 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
};
struct inode *inode = ERR_PTR(-ENOENT);
u64 fattr_supported = NFS_SB(sb)->fattr_valid;
- unsigned long hash;
nfs_attr_check_mountpoint(sb, fattr);
@@ -467,9 +458,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
if ((fattr->valid & NFS_ATTR_FATTR_TYPE) == 0)
goto out_no_inode;
- hash = nfs_fattr_to_ino_t(fattr);
-
- inode = iget5_locked(sb, hash, nfs_find_actor, nfs_init_locked, &desc);
+ inode = iget5_locked(sb, fattr->fileid, nfs_find_actor, nfs_init_locked, &desc);
if (inode == NULL) {
inode = ERR_PTR(-ENOMEM);
goto out_no_inode;
@@ -481,7 +470,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
/* We set i_ino for the few things that still rely on it,
* such as stat(2) */
- inode->i_ino = hash;
+ inode->i_ino = fattr->fileid;
/* We can't support update_atime(), since the server will reset it */
inode->i_flags |= S_NOATIME|S_NOCMTIME;
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 0e6d03c10c3de91cac4cd4d08c961e171cbf9a41..816670562d17b3f46ec2d22d4f9412e42f7e1a3b 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -667,12 +667,6 @@ static inline loff_t nfs_size_to_loff_t(__u64 size)
return min_t(u64, size, OFFSET_MAX);
}
-static inline u64
-nfs_fileid_to_ino_t(u64 fileid)
-{
- return fileid;
-}
-
static inline void nfs_ooo_clear(struct nfs_inode *nfsi)
{
nfsi->cache_validity &= ~NFS_INO_DATA_INVAL_DEFER;
--
2.53.0
^ permalink raw reply related
* [PATCH 10/61] nfs: remove nfs_compat_user_ino64()
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Now that i_ino is u64, the VFS stat path handles 64-bit inode numbers
natively. The truncation to 32-bit st_ino (with -EOVERFLOW) is handled
by cp_new_stat() and cp_compat_stat() in the generic stat code, so the
NFS-specific XOR-folding hack is no longer needed.
Remove nfs_compat_user_ino64() and have callers pass the full 64-bit
fileid directly to stat->ino and dir_emit(), both of which accept u64.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/dir.c | 2 +-
fs/nfs/inode.c | 25 +------------------------
include/linux/nfs_fs.h | 1 -
3 files changed, 2 insertions(+), 26 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ddc3789363a5f8a2ef0169e37aa2292d075092c4..a9ef74d0cff8de58a42be9c2c94af428a347bb2e 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1107,7 +1107,7 @@ static void nfs_do_filldir(struct nfs_readdir_descriptor *desc,
ent = &array->array[i];
if (!dir_emit(desc->ctx, ent->name, ent->name_len,
- nfs_compat_user_ino64(ent->ino), ent->d_type)) {
+ ent->ino, ent->d_type)) {
desc->eob = true;
break;
}
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index d88f5689548bcb4e27d6087a49b525762fbaa9e2..1a7d7bafbb623ab603b8c517628343463277e096 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -77,29 +77,6 @@ int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
}
EXPORT_SYMBOL_GPL(nfs_wait_bit_killable);
-/**
- * nfs_compat_user_ino64 - returns the user-visible inode number
- * @fileid: 64-bit fileid
- *
- * This function returns a 32-bit inode number if the boot parameter
- * nfs.enable_ino64 is zero.
- */
-u64 nfs_compat_user_ino64(u64 fileid)
-{
-#ifdef CONFIG_COMPAT
- compat_ulong_t ino;
-#else
- unsigned long ino;
-#endif
-
- if (enable_ino64)
- return fileid;
- ino = fileid;
- if (sizeof(ino) < sizeof(fileid))
- ino ^= fileid >> (sizeof(fileid)-sizeof(ino)) * 8;
- return ino;
-}
-
int nfs_drop_inode(struct inode *inode)
{
return NFS_STALE(inode) || inode_generic_drop(inode);
@@ -1061,7 +1038,7 @@ int nfs_getattr(struct mnt_idmap *idmap, const struct path *path,
stat->result_mask = nfs_get_valid_attrmask(inode) | request_mask;
generic_fillattr(&nop_mnt_idmap, request_mask, inode, stat);
- stat->ino = nfs_compat_user_ino64(NFS_FILEID(inode));
+ stat->ino = NFS_FILEID(inode);
stat->change_cookie = inode_peek_iversion_raw(inode);
stat->attributes_mask |= STATX_ATTR_CHANGE_MONOTONIC;
if (server->change_attr_type != NFS4_CHANGE_TYPE_IS_UNDEFINED)
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 816670562d17b3f46ec2d22d4f9412e42f7e1a3b..d721a8acbb449666941ec19b18386b42c152db10 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -472,7 +472,6 @@ extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context
extern void nfs_file_clear_open_context(struct file *flip);
extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx);
extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx);
-extern u64 nfs_compat_user_ino64(u64 fileid);
extern void nfs_fattr_init(struct nfs_fattr *fattr);
extern void nfs_fattr_set_barrier(struct nfs_fattr *fattr);
extern unsigned long nfs_inc_attr_generation_counter(void);
--
2.53.0
^ permalink raw reply related
* [PATCH 11/61] nfs: remove enable_ino64 module parameter
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
The enable_ino64 module parameter controlled whether NFS presented
64-bit or XOR-folded 32-bit inode numbers to userspace. With i_ino now
being u64 and the compat folding function removed, this parameter has
no remaining consumers.
Remove the parameter, the NFS_64_BIT_INODE_NUMBERS_ENABLED macro, and
the enable_ino64 variable.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfs/inode.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 1a7d7bafbb623ab603b8c517628343463277e096..8743f3bd96a7b5915ae892abe731f159a7055d40 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -57,11 +57,6 @@
#define NFSDBG_FACILITY NFSDBG_VFS
-#define NFS_64_BIT_INODE_NUMBERS_ENABLED 1
-
-/* Default is to see 64-bit inode numbers */
-static bool enable_ino64 = NFS_64_BIT_INODE_NUMBERS_ENABLED;
-
static int nfs_update_inode(struct inode *, struct nfs_fattr *);
static struct kmem_cache * nfs_inode_cachep;
@@ -2770,7 +2765,6 @@ static void __exit exit_nfs_fs(void)
MODULE_AUTHOR("Olaf Kirch <okir@monad.swb.de>");
MODULE_DESCRIPTION("NFS client support");
MODULE_LICENSE("GPL");
-module_param(enable_ino64, bool, 0644);
module_init(init_nfs_fs)
module_exit(exit_nfs_fs)
--
2.53.0
^ permalink raw reply related
* [PATCH 12/61] nfsd: update format strings for u64 i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
Update format strings from %ld/%lu to %lld/%llu for i_ino, which is
now a u64.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/nfsd/export.c | 2 +-
fs/nfsd/nfs4state.c | 4 ++--
fs/nfsd/nfsfh.c | 4 ++--
fs/nfsd/vfs.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 8fdbba7cad96443d92cc7fdeea6158c4cc681be1..334b63eb966e71e6af6adde61aa1123f01b4390b 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1039,7 +1039,7 @@ exp_rootfh(struct net *net, struct auth_domain *clp, char *name,
}
inode = d_inode(path.dentry);
- dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%ld)\n",
+ dprintk("nfsd: exp_rootfh(%s [%p] %s:%s/%lld)\n",
name, path.dentry, clp->name,
inode->i_sb->s_id, inode->i_ino);
exp = exp_parent(cd, clp, &path);
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 6b9c399b89dfb71a52b9c97f0efe9a1dea0558a6..a569d89ac9123d66bb47e7d74c7c98610de21da2 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1253,7 +1253,7 @@ static void nfsd4_finalize_deleg_timestamps(struct nfs4_delegation *dp, struct f
if (ret) {
struct inode *inode = file_inode(f);
- pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%lu: %d\n",
+ pr_notice_ratelimited("nfsd: Unable to update timestamps on inode %02x:%02x:%llu: %d\n",
MAJOR(inode->i_sb->s_dev),
MINOR(inode->i_sb->s_dev),
inode->i_ino, ret);
@@ -2888,7 +2888,7 @@ static void nfs4_show_superblock(struct seq_file *s, struct nfsd_file *f)
{
struct inode *inode = file_inode(f->nf_file);
- seq_printf(s, "superblock: \"%02x:%02x:%ld\"",
+ seq_printf(s, "superblock: \"%02x:%02x:%llu\"",
MAJOR(inode->i_sb->s_dev),
MINOR(inode->i_sb->s_dev),
inode->i_ino);
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index ed85dd43da18e6d4c4667ff14dc035f2eacff1d6..cfd143b41eb1fb53868f378d668905c1c7d5f868 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -601,9 +601,9 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
struct inode * inode = d_inode(dentry);
dev_t ex_dev = exp_sb(exp)->s_dev;
- dprintk("nfsd: fh_compose(exp %02x:%02x/%ld %pd2, ino=%ld)\n",
+ dprintk("nfsd: fh_compose(exp %02x:%02x/%lld %pd2, ino=%lld)\n",
MAJOR(ex_dev), MINOR(ex_dev),
- (long) d_inode(exp->ex_path.dentry)->i_ino,
+ (long long) d_inode(exp->ex_path.dentry)->i_ino,
dentry,
(inode ? inode->i_ino : 0));
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index c884c3f34afb044ee5cacc962a04a97de2f7fd88..dde09f3734c2844a3fe0b6d18d596276a19aa2d1 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1163,7 +1163,7 @@ nfsd_direct_read(struct svc_rqst *rqstp, struct svc_fh *fhp,
} else if (unlikely(host_err == -EINVAL)) {
struct inode *inode = d_inode(fhp->fh_dentry);
- pr_info_ratelimited("nfsd: Direct I/O alignment failure on %s/%ld\n",
+ pr_info_ratelimited("nfsd: Direct I/O alignment failure on %s/%lld\n",
inode->i_sb->s_id, inode->i_ino);
host_err = -ESERVERFAULT;
}
--
2.53.0
^ permalink raw reply related
* [PATCH 13/61] smb: store full 64-bit uniqueid in i_ino
From: Jeff Layton @ 2026-02-26 15:55 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, Steven Rostedt,
Masami Hiramatsu, Mathieu Desnoyers, Dan Williams, Matthew Wilcox,
Eric Biggers, Theodore Y. Ts'o, Muchun Song, Oscar Salvador,
David Hildenbrand, David Howells, Paulo Alcantara, Andreas Dilger,
Jan Kara, Jaegeuk Kim, Chao Yu, Trond Myklebust, Anna Schumaker,
Chuck Lever, NeilBrown, Olga Kornievskaia, Dai Ngo, Tom Talpey,
Steve French, Ronnie Sahlberg, Shyam Prasad N, Bharath SM,
Alexander Aring, Ryusuke Konishi, Viacheslav Dubeyko,
Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
Christian Schoenebeck, David Sterba, Marc Dionne, Ian Kent,
Luis de Bethencourt, Salah Triki, Tigran A. Aivazian,
Ilya Dryomov, Alex Markuze, Jan Harkes, coda, Nicolas Pitre,
Tyler Hicks, Amir Goldstein, Christoph Hellwig,
John Paul Adrian Glaubitz, Yangtao Li, Mikulas Patocka,
David Woodhouse, Richard Weinberger, Dave Kleikamp,
Konstantin Komarov, Mark Fasheh, Joel Becker, Joseph Qi,
Mike Marshall, Martin Brandenburg, Miklos Szeredi, Anders Larsen,
Zhihao Cheng, Damien Le Moal, Naohiro Aota, Johannes Thumshirn,
John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
Mimi Zohar, Roberto Sassu, Dmitry Kasatkin, Eric Snowberg, Fan Wu,
Stephen Smalley, Ondrej Mosnacek, Casey Schaufler, Alex Deucher,
Christian König, David Airlie, Simona Vetter, Sumit Semwal,
Eric Dumazet, Kuniyuki Iwashima, Paolo Abeni, Willem de Bruijn,
David S. Miller, Jakub Kicinski, Simon Horman, Oleg Nesterov,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
Ian Rogers, Adrian Hunter, James Clark, Darrick J. Wong,
Martin Schiller
Cc: linux-fsdevel, linux-kernel, linux-trace-kernel, nvdimm, fsverity,
linux-mm, netfs, linux-ext4, linux-f2fs-devel, linux-nfs,
linux-cifs, samba-technical, linux-nilfs, v9fs, linux-afs, autofs,
ceph-devel, codalist, ecryptfs, linux-mtd, jfs-discussion, ntfs3,
ocfs2-devel, devel, linux-unionfs, apparmor,
linux-security-module, linux-integrity, selinux, amd-gfx,
dri-devel, linux-media, linaro-mm-sig, netdev, linux-perf-users,
linux-fscrypt, linux-xfs, linux-hams, linux-x25, Jeff Layton
In-Reply-To: <20260226-iino-u64-v1-0-ccceff366db9@kernel.org>
With i_ino now u64, CIFS/SMB can store the full 64-bit uniqueid in
i_ino without the XOR-folding hack previously needed on 32-bit
architectures.
- Simplify cifs_uniqueid_to_ino_t() to return u64 directly
- Update hash variable type in cifs_get_inode_info()
- Update format strings from %lu to %llu
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/smb/client/cifsfs.h | 12 +++---------
fs/smb/client/inode.c | 4 ++--
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/fs/smb/client/cifsfs.h b/fs/smb/client/cifsfs.h
index e320d39b01f5eca8033cc516f6f1a2f07276676c..4a1f18022c711a7ff5b141d08ec6cac8483a6b6a 100644
--- a/fs/smb/client/cifsfs.h
+++ b/fs/smb/client/cifsfs.h
@@ -14,18 +14,12 @@
#define ROOT_I 2
/*
- * ino_t is 32-bits on 32-bit arch. We have to squash the 64-bit value down
- * so that it will fit. We use hash_64 to convert the value to 31 bits, and
- * then add 1, to ensure that we don't end up with a 0 as the value.
+ * With i_ino being u64, we can store the full 64-bit uniqueid directly.
*/
-static inline ino_t
+static inline u64
cifs_uniqueid_to_ino_t(u64 fileid)
{
- if ((sizeof(ino_t)) < (sizeof(u64)))
- return (ino_t)hash_64(fileid, (sizeof(ino_t) * 8) - 1) + 1;
-
- return (ino_t)fileid;
-
+ return fileid;
}
static inline void cifs_set_time(struct dentry *dentry, unsigned long time)
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index d4d3cfeb6c90ee6dc71fcd9a8de31a1785cbb9ef..102e7615b658726551e9b01ba25065d1f0c505ac 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -1611,13 +1611,13 @@ inode_has_hashed_dentries(struct inode *inode)
struct inode *
cifs_iget(struct super_block *sb, struct cifs_fattr *fattr)
{
- unsigned long hash;
+ u64 hash;
struct inode *inode;
retry_iget5_locked:
cifs_dbg(FYI, "looking for uniqueid=%llu\n", fattr->cf_uniqueid);
- /* hash down to 32-bits on 32-bit arch */
+ /* With u64 i_ino, we can use the full uniqueid */
hash = cifs_uniqueid_to_ino_t(fattr->cf_uniqueid);
inode = iget5_locked(sb, hash, cifs_find_inode, cifs_init_inode, fattr);
--
2.53.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox