[Btrfs-devel] btrfs and git-reflog
tytso at MIT.EDU
Fri Jan 25 10:40:32 PST 2008
On Fri, Jan 25, 2008 at 12:47:45PM -0500, Chris Mason wrote:
> For now this is handled like a hash collision, I end up with two directory
> entries at the same offset, which is allowed by the disk format but
> problematic if readdir runs out of room in the buffer and expects the next
> call to start over at the second name pointing to inode #N
> If that happens today, I end up with a repeated dir entry coming out of
> readdir. Longer term I'll add code so that it always picks up where it left
> off by allocating an extra readdir cookie for that file pointer.
> Its ugly, but it won't happen often, and the seek benefits of
> readdir going in inode order are huge.
The problem comes with telldir/seekdir, and what to do with NFS
support (I think v2 only allows a 32-bit seek pointer; I think IIRC
it's fixed in the NFSv3 protocol, but the Linux NFS server uses the
same interface point for both, so it doesn't help us).
We really need to get 64-bit off_t support into Linux in general, or
think about creating per-process telldir/seekdir cookies that DTRT
(with special case magic for NFS server as a single process).
More information about the Btrfs-devel