Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2050733ybi; Thu, 20 Jun 2019 08:19:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDokALrR7i3rU3y8RroDAzc/i4tmcF1wrFiH0alPqSB8dvHo34m7pVfzQNm1m6bIkBul95 X-Received: by 2002:aa7:934f:: with SMTP id 15mr50571022pfn.238.1561043952624; Thu, 20 Jun 2019 08:19:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561043952; cv=none; d=google.com; s=arc-20160816; b=iclnfa2BZajEM2bq5AjukAhu2pzWwkVHKxVmVcMzeDkWTbLFj2kU9CkPvsgZ8EIKEc tAXmXbbzVF8D2bS6OijYOUv5CAkM/MUqpOuRfLiQariCOCrG3Q6QqY84rY4JjU0toNZb ZNNSyV3wTPeUlsCkzzFu2puNK+8NSnBNBWJPk6LyzGcqLw1gqVFTINqqr8wxdJNZkK6a V4jbQCVCgBhoGfBWUeLtEKWfBT1/FpZm4cCe7mmn4igCfJXbstLTZLXqRIS4FOYW+qcm I2wp34gwQHkpWIuUyFDDx0GNPir6Q+A898EXsR7cO9i4hCX9DL3+7LwTRPbnTB9hdsKG VgBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=cjD1oM5q5tMvxLtnHLi6QjIV6Kzj0WhrdaBw8sxqP6E=; b=q0ZU9ElXD+s/ttUW/FTV+ABGbhW7IdjSESPVib4wxMOQXQPeszaB1drmmvjPjRYS4y vs2GR1fqLXCKiV30JzjJsrqA75lvCuzcRhjUmIEj20Z6Nd/t0/VKShXW1axmkVa7pgnS e3P/jFtATZ8b3a8ksOG9L99RWJTpTH+c2Of7aZr/AjqdV+icP/0ofrqwwbcySSijgJJk cXcRH9pmjbHwHc0SBYn7UFepQVOGRKNlUttd3PtrcJYf3136WLqP6q8/+3OGweG89zmF O4hWvNDs52fzFNVChrr1bjPSkDXWHJ+e3Kxe5cz3z4q3U77LXoMLRDIJa68QtJZ+zes0 +0fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="KL5ut//f"; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11si29864pjn.44.2019.06.20.08.18.57; Thu, 20 Jun 2019 08:19:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="KL5ut//f"; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727050AbfFTPSv (ORCPT + 99 others); Thu, 20 Jun 2019 11:18:51 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:32965 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbfFTPSu (ORCPT ); Thu, 20 Jun 2019 11:18:50 -0400 Received: by mail-io1-f67.google.com with SMTP id u13so1348527iop.0 for ; Thu, 20 Jun 2019 08:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cjD1oM5q5tMvxLtnHLi6QjIV6Kzj0WhrdaBw8sxqP6E=; b=KL5ut//fcz2BIKILaDyB8ohi01uo46BlAttcUNa51KKAK1tcFXFhC8SCH2ucE0+zu0 joRzLAIQOyAlR2Jt4XsZvDwQoJQxyJxF0Eha7wO+Lcc8hMsDmgZFzdjia1zGXgTCUqe+ R4q+jSRaCPpupw065Ncg6Ytj3OtHHyjuvu7rI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=cjD1oM5q5tMvxLtnHLi6QjIV6Kzj0WhrdaBw8sxqP6E=; b=aMVYj84WL9Vrh9OGj7hSAuIjR251lxKNucOLvC2g2a3pg+hQdD6HClGMnb3TKT8U+f XkTgzMxOC+ADftOMFeWpbzS/OFkbOx42kGBCjkBqlM6o5gSENYQptvvcJcVoRQKA1J4T +uOLQlxA3BNnYfkBiAYvY6w0nH6K1XPGlhRSej07ZdFQO8ty/0pvs/gpENbndXhAtyCl BWjUU9Rzv/s7R101oHNuCJp8Tmme20ZX9z2vo1XlxbFzYVG5AYEIubZjnlJDm0IiGG5A RX1zIUm6Vy1TZWfMzRvguKZ3QDWGQP+KCBmtm5UTTlWyyHfQgb126HbsNfSmivXU5mGz rLkw== X-Gm-Message-State: APjAAAWXt9Zs8FUBbOb1ckpS64giclVVCX9HSYGJsAMgLDY8NNPBTJYS nEXGlMsWr6ECAJavP5kqzIXs2w== X-Received: by 2002:a6b:641a:: with SMTP id t26mr5195793iog.3.1561043929997; Thu, 20 Jun 2019 08:18:49 -0700 (PDT) Received: from localhost ([2620:15c:183:200:855f:8919:84a7:4794]) by smtp.gmail.com with ESMTPSA id c23sm140526iod.11.2019.06.20.08.18.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jun 2019 08:18:49 -0700 (PDT) From: Ross Zwisler X-Google-Original-From: Ross Zwisler To: linux-kernel@vger.kernel.org Cc: Ross Zwisler , "Theodore Ts'o" , Alexander Viro , Andreas Dilger , Jan Kara , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Fletcher Woodruff , Justin TerAvest Subject: [PATCH v2 0/3] Add dirty range scoping to jbd2 Date: Thu, 20 Jun 2019 09:18:36 -0600 Message-Id: <20190620151839.195506-1-zwisler@google.com> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Changes from v1: - Relocated the code which resets dirty range upon transaction completion. (Jan) - Cc'd stable@vger.kernel.org because we see this issue with v4.14 and v4.19 stable kernels in the field. --- This patch series fixes the issue I described here: https://www.spinics.net/lists/linux-block/msg38274.html Essentially the issue is that journal_finish_inode_data_buffers() operates on the entire address space of each of the inodes associated with a given journal entry. This means that if we have an inode where we are constantly appending dirty pages we can end up waiting for an indefinite amount of time in journal_finish_inode_data_buffers(). This series improves this situation in ext4 by scoping each of the inode dirty ranges associated with a given transaction. Other users of jbd2 which don't (yet?) take advantage of this scoping (ocfs2) will continue to have the old behavior. Ross Zwisler (3): mm: add filemap_fdatawait_range_keep_errors() jbd2: introduce jbd2_inode dirty range scoping ext4: use jbd2_inode dirty range scoping fs/ext4/ext4_jbd2.h | 12 +++++------ fs/ext4/inode.c | 13 +++++++++--- fs/ext4/move_extent.c | 3 ++- fs/jbd2/commit.c | 23 ++++++++++++++------ fs/jbd2/journal.c | 2 ++ fs/jbd2/transaction.c | 49 ++++++++++++++++++++++++------------------- include/linux/fs.h | 2 ++ include/linux/jbd2.h | 22 +++++++++++++++++++ mm/filemap.c | 22 +++++++++++++++++++ 9 files changed, 111 insertions(+), 37 deletions(-) -- 2.22.0.410.gd8fdbe21b5-goog