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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19D38C77B7E for ; Thu, 1 Jun 2023 05:51:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231774AbjFAFvA (ORCPT ); Thu, 1 Jun 2023 01:51:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbjFAFuh (ORCPT ); Thu, 1 Jun 2023 01:50:37 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 582ECE70 for ; Wed, 31 May 2023 22:48:50 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 0DD4967373; Thu, 1 Jun 2023 07:47:33 +0200 (CEST) Date: Thu, 1 Jun 2023 07:47:32 +0200 From: Christoph Hellwig To: Qu Wenruo Cc: Naohiro Aota , Christoph Hellwig , Johannes Thumshirn , "linux-btrfs@vger.kernel.org" Subject: Re: new scrub code vs zoned file systems Message-ID: <20230601054732.GA23496@lst.de> References: <20230531132032.GA30016@lst.de> <821003e3-b457-90ba-e733-8c2fdd0c3b3c@wdc.com> <20230531133038.GA30855@lst.de> <20230531141739.GA2160@lst.de> <134e56ed-1139-a71c-54d7-b4cbc27834a9@gmx.com> <20230601044034.GA21827@lst.de> <7939e360-27fb-119f-8339-36a86c2b3f94@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7939e360-27fb-119f-8339-36a86c2b3f94@gmx.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Jun 01, 2023 at 01:45:49PM +0800, Qu Wenruo wrote: > Oh, that looks like the cause. > > In btrfs_submit_repair_write() we set the bi_opf to ZONE_APPEND instead, > which later would trigger btrfs_record_physical_zoned(). > > So this means, we should not change the WRITE into ZONE_APPEND for > btrfs_submit_repair_write() for dev-replace case at all. > > I stupidly thought zoned device can not accept WRITE command at all but > only ZONE_APPEND. > > Let me try it locally first. I'm already testing with the patch. It stop us from seeing the call into btrfs_record_physical_zoned, but device replace on zoned devices still doesn't work.