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 A84BFC61DA4 for ; Fri, 3 Mar 2023 23:03:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231768AbjCCXDi (ORCPT ); Fri, 3 Mar 2023 18:03:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231508AbjCCXDh (ORCPT ); Fri, 3 Mar 2023 18:03:37 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B68B521D5 for ; Fri, 3 Mar 2023 15:03:25 -0800 (PST) Received: from [0.0.0.0] ([149.28.201.231]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M4JmN-1pYVXk2RRR-000KxU; Sat, 04 Mar 2023 00:03:06 +0100 Message-ID: <2ace5cfb-afed-87a7-22d8-8f98a49c39b1@gmx.com> Date: Sat, 4 Mar 2023 07:03:01 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: Re: [PATCH v7 04/13] btrfs: add support for inserting raid stripe extents To: Christoph Hellwig Cc: Johannes Thumshirn , David Sterba , "linux-btrfs@vger.kernel.org" , Josef Bacik References: <94293952cdc120b46edf82672af874b0877e1e83.1677750131.git.johannes.thumshirn@wdc.com> <3e2d5ede-fb00-3aa8-e55e-d088b8df9e60@gmx.com> Content-Language: en-US From: Qu Wenruo In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:VIq02A2BkPVxoxXKBOsmdC3fyNFQyVCR+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G5E0KZInRP0yqRMkUb+WOEk+OAHxM0IpnXXJbz78r90EWxLTNlb7z8y6REM0gEHntwp R41xRlazlj1+cwtdfYV+FdmClBO0Xfj0hI0lM8Ho0kfRSegYZt5/uCa11hGFplQy1DMCEFE4+ XTzhAzH+3YB+R1xB7474VVdl3n8= Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On 2023/3/3 22:15, Christoph Hellwig wrote: > On Fri, Mar 03, 2023 at 08:13:23AM +0800, Qu Wenruo wrote: >>> I have a series in my queue the limits every btrfs_bio (and thus bioc) >>> to a single ordered_extent. The bio spanning ordered_extents is a very >>> strange corner case that rarely happens but causes a lot of problems. >> >> Really? >> >> A not-so-large write (e.g. 4MiB) for RAID0 (64K stripe len) can easily lead >> to that situation. >> >> If we really split ordered extents to that stripe len, it can cause a lot of >> small file extents thus bloat the size of subvolume trees. > > I might have been a little more clear in my wording. > > This is talking about the btrfs_bio submitted by the upper layers using > btrfs_submit_bio, not the ones split out by it at the extent boundaries. Oh, that indeed solves most of the common cases. But I'm not familiar enough on the direct IO front, IIRC we have some recent bugs related to page faulting during a larger direct IO write. Not sure if that would affect the use case. Thanks, Qu