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 9F22EC001B0 for ; Mon, 26 Jun 2023 18:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232184AbjFZSau (ORCPT ); Mon, 26 Jun 2023 14:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232159AbjFZSao (ORCPT ); Mon, 26 Jun 2023 14:30:44 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D93F610D5 for ; Mon, 26 Jun 2023 11:30:37 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-51d91e9b533so2290238a12.3 for ; Mon, 26 Jun 2023 11:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1687804236; x=1690396236; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=AZcNk5dnSDXU4m2jPSZ7WfsjYlgWRPbt7AFCuwHpRlI=; b=A2giA9Bk4mKvzTvcXd56HVsiwY1MA/5G8/WnQQwCVZ8hctrkLzU/3GAMe3NnMn/u8B NpZm0LpDjcPa/23jgeGQIE9+BTpAWccBcl3TjuezoPqZW1+4b0j5ZGeDLqOCAv7C7sFp JL1OsKBifrdJ+5FxvilZVX+CuvLZqgh9nfxjeUrQSIibUTtYtLSAq8NMoe7UJVmspKbc zayiFLsaHpmyUTfrmdmfY4oszU7Hwzf01lVOxLENcx6TrXucpnW4CZIc7ATS2hQTG8AV DM5yRTHfOu2nFktjjCgJQS/sBB5iTMR7nsh+3gOGKz/UWQDG0C7k/yYfxmlrBHEzhoG1 sQnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687804236; x=1690396236; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AZcNk5dnSDXU4m2jPSZ7WfsjYlgWRPbt7AFCuwHpRlI=; b=PIEp3wHnAHZZarOTTNvfNztXwCxQq035vRmVZAkff6oDayd0NU9i86N6YvcIlhLoCx 3Tig72Gu57MI0ncelYAYA0vJ1KXMfDyZwOpYt12ExoiEWWlRS/y3Gz13UGT2pjbnTv6W pxmnLY5bNhANXWnrR6L5wvnlpKd3d1IYRKMXih6GNHlQPGfTPENggPOsvGNNuz38dyim tR7rO6IlybC+Jkz8FyZIOWimslwUOgDRhifCWXhEAiy8+q7fY6Q26SqDmsIaeUqJOEWw LLn7RJmGiGqCjY1IgiVE/5QuCFI8ybzAQQ1Qu1WPazIefG8N18g+++jMnIpqk/KAAxzM spXw== X-Gm-Message-State: AC+VfDwLSbo6zoZM+CvLHRaCqw6Ph4iY1/y/Z2lgJRQ0//Tnw7eyGCgO OOGUO1qsVZvBQlrvWwlTIoe04w== X-Google-Smtp-Source: ACHHUZ6xUBxB1HXnuaoz07JtPXm+JO2uwoH+KaAJy3XVZENmrd8PqJ16iMuF32RMJGApdeZ6EoFW/Q== X-Received: by 2002:a05:6402:7d3:b0:51d:a01d:afd3 with SMTP id u19-20020a05640207d300b0051da01dafd3mr1548108edy.22.1687804236266; Mon, 26 Jun 2023 11:30:36 -0700 (PDT) Received: from localhost ([79.142.230.34]) by smtp.gmail.com with ESMTPSA id o7-20020aa7dd47000000b0051bf57aa0c6sm3099746edw.87.2023.06.26.11.30.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 11:30:35 -0700 (PDT) References: <20230626164752.1098394-1-nmi@metaspace.dk> <02730282-88b0-572e-439c-719cfef379bb@wdc.com> User-agent: mu4e 1.10.3; emacs 28.2.50 From: "Andreas Hindborg (Samsung)" To: Johannes Thumshirn Cc: Damien Le Moal , "open list:ZONEFS FILESYSTEM" , "gost.dev@samsung.com" , Naohiro Aota , Johannes Thumshirn , open list Subject: Re: [PATCH] zonefs: do not use append if device does not support it Date: Mon, 26 Jun 2023 20:23:48 +0200 In-reply-to: <02730282-88b0-572e-439c-719cfef379bb@wdc.com> Message-ID: <87r0pygjp1.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes Thumshirn writes: > On 26.06.23 18:47, Andreas Hindborg wrote: >> From: "Andreas Hindborg (Samsung)" >>=20 >> Zonefs will try to use `zonefs_file_dio_append()` for direct sync writes= even if >> device `max_zone_append_sectors` is zero. This will cause the IO to fail= as the >> io vector is truncated to zero. It also causes a call to >> `invalidate_inode_pages2_range()` with end set to UINT_MAX, which is pro= bably >> not intentional. Thus, do not use append when device does not support it. >>=20 > > I'm sorry but I think it has been stated often enough that for Linux Zone= Append > is a mandatory feature for a Zoned Block Device. Therefore this path is e= ssentially > dead code as max_zone_append_sectors will always be greater than zero. > > So this is a clear NAK from my side. OK, thanks for clarifying =F0=9F=91=8D I came across this bugging out while playing around with zone append for ublk. The code makes sense if the stack expects append to always be present. I didn't follow the discussion, could you reiterate why the policy is that zoned devices _must_ support append? Best regards, Andreas