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 X-Spam-Level: X-Spam-Status: No, score=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40377C47087 for ; Tue, 25 May 2021 22:32:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23F2E6142B for ; Tue, 25 May 2021 22:32:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231532AbhEYWdd (ORCPT ); Tue, 25 May 2021 18:33:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38444 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbhEYWdc (ORCPT ); Tue, 25 May 2021 18:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621981921; h=from:from:reply-to:subject:subject: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=t2QUVz6gnfCaqisemCBpqjC6VD3ID8/L7m//tDjqPVA=; b=gJQ+r3BBK1CPH+WTQ+Qk0d986+lmxiFqLVuskbFX7hICjp99LNViKrkpV1x1+V0bcPaAf/ AVQKL32iQc3eTdzBLZoTnC879x5dhOAZ1ESVz3TgOpabk7N+knqJQObpLaVpiU3/GuBZ2+ UYCFn2qASMSm9IVvTr45kyJ0/2kgSzE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-584-PqGiBbc9PpOTULD7UQr0ZQ-1; Tue, 25 May 2021 18:31:57 -0400 X-MC-Unique: PqGiBbc9PpOTULD7UQr0ZQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E5FF107ACC7; Tue, 25 May 2021 22:31:56 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-24.rdu2.redhat.com [10.10.112.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 794046062F; Tue, 25 May 2021 22:31:51 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <6E4DE257-4220-4B5B-B3D0-B67C7BC69BB5@dilger.ca> References: <6E4DE257-4220-4B5B-B3D0-B67C7BC69BB5@dilger.ca> <206078.1621264018@warthog.procyon.org.uk> To: Andreas Dilger Cc: dhowells@redhat.com, Theodore Ts'o , "Darrick J. Wong" , Chris Mason , Ext4 Developers List , xfs , linux-btrfs , linux-cachefs@redhat.com, linux-fsdevel , NeilBrown Subject: Re: How capacious and well-indexed are ext4, xfs and btrfs directories? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4169581.1621981910.1@warthog.procyon.org.uk> Date: Tue, 25 May 2021 23:31:50 +0100 Message-ID: <4169583.1621981910@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Andreas Dilger wrote: > As described elsewhere in the thread, allowing concurrent create and unlink > in a directory (rename probably not needed) would be invaluable for scaling > multi-threaded workloads. Neil Brown posted a prototype patch to add this > to the VFS for NFS: Actually, one thing I'm looking at is using vfs_tmpfile() to create a new file (or a replacement file when invalidation is required) and then using vfs_link() to attach directory entries in the background (possibly using vfs_link() with AT_LINK_REPLACE[1] instead of unlink+link). Any thoughts on how that might scale? vfs_tmpfile() doesn't appear to require the directory inode lock. I presume the directory is required for security purposes in addition to being a way to specify the target filesystem. David [1] https://lore.kernel.org/linux-fsdevel/cover.1580251857.git.osandov@fb.com/