Re: How capacious and well-indexed are ext4, xfs and btrfs directories?
From: David Howells <dhowells@redhat.com>
Date: 2021-05-26 00:01:01
Also in:
linux-btrfs, linux-fsdevel, linux-xfs
From: David Howells <dhowells@redhat.com>
Date: 2021-05-26 00:01:01
Also in:
linux-btrfs, linux-fsdevel, linux-xfs
Andreas Dilger [off-list ref] wrote:
quoted
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