Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2962561pxb; Mon, 17 Jan 2022 09:04:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHxRa8nXTxOhbzbkQSO+nLU0Y2vdLzwfPePkuifyzTMIxAaeugVPqxhNR+r8cv62+ZYHZh X-Received: by 2002:a63:81c1:: with SMTP id t184mr11766637pgd.33.1642439084857; Mon, 17 Jan 2022 09:04:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642439084; cv=none; d=google.com; s=arc-20160816; b=H+NZPhWJKDDkyPYi9h8cSM0bu2IpkEYbKznf7nFnRS5hDLG4MjXbz3EUIDVzK8ni/6 F9YXQfKw5Qordn6FAKzIgpYWfzjOMyOrgmn8in/MtwiCxaDNqrhD1yzkAkbEDm3S9WIi uiwmCW51XLDKlN6LqGR1o1qbp0ykO8Z4LEwKqmd/RE4hby9C4WbHnAp6nHtf76brqX1G VW3ZCOwUQvZkUtSaoc6v1DuWzGF1NmhLnsGyc5d8ZdbbXLVvZ53JMqRJhV2sWY7yyC91 gFyPa3M61QzqBB6Pmcj7KlhdU1blDTxE8zlgIK3x4O5oxnvh53tGDQ2o8s7M1QQqyXx/ GtNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bvPpCs+ezXbQSTZ8OgmJhT9FWSW4EaMX0JrbDvZ8imQ=; b=dDMAlynto7jHeK2pzzs5FCa6EZmkHEMuJ19xj2z05aPXolN4mHZOba1aeLlC+TxwQI R6Sx0TmSU7JoG2AAgbgOfwf68LhMjx06nVcTTQKY+NJMF1WYJ79138jd+CcnpxEg9BB5 vMfdqP7mjMAqEEFdm8DRUMxDZm4wdu+SdlUeIiZo7pVSwFK2iKQqt86jSJnYXJESLY7o Ei+wQLrA9APLMru4R7VYvraiDl4fsuaVlo6nMkwIR9ozbmKWCq2XG0eOd2gOIaxW8Q4Q esEv9ssl3ilzy2KAh9ZovBOuVvTO2u7a2Za+4gRY1svKH1ji7CWENNW0gEMla5gfgusc Qa4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=TKIDUYPO; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si16265273plh.230.2022.01.17.09.04.30; Mon, 17 Jan 2022 09:04:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=TKIDUYPO; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235737AbiAQJhS (ORCPT + 99 others); Mon, 17 Jan 2022 04:37:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235688AbiAQJhR (ORCPT ); Mon, 17 Jan 2022 04:37:17 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88C31C06161C for ; Mon, 17 Jan 2022 01:37:17 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id m21so9731747pfd.3 for ; Mon, 17 Jan 2022 01:37:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bvPpCs+ezXbQSTZ8OgmJhT9FWSW4EaMX0JrbDvZ8imQ=; b=TKIDUYPO6HG01wxRyk0XR3cvXtqwODkG7069aj4SHHe22mWRkWMnAHoIB/y5e51NWq j7p0X4/gs8CGTp92hagv50gQ282ej0LxH8OyDCFz49UJu5tCrQMruv6jtAlQIFpKoifZ QI6DXJ/qGJrtrQ0cwVB40pH2j5lrftXA91pptdLUjs4hjem9Pp28Lf6FdRcWiNpHu8dL AvXXG/pyVB1WEhVdsfrhIc5kmLReIv/4MBW+nXjkIxt/atIm8ZT0dtjUaNLEFQQZy3y/ g9ydxSVpkp7mNgC/8bx5g+BM5jI+KzQsmwd/x82hcbFdFMYVqithii+N4f0otRT2pVRk Zh4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bvPpCs+ezXbQSTZ8OgmJhT9FWSW4EaMX0JrbDvZ8imQ=; b=aXSlUvUDfWetwtEIACKg19kVbGc7zPQoPi73HC9syR6zTIcte6sphTnS32N6z8vtik sjB1QJoAQg7qJ3g7abA1keuNTrDI2RUH8rIShmzwoCnkT3zJty+hO7poG1dBVyITZO9n AG6/6PVkRfewJgZwX6zk5sz5Wv//PRHLqCKpeBBNcthoEY+y/M5qadtAmfYqSGzWyc5v pWHEEoP6j/xoZEt9h5CLkjQQamnHZVwMjkrnm53Kh3nC7lYEr7Ie54e/dPiUHpJIddQb iRp3WJtKMc6+w8sI7O8QxjQFz12heUJWmNCE3wx6XYyqAd7sz5u/9VrE1XYjt5tA6ir/ WZeg== X-Gm-Message-State: AOAM533nZtjT04jW4QSXy2E58u6z2nE+Mu2qJ78nDPhN+HS0O1Y+X/dH rB1a0xU8w1IJNY+HEFo0OHv3Yg== X-Received: by 2002:a63:6ece:: with SMTP id j197mr18277481pgc.322.1642412236901; Mon, 17 Jan 2022 01:37:16 -0800 (PST) Received: from yinxin.bytedance.net ([139.177.225.228]) by smtp.gmail.com with ESMTPSA id z16sm11426497pgi.89.2022.01.17.01.37.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 01:37:16 -0800 (PST) From: Xin Yin To: harshadshirwadkar@gmail.com, tytso@mit.edu, adilger.kernel@dilger.ca Cc: dan.carpenter@oracle.com, riteshh@linux.ibm.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Xin Yin Subject: [PATCH v3 0/2] ext4: fix issues when fast commit work with jbd Date: Mon, 17 Jan 2022 17:36:53 +0800 Message-Id: <20220117093655.35160-1-yinxin.x@bytedance.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org When test fast commit with xfstests generic/455, some logic issues were found. When a full commit is ongonig, the logic of fast commit tracking seems not correct. The first patch fix the ineligible commit case , and the second patch fix the common fast commit case. After testing this patch set with xfstests log and quick group, no regressions were found, and the generic/455 can pass now. --- v2: drop EXT4_MF_FC_COMMITTING v3: change logic of ext4_fc_mark_ineligible() when set 'handle' as NULL. Fix use-after-free issue for improper use of 'handle' for ext4_fc_mark_ineligible(). Xin Yin (2): ext4: fast commit may not fallback for ineligible commit ext4: fast commit may miss file actions fs/ext4/ext4.h | 8 +++----- fs/ext4/extents.c | 4 ++-- fs/ext4/fast_commit.c | 44 ++++++++++++++++++++++++++++++------------- fs/ext4/inode.c | 4 ++-- fs/ext4/ioctl.c | 4 ++-- fs/ext4/namei.c | 4 ++-- fs/ext4/super.c | 2 +- fs/ext4/xattr.c | 6 +++--- fs/jbd2/commit.c | 2 +- fs/jbd2/journal.c | 2 +- include/linux/jbd2.h | 2 +- 11 files changed, 49 insertions(+), 33 deletions(-) -- 2.25.1