linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 219306] New: ext4_truncate() is being called endlessly, all the time
@ 2024-09-24 11:38 bugzilla-daemon
  2024-09-24 15:08 ` [Bug 219306] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2024-09-24 11:38 UTC (permalink / raw)
  To: linux-ext4

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-25 22:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24 11:38 [Bug 219306] New: ext4_truncate() is being called endlessly, all the time bugzilla-daemon
2024-09-24 15:08 ` [Bug 219306] " bugzilla-daemon
2024-09-25  0:10 ` bugzilla-daemon
2024-09-25 13:36 ` bugzilla-daemon
2024-09-25 22:31 ` bugzilla-daemon

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).