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 4249EEB64D9 for ; Tue, 27 Jun 2023 03:46:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229983AbjF0Dq4 (ORCPT ); Mon, 26 Jun 2023 23:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbjF0DqR (ORCPT ); Mon, 26 Jun 2023 23:46:17 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB2891BE8; Mon, 26 Jun 2023 20:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BCU0vSxqLVTX419lXjVkZjx3a/Yiyook2insNB/VnXc=; b=o9AnIofC0gBmiKHyrKuNgwEnMg SNFY+wOoS2vtORD/zJeXRDNASshBfameF6PetykSZmQjyguK2qtVWWsgCvk3PLezL/3kB9Ewzxhk1 u8C4FhdRNKJcVoLgLb9q/HDGmCeY37q63vntZR9mKcY7VRGtgwMfJlwLTo8cZg8xcj1MX7LtQuKfA OhRmYupYudQrcZsAnJJ7RBJGVgAZSZGAYMSDVBKi1ZCxO1DoVNO+yspmGmsWwwtl1oKjqKcnf6+Y/ Xj1hybHHrm/hZdHycBQjcBlJb+I5KHI5bXGxhc5udx2v6S5Wfu+lyb6oMhx34SoEi/44TIQ9B+FcS 3t+C9hjA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1qDzdp-00BciT-0q; Tue, 27 Jun 2023 03:45:21 +0000 Date: Mon, 26 Jun 2023 20:45:21 -0700 From: Christoph Hellwig To: Andreas Hindborg Cc: Damien Le Moal , "open list:ZONEFS FILESYSTEM" , gost.dev@samsung.com, Andreas Hindborg , Naohiro Aota , Johannes Thumshirn , open list Subject: Re: [PATCH] zonefs: do not use append if device does not support it Message-ID: References: <20230626164752.1098394-1-nmi@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230626164752.1098394-1-nmi@metaspace.dk> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 26, 2023 at 06:47:52PM +0200, Andreas Hindborg wrote: > From: "Andreas Hindborg (Samsung)" > > 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 probably > not intentional. Thus, do not use append when device does not support it. How do you even manage to hit this code? Zone Append is a mandatory feature and driver need to check it is available.