lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Oct 2010 21:47:27 +1100
From:	Dave Chinner <david@...morbit.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 19/18] fs: split __inode_add_to_list

On Sat, Oct 09, 2010 at 04:08:54AM -0400, Christoph Hellwig wrote:
> __inode_add_to_list does two things that aren't related.  First it adds
> the inode to the s_inodes list in the superblock, and second it optionally
> adds the inode to the inode hash.  Now that these don't even share the
> same lock there is no need to keeps this functionally together.  Split
> out an add_to_inode_hash helper from __insert_inode_hash to add an inode
> to a pre-calculated hash bucket for use by the various iget version, and
> a inode_add_to_sb_list helper from __inode_add_to_list to just add an
> inode to the per-sb list.  The inode.c-internal callers of
> __inode_add_to_list are converted to a sequence of inode_add_to_sb_list
> and __insert_inode_hash (if needed), and the only use of inode_add_to_list
> in XFS is replaced with a call to inode_add_to_sb_list and insert_inode_hash.

The only reason XFS hashed the inodes was to avoid problems in the
generic code that checked for unhashed inodes during clear_inode(). The
evict() changeover moved that unhashed check into
generic_drop_inode(), which the filesystem can override. Hence if
you add a ->drop_inode() method for XFS that just checks the link
count, we can avoid haѕhing the inodes altogether for XFS.

I can add another patch on top of this one to do that if you want...

Cheers,

Dave.
-- 
Dave Chinner
david@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ