Re: [PATCH 2/2] Btrfs: load the key from the dir item in readdir into a fake dentry

2011-05-26 Thread Josef Bacik
On 05/26/2011 02:50 PM, Andi Kleen wrote: Josef Bacik jo...@redhat.com writes: + +newkey = kzalloc(sizeof(struct btrfs_key), + GFP_NOFS); +if (!newkey) +

Re: [PATCH 2/2] Btrfs: load the key from the dir item in readdir into a fake dentry

2011-05-26 Thread Andi Kleen
On Thu, May 26, 2011 at 03:02:42PM -0400, Josef Bacik wrote: + /* + * If this dentry needs lookup, don't set the referenced flag so that it + * is more likely to be cleaned up by the dcache shrinker in case of + * memory pressure. + */ + if

Re: [PATCH 2/2] Btrfs: load the key from the dir item in readdir into a fake dentry

2011-05-26 Thread Josef Bacik
On 05/26/2011 04:03 PM, Andi Kleen wrote: On Thu, May 26, 2011 at 03:02:42PM -0400, Josef Bacik wrote: +/* + * If this dentry needs lookup, don't set the referenced flag so that it + * is more likely to be cleaned up by the dcache shrinker in case of + * memory pressure. +

Re: [PATCH 2/2] Btrfs: load the key from the dir item in readdir into a fake dentry

2011-05-26 Thread Andreas Dilger
On May 26, 2011, at 14:03, Andi Kleen wrote: On Thu, May 26, 2011 at 03:02:42PM -0400, Josef Bacik wrote: +/* + * If this dentry needs lookup, don't set the referenced flag so that it + * is more likely to be cleaned up by the dcache shrinker in case of + * memory pressure. +

[PATCH 2/2] Btrfs: load the key from the dir item in readdir into a fake dentry

2011-05-19 Thread Josef Bacik
In btrfs we have 2 indexes for inodes. One is for readdir, it's in this nice sequential order and works out brilliantly for readdir. However if you use ls, it usually stat's each file it gets from readdir. This is where the second index comes in, which is based on a hash of the name of the