From: bugzilla-daemon@kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 219306] New: ext4_truncate() is being called endlessly, all the time
Date: Tue, 24 Sep 2024 11:38:38 +0000 [thread overview]
Message-ID: <bug-219306-13602@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=219306
Bug ID: 219306
Summary: ext4_truncate() is being called endlessly, all the
time
Product: File System
Version: 2.5
Hardware: i386
OS: Linux
Status: NEW
Severity: low
Priority: P3
Component: ext4
Assignee: fs_ext4@kernel-bugs.osdl.org
Reporter: linmaxi@gmail.com
Regression: No
At file ./linux/fs/ext4/extents.c there is this function:
int ext4_ext_truncate(handle_t *handle, struct inode *inode) {...}
Which is being called all the time, from the moment the machine is booted.
Steps to reproduce: To witness it, just inject a simple printk at the beggining
of the function and checkout dmesg.
After some lookup, it turns out the inode that is being passed to the function
is
of the file: /var/log/journal/7c8e96117d45417e980f5fec3775d67f/system.journal.
The calling function is ext4_setattr(...) in the file ./linux/fs/ext4/inode.c.
At that function we have the following code:
/*
* Call ext4_truncate() even if i_size didn't change to
* truncate possible preallocated blocks.
*/
if (attr->ia_size <= oldsize) {
rc = ext4_truncate(inode);
if (rc)
error = rc;
}
Looks like this function is being called on system.journal file but without
actually having it's size changed. Although the comment appears to justify
calling the function even when the size is unchanged, it is probably unintended
that the function will be ran at such a high frequency without doing anything.
I'd like to ask for thoughts on this, and I'd be glad to fix it myself if
possible.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2024-09-24 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 11:38 bugzilla-daemon [this message]
2024-09-24 15:08 ` [Bug 219306] ext4_truncate() is being called endlessly, all the time bugzilla-daemon
2024-09-25 0:10 ` bugzilla-daemon
2024-09-25 13:36 ` bugzilla-daemon
2024-09-25 22:31 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-219306-13602@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).