[Devel] [PATCH RHEL7 COMMIT] ms/fs/writeback: fix lazyatime dirty inode writeback

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 1 19:00:01 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.27.2.vz7.107.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.27.2.vz7.107.11
------>
commit 58c21359e9faba2df5887e85838ae5dc493e7a2b
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date:   Tue Oct 1 18:59:59 2019 +0300

    ms/fs/writeback: fix lazyatime dirty inode writeback
    
    Backport of the upstream commit
    0ae45f63d4ef ("vfs: add support for a lazytime mount option")
    missed hunk in move_expired_inode() leading to incorrect timeout check
    for dirty_time inodes which leads to flushing these dirty inodes too soon.
    
    Fix this up by using correct older_than_this variable instead of
    work->older_than_this.
    
    Fixes: 3b6234af8d34 ("ms/vfs: add support for a lazytime mount option")
    Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
 fs/fs-writeback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index fd2a666a4a40..76c1aa26fd6f 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -324,8 +324,8 @@ static int move_expired_inodes(struct list_head *delaying_queue,
 
 	while (!list_empty(delaying_queue)) {
 		inode = wb_inode(delaying_queue->prev);
-		if (work->older_than_this &&
-		    inode_dirtied_after(inode, *work->older_than_this))
+		if (older_than_this &&
+		    inode_dirtied_after(inode, *older_than_this))
 			break;
 		list_move(&inode->i_io_list, &tmp);
 		moved++;



More information about the Devel mailing list