Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4453291pxj; Tue, 25 May 2021 08:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQ33BbR7vzmAPyMGPRQzdMRh+xekdPjWW9rXf3aEuU5ciEsWnHvK1xzoclBvrQgobcS0e3 X-Received: by 2002:aa7:cdd8:: with SMTP id h24mr31957019edw.276.1621955986105; Tue, 25 May 2021 08:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621955986; cv=none; d=google.com; s=arc-20160816; b=H56Y5W9TjiHTI7pctvjOkreUwm1uyqz7yA9DCvY/EObt3xo8Y3V72q3i9Q3xkjmTID J5Xqi1mglkpGuk5wQKgpUIhxM3tqpLRxyXR8IDBkiMiZ+3uki9n9AcldaBebsvp5090t 9DgPp4tTJnVFvHlXd5AsiUIFrCl18KFtz9FitmIn7Ej6Uy/aTir22TOZlXHgAJ4HhJSk YP8+raAhKWlK1ZNoW9Wi9WJNhsw6KLp0ggac9lYEKjnZkgLbLq8tnezQIaT62GdEi4hQ Jpb7zTwzIB5XpuajNUw13CtEZTdYnLZqjHuqscYNZ8WeNrFmHj+Lht/MK8THg3Rn8KoA iW7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=3qsCXFwi67woEmwSeG1dK26F8iNNNRcOFskFnFhj7F0=; b=BrBN16D6543SBsCtcsWMnYrszTyIHke+iJK7IJwNVb+RHF9qRLvFq3NCvm77JKZiF0 Z5m8gDPxfapDnkYVioREsfPCmd7odibu4MJ74nPEIS0ij+ZVdGqfMjC8lOfCeEH9AMQm OZjivFSIrWw0grwixmjjXJK4Vrv3P1k7taEIAClbWfmGs2H3W8bxKZ/cHjHjEhdDZ/ie 0bQiVIae3lP5pMd0sWC/GZwsudllflKzBkPpp5sm8hYTVdxMhnSKG0336TJT+HoHNXOQ xeVK/NXON7JoohFFcOJ1PLlq/GzTTMCC7TqIO32hgBatIE0DzuucB4ItX6E2/f+Jo+Cw BHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ttCVl5vS; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k2si6870854ejs.648.2021.05.25.08.19.22; Tue, 25 May 2021 08:19:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ttCVl5vS; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232215AbhEYMFC (ORCPT + 99 others); Tue, 25 May 2021 08:05:02 -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.