Skip to contentSkip to conversation

ramfs/tmpfs readdir()

PATCH Manfred Spraul 2 participants 2 messages Nov 4, 2001 – Nov 5, 2001

lore
Share & tools
lore
#0 lore raw

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Quoted 5 lines

Note that other filesystems would already enjoy having a d_offset in the
dentry: it allows for various other optimizations (ie making "unlink()" a O(1) operation, by not having to search the directory).

The dentry structure already contains 2 members for filesystem use (d_time and d_fsdata), is a third member really required?

--
Manfred

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

" " == Manfred Spraul <[email protected]> writes:

> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit

>>
>> Note that other filesystems would already enjoy having a >> d_offset in the dentry: it allows for various other >> optimizations (ie making "unlink()" a O(1) operation, by not >> having to search the directory).
>>
> The dentry structure already contains 2 members for filesystem > use (d_time and d_fsdata), is a third member really required?

It could be useful. For NFS, we're also looking for 64-bits in which to store the parent directory's mtime. This is needed in order to improve the dentry revalidation heuristics.

Ultimately, though, allowing the filesystem to allocate dentries itself on its own slab might be a preferable manner to accomodate the need for these private fields. IOW to allow one to allocate

   struct nfs_dentry { 
        struct dentry dentry;
        ... private fields ....
   };

Cheers,
Trond