Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1777630imm; Thu, 27 Sep 2018 02:17:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV60+QYBI9bf3QCfLV6EPIVm9pzreppfoEkapiD6SWjQ2GOSCeJQACqodr0Q5vIAMoKnCieKh X-Received: by 2002:a63:2020:: with SMTP id g32-v6mr37981pgg.235.1538039858376; Thu, 27 Sep 2018 02:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538039857; cv=none; d=google.com; s=arc-20160816; b=0QeslPrKsFgawRkX7OJjZ96aXTNiR8Q5Odi8UgA4ehBHH/2Xf6H28mZvqTIFyEP0XX wG6HVRx8O6fl9jU9yWqy/hFo5FAmA64pOEDYiATf1AeDLbLhjnA5w9udKHNuu0fM5Vut hg+mYXb+mF9uKThS+P1T3x5+XT/YD+85m75WnrvuFRY4Qrxq4pj9M/+2wvhN7Ps/QP80 y0ZJy5AQ649iIx8/6vw0J0X0KB04waUwytqYU0UtI3hEjJ9OziZizh4qjP+CHbPa2VEf 5l6HBAM5BL511fQpl13DGmSYv9eJ2tr/rXmkkosk6JmzgndU6/5BJmJ4W3TRYU3+suXN hbPg== 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=MEqIAZVAPr0sdoNkmXjk9BD8H0SrVbq2h06PvpgaRaw=; b=hMOTdnSkhZ3LArQOSs3JwMIQfLk6p3xPmhHJWZw/XodOQT8hqbSnuibHPzu46dZo+Y O+WCYmLlTyhwFzED2oPqjpC8x9eX9teUcw6sxKZIqUgCHCG2lFX/lLzd5cXtv5Twko7W O6l3+uceCbVYCjaeUviWoZNOnNk063oK52uT/uETVDI+axaD/c68QRRWTHo4Fvrho9LK 80kLYchUyi3Qk3N1gVoZjQOeVwHeVjiTNuu3pmhUhrfcb4nCs+6RH8+Hn1MLSOX9BiDE 2XUkjsqtX+90GIK1eZYhb+LZL7dNglbOe7roNekItDBWmd/TlQ5Kf4ysOEoGyJxctA9n xNnw== 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 v17-v6si227775pfg.157.2018.09.27.02.17.22; Thu, 27 Sep 2018 02:17:37 -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 S1728669AbeI0PcT (ORCPT + 99 others); Thu, 27 Sep 2018 11:32:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55566 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728042AbeI0PcS (ORCPT ); Thu, 27 Sep 2018 11:32:18 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0F7871117; Thu, 27 Sep 2018 09:15:01 +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.18 82/88] ext4: dont mark mmp buffer head dirty Date: Thu, 27 Sep 2018 11:04:03 +0200 Message-Id: <20180927090310.515686410@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180927090300.631426620@linuxfoundation.org> References: <20180927090300.631426620@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.18-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);