| To: | "Josef 'Jeff' Sipek" <jeffpc@xxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 1/7] XFS: Name operation vector for hash and compare |
| From: | "Barry Naujok" <bnaujok@xxxxxxx> |
| Date: | Thu, 03 Apr 2008 14:50:39 +1000 |
| Cc: | xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx |
| In-reply-to: | <20080403002246.GB5211@josefsipek.net> |
| Organization: | SGI |
| References: | <20080402062508.017738664@chook.melbourne.sgi.com> <20080402062707.797672682@chook.melbourne.sgi.com> <20080403002246.GB5211@josefsipek.net> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Opera Mail/9.24 (Win32) |
On Thu, 03 Apr 2008 10:22:46 +1000, Josef 'Jeff' Sipek
<jeffpc@xxxxxxxxxxxxxx> wrote:On Wed, Apr 02, 2008 at 04:25:09PM +1000, Barry Naujok wrote: ...+/* + * Name ops for directory and/or attr name operations + */ + +typedef xfs_dahash_t (*xfs_hashname_t)(const uchar_t *, int); +typedef xfs_dacmp_t (*xfs_compname_t)(const uchar_t *, int, + const uchar_t *, int);
+/*
+ * Name ops for directory and/or attr name operations
+ */
+struct xfs_nameops {
+ xfs_dahash_t (*hashname)(const uchar_t *, int);
+ xfs_dacmp_t (*compname)(const uchar_t *, int, const uchar_t *, int);
+};...
+/* + * Macros are used calling for the xfs_inode's xfs_mount's name operations as + * in most cases, xfs_dir2.h is included before xfs_inode.h and xfs_mount.h. + */ +#define xfs_dir_hashname(dp, n, l) \ + ((dp)->i_mount->m_dirnameops->hashname((n), (l))) + +#define xfs_dir_compname(dp, n1, l1, n2, l2) \ + ((dp)->i_mount->m_dirnameops->compname((n1), (l1), (n2), (l2))) The alternative is reorganising the #includes in most of the .c files! |
| Previous by Date: | Re: [PATCH 3/7] XFS: Refactor node format directory lookup/addname, David Chinner |
|---|---|
| Next by Date: | Re: [PATCH 4/7] XFS: Return case-insensitive match for dentry cache, David Chinner |
| Previous by Thread: | Re: [PATCH 1/7] XFS: Name operation vector for hash and compare, Josef 'Jeff' Sipek |
| Next by Thread: | Re: [PATCH 1/7] XFS: Name operation vector for hash and compare, David Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |