Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1785083imm; Thu, 27 Sep 2018 02:26:16 -0700 (PDT) X-Google-Smtp-Source: ACcGV63g2v4JZlvn2CgrmjInPBmK50PvGOrhQZPP4fL7j1QLUotLUoyvcEi+qEZFxA8v31uD3VoH X-Received: by 2002:a63:c702:: with SMTP id n2-v6mr9516509pgg.108.1538040375973; Thu, 27 Sep 2018 02:26:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538040375; cv=none; d=google.com; s=arc-20160816; b=fcWs4TsaAhsG1X834R53dWTq5FmQK73XSFy2u8MwE2AdohPsLkfx5lrsXxAkWBdOhF nApSZ5nN0n/Q/NDf/PpEZdb0v2ptmADzwxr6pIpRP23EkYqlDjDKGNp6gWKVxMGzZnWB afURpYTCNdAyG8wkPKV79IAWfCvEOawCYrExdiVJBVWxCvQspK91ETZRO6BqFI8Xa7MM 472B3GtCccKcvt9ie1IGCBVNeHv7ejkUjGKIzbD/66zma/3upPalFwyKF95p/qKLRtjE jMKcqFY9bigHN+3PvVZJdZ/MX5Wi+RahxRGm8UIQ2/Vpe1oYj/BwYGQAT0yDi5XIHJc1 uXHQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=qSQ5B0VBtf5M20FHiaKt0cMMAaA4elQbmuCxt6HFCEU=; b=1Ejl7KePWHbaAoTqmJWJsaBbodPUp/5CvJny71h0cG5+ES6G5xV8E7Iti/CyXcm8+I mfj9PrFQ8bKFmIyqfODXRcjj5fDiH2m/dPv7DAmUVqXeb7aysEauNqLbn7S4JIexQrXy a4KkijAq00HD2odjKwncqvqNAmlPluL+Jj9mheiJwRaAa/05bDX8vZzcQKmf3Yf8XWiY zNcCZm0M+27TbMgHcNStKrfuGouPt4SVwT79kr2x3/krc9s1c+a4Jcv8d0JF9xgIFdKN pg+nJwRwb0dw0gR3jfqbYop7IBjDCQLdNQBokzT+KxsQtp3kA0VqVzp4e6ezEYa3JLbt iMIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p24-v6si1509703plr.510.2018.09.27.02.26.00; Thu, 27 Sep 2018 02:26:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728413AbeI0Plq (ORCPT + 99 others); Thu, 27 Sep 2018 11:41:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56668 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727154AbeI0Plp (ORCPT ); Thu, 27 Sep 2018 11:41:45 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7D7E41113; Thu, 27 Sep 2018 09:24:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Li Dongyang , Theodore Tso , Andreas Dilger Subject: [PATCH 4.14 57/64] ext4: dont mark mmp buffer head dirty Date: Thu, 27 Sep 2018 11:04:14 +0200 Message-Id: <20180927090257.784993430@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090249.801943776@linuxfoundation.org> References: <20180927090249.801943776@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Li Dongyang commit fe18d649891d813964d3aaeebad873f281627fbc upstream. Marking mmp bh dirty before writing it will make writeback pick up mmp block later and submit a write, we don't want the duplicate write as kmmpd thread should have full control of reading and writing the mmp block. Another reason is we will also have random I/O error on the writeback request when blk integrity is enabled, because kmmpd could modify the content of the mmp block(e.g. setting new seq and time) while the mmp block is under I/O requested by writeback. Signed-off-by: Li Dongyang Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- fs/ext4/mmp.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -49,7 +49,6 @@ static int write_mmp_block(struct super_ */ sb_start_write(sb); ext4_mmp_csum_set(sb, mmp); - mark_buffer_dirty(bh); lock_buffer(bh); bh->b_end_io = end_buffer_write_sync; get_bh(bh);