From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=160.101.131.9 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796400535; b=GcT6Y0rOqNadiEa5zQ489njOpWefewAMQtOUCMbKnQfGek95u1FCOBlca9vvNNtoai5B hOIx0IUx7fjU5EBc/rKfPBItoUfDRJlBtGW1iYM8IQ9tPhxg4LWglC6EL/ajJZa4gxtB7 7BQ3oqLEA9352ZhmT1wa53Qzbc1FZzCoFSNnFOdoaCooy8wy7kNgMqbXpfQGkZh3XVF4H TqUDv9UlKuraOqVDziKVkQ1+Co8fVnI9GsoWQmGf2PK3TIciOj2lmlorI7kJWKbJhHbIb qGkiYxKAwAm5R+04B5bxnoG4Mtt8xptjhU9G++33EdXmj9K8z5nJZZVFzIEPDnB0fEA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796400535; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=reSHUEVD7Ak2Z+0xD+3sgXOp+VZnlxX2un68EXQk7X8=; b=WZW+IDumDyE7fJJvWKmfrNFxm4/X4LolSj8bYkDvNRkq8YY2e1wajvSW/ajyq06uYQJ0 c4RGuZh43fFaGytAxqbcboTRmLsFlHVZI10XmwrGgJhVhguT4IToxmQa5prsFA/wMOubO rJcPkj0xIKWyN5uRp+KLtBRZzZqDukYlkRjSFzS25kdX8weTDaB9T+3j4OO8gQvAZja5u m1EFNpjpw1PDDhfXNBaoBuWV7E9Yx0+w0f1TOcIzqs4WWEy2MBeWV9oIi+m5UMpNSSZ5u GaT5R8hyg4yz4w4Qt9bt6yr9iCKhnNOFSp50uvG5u/WqJgBZwYaZSciD1j7SJicXZgA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=citrix.com; spf=pass smtp.mailfrom=citrix.com; arc=none smtp.remote-ip=160.101.131.9 Received: from na1pdmzitismtp02.tibco.com (unknown [160.101.131.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 959DB606A68E for ; Fri, 4 Dec 2026 16:08:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 959DB606A68E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=citrix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=citrix.com Received: from mewpvdipd1070.citrite.net (unknown [10.113.40.46]) by na1pdmzitismtp02.tibco.com (Postfix) with ESMTP id 5CF7F860016C; Fri, 4 Dec 2026 11:07:01 -0500 (EST) From: Mark Syms To: Andreas Gruenbacher Cc: Mark Syms , gfs2@lists.linux.dev, Christoph Hellwig Subject: [PATCH v3 0/2] gfs2: Revalidate the cached writeback mapping after a punch Date: Fri, 4 Dec 2026 16:08:50 +0000 Message-ID: X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261202155751.690482-1-mark.syms@citrix.com> References: <20261202155751.690482-1-mark.syms@citrix.com> X-Mailing-List: gfs2@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit gfs2 writeback reuses its cached mapping across a short-write punch and reallocation, so the retried data goes to the freed blocks and the new blocks keep stale contents. Patch 2 fixes that; patch 1 is Andreas's punch_hole() error-path cleanup, which patch 2 builds on. v3: - Count allocations as well as deallocations in a u64 i_mapping_seq, updated under i_rw_mutex where the inode's mapping changes: on allocation, unstuffing, and at each transaction boundary of punch_hole() (Andreas). - Set the cookie in __gfs2_iomap_get(); check it in writeback only (Andreas). - Add patch 1 (Andreas). v2: - Refuse to reuse a cached IOMAP_HOLE (sashiko); add Fixes. Andreas Gruenbacher (1): gfs2: minor punch_hole error path cleanup Mark Syms (1): gfs2: Revalidate the cached writeback mapping after a punch fs/gfs2/bmap.c | 53 ++++++++++++++++++++++++++++++++++++++++-------- fs/gfs2/incore.h | 1 + fs/gfs2/super.c | 1 + 3 files changed, 46 insertions(+), 9 deletions(-) -- 2.56.0