From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D656C4707F for ; Tue, 25 May 2021 12:03:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6932361413 for ; Tue, 25 May 2021 12:03:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232239AbhEYMFD (ORCPT ); Tue, 25 May 2021 08:05:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:56968 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231912AbhEYMFB (ORCPT ); Tue, 25 May 2021 08:05:01 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1621944211; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3qsCXFwi67woEmwSeG1dK26F8iNNNRcOFskFnFhj7F0=; b=ttCVl5vS4VN40p3dHXKHJt98jl6Kb0bOSYug4svI1qj7vS/F5+UWdWWT6qirXFLaQRgSLb lt4XfFJasJSVB/XouPZDll26Q6OHzENre8z06DAB7lNpon0fBy40VtIr49saqLjHA/xqgq 3d+tdSn2GpuMmDiEA+gST3n+pXTiWzg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1621944211; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=3qsCXFwi67woEmwSeG1dK26F8iNNNRcOFskFnFhj7F0=; b=B+I2e5kjYnqyTyQJ3H6BFiKTYl9t41gP+CD7Nvu32cDqDQlkJxCCQxsG/FEj2vr6ihOYEc tYAcPYNB8Hev+JDQ== Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 35C46AE1F; Tue, 25 May 2021 12:03:31 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id A1873DA70B; Tue, 25 May 2021 14:00:54 +0200 (CEST) Date: Tue, 25 May 2021 14:00:54 +0200 From: David Sterba To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, David Sterba , Johannes Thumshirn Subject: Re: [PATCH 5.12 038/127] btrfs: zoned: fix parallel compressed writes Message-ID: <20210525120054.GU7604@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, David Sterba , Johannes Thumshirn References: <20210524152334.857620285@linuxfoundation.org> <20210524152336.139215075@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210524152336.139215075@linuxfoundation.org> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 24, 2021 at 05:25:55PM +0200, Greg Kroah-Hartman wrote: > From: Johannes Thumshirn > > commit 764c7c9a464b68f7c6a5a9ec0b923176a05e8e8f upstream. > > When multiple processes write data to the same block group on a > compressed zoned filesystem, the underlying device could report I/O > errors and data corruption is possible. > > This happens because on a zoned file system, compressed data writes > where sent to the device via a REQ_OP_WRITE instead of a > REQ_OP_ZONE_APPEND operation. But with REQ_OP_WRITE and parallel > submission it cannot be guaranteed that the data is always submitted > aligned to the underlying zone's write pointer. > > The change to using REQ_OP_ZONE_APPEND instead of REQ_OP_WRITE on a > zoned filesystem is non intrusive on a regular file system or when > submitting to a conventional zone on a zoned filesystem, as it is > guarded by btrfs_use_zone_append. > > Reported-by: David Sterba > Fixes: 9d294a685fbc ("btrfs: zoned: enable to mount ZONED incompat flag") > CC: stable@vger.kernel.org # 5.12.x: e380adfc213a13: btrfs: zoned: pass start block to btrfs_use_zone_append > CC: stable@vger.kernel.org # 5.12.x > Signed-off-by: Johannes Thumshirn > Signed-off-by: David Sterba > Signed-off-by: Greg Kroah-Hartman We found a bug in this patch, please drop it from 5.12 queue.