Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp508109lqb; Wed, 29 May 2024 02:20:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpep+0ldbtvpUJD3TmXagJD0V74eSeKNLQGIzh2SMsSQFy37lLA2yEB4UH5/6PkXoBKgVuJeMs8d3USRddSycaLOHKynnPhTPzGzGWVQ== X-Google-Smtp-Source: AGHT+IEFeEUwelZHqH/Z9Ov6ZxRkG42aC+7JLrGZUSp5Q2A315fKCfXGl5CgK5Z34CFyTr9JCYrs X-Received: by 2002:a05:6a20:7f89:b0:1a8:2cd1:e493 with SMTP id adf61e73a8af0-1b259ab5f1bmr2373523637.29.1716974447106; Wed, 29 May 2024 02:20:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716974447; cv=pass; d=google.com; s=arc-20160816; b=uFbeOa7AbNAnj2MNKzxzdGI12spPaw/VDC4lo/dgCdPoLglcp5p1Z/7yT9aQrFu0Ui do+zRHk35YHgRCTaQi41c9bNgn5AksDKEYmi3gMxHfrt6wbIjPyxOeYBzPGbhN/RQVTX FLQhODOLdGtYYJ1nE4YqIYnTxJRtwjC5Ehux1zw3gebq/TtMDzd37eOozsG7VHPzT4/I r9v71UMKLTK1MAa+TE+ZgdO1YO4dXWKo5cIup9KPiEEr5B58eyXbP6uDXz7ecUj3j6M2 2+cVJf8+qowx+/PNillFCUsXC6Rbe4sHW0m9r9QnKWCZ6tFE0mhTFrXKi18HihF9UR8P hOVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=HdwK0wHKQIzYeRO2c0o1hYz9tLJqH5VOwbHssaheTcs=; fh=nv2H5GYpi5IIuQpeIlFZrKLPHybB3KPyJLhTcnPeE8c=; b=xFUhONy4XSH098drPFPuJje9aq6PDCM8Kd2B4gwA7qfQjPe2gbeGd2/do6dyK3NPVk Eigi9c4Dy1vMsK49dVP8K2gMkfOcCVBgPoS9uDAqy9trKtyMN/bOjFi6I2R0Uhr+b21P RsHdJMdvFJjpKYP8rYdPrEcNLqFjXWMlLcGoB5blq7BKBPHxGnmSjDP3SnVkeFXmhPcK GyjhSCJIW4MTzwnBsnq0rgTD0Gb77H26jGP0dg59ZCTX5I+LO03z2nqmhWApQFfKX1xc TpyrGT/2WF2Ln4ee5TPokimf/MJi/IzjbD43xyeLgn3K4w35FbuV3tdRtbUM/eLUO5hg XtOw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LiOSz1FP; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-ext4+bounces-2707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2707-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fd4d15e4si9516688b3a.230.2024.05.29.02.20.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 02:20:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LiOSz1FP; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-ext4+bounces-2707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2707-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A5560283FB9 for ; Wed, 29 May 2024 09:20:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF3F116A378; Wed, 29 May 2024 09:20:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LiOSz1FP" X-Original-To: linux-ext4@vger.kernel.org Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69ADD169AD9 for ; Wed, 29 May 2024 09:20:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716974438; cv=none; b=EN44RG6S2H83XHZWgmQKR3XwscqQE2WUGtL2+T71Z3nNct2iYagbBSvK8dZ14ZFt6j7iLyzbfZpj6IZJi13C6AI/4PPfvJHwYM59qly4meObP4B3jhkQqljT/+N2JzCWLKQIwLTWF8AR/xDS3IElv60BH08Yw11CpL9mosfvuA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716974438; c=relaxed/simple; bh=BQndSFmSzjVJszryV0eFHGto7znM46+Oj/DK6i9A0ss=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MXIAiQ/TZwvnoQdEUZJj3frEhIOKNcwgmBLmODrfAR3CyppMvKDWG9+aVMrEVvbhAKtEtkz6FGFuA0xKTA49J3U9MPxN6aiMTp97Xeac4w7wece1VV++ZmuL7Xbmh3pKg+tzC5RHx7RET+zhv3BiJG7B6KSz3I3BQCFRtZIQc/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=LiOSz1FP; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: harshadshirwadkar@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1716974434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HdwK0wHKQIzYeRO2c0o1hYz9tLJqH5VOwbHssaheTcs=; b=LiOSz1FPuzNilPE/VUJBm6Fej6CKUAA0uv5wZxrzDshhamAFct8057g8nYZH4Cg2zTzq1j OAtkLazjNRuRLw9O6b4rxq6/wlvd6IQHi+z3wvCdT8Mfin50u5YgNt9TsIKnMO9GKgaVmE VDZ7h1O4p/iQ55ppSbBcW5ZuQi2XFVA= X-Envelope-To: luis.henriques@linux.dev X-Envelope-To: adilger@dilger.ca X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: jack@suse.cz X-Envelope-To: linux-ext4@vger.kernel.org X-Envelope-To: tytso@mit.edu X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger , Jan Kara , Harshad Shirwadkar Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH v3 0/2] ext4: fix fast commit inode enqueueing during a full journal commit Date: Wed, 29 May 2024 10:20:28 +0100 Message-ID: <20240529092030.9557-1-luis.henriques@linux.dev> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Hi! Here's v3 of this fix to the fast commit enqueuing bug triggered by fstest generic/047. This version simplifies the previous patch version by re-using the i_sync_tid field in struct ext4_inode_info instead of adding a new one. The extra patch includes a few extra fixes to the tid_t type handling. Jan brought to my attention the fact that this sequence number may wrap, and I quickly found a few places in the code where the tid_geq() and tid_gt() helpers had to be used. Again, please note that this fix requires [1] to be applied too. [1] https://lore.kernel.org/all/20240515082857.32730-1-luis.henriques@linux.dev Luis Henriques (SUSE) (2): ext4: fix fast commit inode enqueueing during a full journal commit ext4: fix possible tid_t sequence overflows fs/ext4/fast_commit.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)