Skip to content

Commit

Permalink
Disable zpl_nr_cached_objects() callback
Browse files Browse the repository at this point in the history
The zpl_nr_cached_objects() function has been disabled because in the
current code it doesn't provide any critical functionality and it may
result in a deadlock under certain circumstances.  However, because
we expect to need these hooks in the future this code has not been
entirely removed.

Signed-off-by: Brian Behlendorf <[email protected]>
Issue #3719
  • Loading branch information
behlendorf authored and nedbass committed Sep 29, 2015
1 parent f5fbdea commit 8507b8e
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions module/zfs/zpl_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,24 +501,11 @@ zpl_prune_sb(int64_t nr_to_scan, void *arg)
static int
zpl_nr_cached_objects(struct super_block *sb)
{
zfs_sb_t *zsb = sb->s_fs_info;
int nr;

mutex_enter(&zsb->z_znodes_lock);
nr = zsb->z_nr_znodes;
mutex_exit(&zsb->z_znodes_lock);

return (nr);
return (0);
}
#endif /* HAVE_NR_CACHED_OBJECTS */

#ifdef HAVE_FREE_CACHED_OBJECTS
/*
* Attempt to evict some meta data from the cache. The ARC operates in
* terms of bytes while the Linux VFS uses objects. Now because this is
* just a best effort eviction and the exact values aren't critical so we
* extrapolate from an object count to a byte size using the znode_t size.
*/
static void
zpl_free_cached_objects(struct super_block *sb, int nr_to_scan)
{
Expand Down

0 comments on commit 8507b8e

Please sign in to comment.