xfs: devirtualize ->m_dirnameops
Instead of causing a relatively expensive indirect call for each hashing and comparism of a file name in a directory just use an inline function and a simple branch on the ASCII CI bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: fix unused variable warning] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
committed by
Darrick J. Wong
parent
537dabcfdb
commit
d8d11fc703
@@ -158,16 +158,6 @@ struct xfs_da3_icnode_hdr {
|
||||
(uint)(XFS_DA_LOGOFF(BASE, ADDR)), \
|
||||
(uint)(XFS_DA_LOGOFF(BASE, ADDR)+(SIZE)-1)
|
||||
|
||||
/*
|
||||
* Name ops for directory and/or attr name operations
|
||||
*/
|
||||
struct xfs_nameops {
|
||||
xfs_dahash_t (*hashname)(struct xfs_name *);
|
||||
enum xfs_dacmp (*compname)(struct xfs_da_args *,
|
||||
const unsigned char *, int);
|
||||
};
|
||||
|
||||
|
||||
/*========================================================================
|
||||
* Function prototypes.
|
||||
*========================================================================*/
|
||||
@@ -234,6 +224,5 @@ void xfs_da3_node_hdr_to_disk(struct xfs_mount *mp,
|
||||
struct xfs_da_intnode *to, struct xfs_da3_icnode_hdr *from);
|
||||
|
||||
extern struct kmem_zone *xfs_da_state_zone;
|
||||
extern const struct xfs_nameops xfs_default_nameops;
|
||||
|
||||
#endif /* __XFS_DA_BTREE_H__ */
|
||||
|
||||
Reference in New Issue
Block a user