Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4867590pxj; Tue, 25 May 2021 19:27:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6ylmeB4tED346V+Uz5yeYfpd7oByF5tUhQxy+ExxzNzXUbQk2VtLxS0dtpYHCdwmAkgv0 X-Received: by 2002:a05:6402:524b:: with SMTP id t11mr32573076edd.139.1621996027640; Tue, 25 May 2021 19:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621996027; cv=none; d=google.com; s=arc-20160816; b=bbf4hanpMSHMKT+81ieXFOkYvXRzqES8cnUdSrns4caYtFf2qvidgHs/wAKkdr1jXU +SOYankrqMGqODqBtSRSo92BKqCbPkXgt0HR2tKcI3eM2TVnbeRgEtvHFPPaM3wIzmBK uEORoEs2ELtDksIm3PKU5k1fE18KitijcN0z/TbYLwmqSBt6VIFUDHE53N6g3OeKJhA3 XaYndAnpQhZBzFzReWH8uYNnD0oNhK54lWpIKe6i2FnvLDD1hgfWO7t7IkXb6d9RommJ cDOYyp81N99Sqwkozg4ksZFXzla50wIELd+TH7wU4k6aIJ3VDYCGg+uDVp0gwLGIJcNr QTSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=vOiyAqWxxuaxXY+3q9km4psaaYiAnLD8wrsG1M/Mujs=; b=pSAvhN4aP6rCwh+7a0/2NZueqTQoMSsV+Jhnu8Ws/Kn9trMhzznRTmwthorqCnB6qJ MnPvc5vBH+DZmqqBA64uAI8Fqf3jMq9bTWtjIXrHoJ75ZaqZYo+VRNzECQbXo1twQEUT +RWcMeV8EWDsvJy83FnhMyedVkQXYONRrortTobFUl0LXbidHATAqMfFsVm6Z/g4LrTj QBqpDNIYwsXXfBn2CpOU34PvXuhYaMODbXH6s6OsS99HNn7JnrVrhqKxSzwqgW6g4hgL Qm78mpNEDfzl1v0nP37IaJEeOyLJ8+Wk+3W91nKNwZJcpVO3bcVHZiDKqLmn6cJtWTOA dLuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QIKZJPBZ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si18730848eds.14.2021.05.25.19.26.40; Tue, 25 May 2021 19:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QIKZJPBZ; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232221AbhEZAC3 (ORCPT + 99 others); Tue, 25 May 2021 20:02:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50177 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229939AbhEZAC2 (ORCPT ); Tue, 25 May 2021 20:02:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621987257; 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=vOiyAqWxxuaxXY+3q9km4psaaYiAnLD8wrsG1M/Mujs=; b=QIKZJPBZ+o/4at5Voa5QzhBX+K6wBPB5Slclilywl5iTQpjFnCUHNP2NFtcHcXA+tNFlMT n3pv/6jFmJR60tZoY9MAGUISwfR6p5nJFWuviT1hf6kDPZ/GxUJqOFaFrK4OYlQhwhKhmL sgd4OoiV9ztZ+7M8L2FBBUAKbUYOwk4= 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-593-d4YTweP6N0SWjAI4Kiwk0g-1; Tue, 25 May 2021 20:00:55 -0400 X-MC-Unique: d4YTweP6N0SWjAI4Kiwk0g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0C2581883520; Wed, 26 May 2021 00:00:54 +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 B39F25D6AC; Wed, 26 May 2021 00:00:28 +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: <00224B62-4903-4D33-A835-2DC8CC0E3B4D@dilger.ca> References: <00224B62-4903-4D33-A835-2DC8CC0E3B4D@dilger.ca> <6E4DE257-4220-4B5B-B3D0-B67C7BC69BB5@dilger.ca> <206078.1621264018@warthog.procyon.org.uk> <4169583.1621981910@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: <4176732.1621987227.1@warthog.procyon.org.uk> Date: Wed, 26 May 2021 01:00:27 +0100 Message-ID: <4176733.1621987227@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Andreas Dilger wrote: > > 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. > > I don't see how that would help much? When it comes to dealing with a file I don't have cached, I can't probe the cache file to find out whether it has data that I can read until I've opened it (or found out it doesn't exist). When it comes to writing to a new cache file, I can't start writing until the file is created and opened - but this will potentially hold up close, data sync and writes that conflict (and have to implicitly sync). If I can use vfs_tmpfile() to defer synchronous directory accesses, that could be useful. As mentioned, creating a link to a temporary cache file (ie. modifying the directory) could be deferred to a background thread whilst allowing file I/O to progress to the tmpfile. David