This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / fs / ntfs / ntfs.h
index 82f17d6..c3fda17 100644 (file)
@@ -2,8 +2,8 @@
  * ntfs.h - Defines for NTFS Linux kernel driver. Part of the Linux-NTFS
  *         project.
  *
- * Copyright (c) 2001-2004 Anton Altaparmakov.
- * Copyright (C) 2002 Richard Russon.
+ * Copyright (c) 2001-2004 Anton Altaparmakov
+ * Copyright (C) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -24,6 +24,7 @@
 #ifndef _LINUX_NTFS_H
 #define _LINUX_NTFS_H
 
+#include <linux/stddef.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/compiler.h>
@@ -58,12 +59,12 @@ extern kmem_cache_t *ntfs_name_cache;
 extern kmem_cache_t *ntfs_inode_cache;
 extern kmem_cache_t *ntfs_big_inode_cache;
 extern kmem_cache_t *ntfs_attr_ctx_cache;
+extern kmem_cache_t *ntfs_index_ctx_cache;
 
 /* The various operations structs defined throughout the driver files. */
 extern struct super_operations ntfs_sops;
-extern struct super_operations ntfs_mount_sops;
-
 extern struct address_space_operations ntfs_aops;
+extern struct address_space_operations ntfs_mst_aops;
 extern struct address_space_operations ntfs_mft_aops;
 
 extern struct  file_operations ntfs_file_ops;
@@ -75,14 +76,6 @@ extern struct inode_operations ntfs_dir_inode_ops;
 extern struct  file_operations ntfs_empty_file_ops;
 extern struct inode_operations ntfs_empty_inode_ops;
 
-/* Generic macros to convert pointers to values and vice versa. */
-#ifndef p2n
-#define p2n(p)         ((ptrdiff_t)((ptrdiff_t*)(p)))
-#endif
-#ifndef n2p
-#define n2p(p)         ((ptrdiff_t*)((ptrdiff_t)(p)))
-#endif
-
 /**
  * NTFS_SB - return the ntfs volume given a vfs super block
  * @sb:                VFS super block
@@ -163,9 +156,8 @@ extern int ntfs_read_compressed_block(struct page *page);
 
 /* From fs/ntfs/super.c */
 #define default_upcase_len 0x10000
-extern wchar_t *default_upcase;
+extern ntfschar *default_upcase;
 extern unsigned long ntfs_nr_upcase_users;
-extern unsigned long ntfs_nr_mounts;
 extern struct semaphore ntfs_lock;
 
 typedef struct {
@@ -184,32 +176,31 @@ extern int pre_write_mst_fixup(NTFS_RECORD *b, const u32 size);
 extern void post_write_mst_fixup(NTFS_RECORD *b);
 
 /* From fs/ntfs/unistr.c */
-extern BOOL ntfs_are_names_equal(const uchar_t *s1, size_t s1_len,
-               const uchar_t *s2, size_t s2_len,
+extern BOOL ntfs_are_names_equal(const ntfschar *s1, size_t s1_len,
+               const ntfschar *s2, size_t s2_len,
                const IGNORE_CASE_BOOL ic,
-               const uchar_t *upcase, const u32 upcase_size);
-extern int ntfs_collate_names(const uchar_t *name1, const u32 name1_len,
-               const uchar_t *name2, const u32 name2_len,
+               const ntfschar *upcase, const u32 upcase_size);
+extern int ntfs_collate_names(const ntfschar *name1, const u32 name1_len,
+               const ntfschar *name2, const u32 name2_len,
                const int err_val, const IGNORE_CASE_BOOL ic,
-               const uchar_t *upcase, const u32 upcase_len);
-extern int ntfs_ucsncmp(const uchar_t *s1, const uchar_t *s2, size_t n);
-extern int ntfs_ucsncasecmp(const uchar_t *s1, const uchar_t *s2, size_t n,
-               const uchar_t *upcase, const u32 upcase_size);
-extern void ntfs_upcase_name(uchar_t *name, u32 name_len,
-               const uchar_t *upcase, const u32 upcase_len);
+               const ntfschar *upcase, const u32 upcase_len);
+extern int ntfs_ucsncmp(const ntfschar *s1, const ntfschar *s2, size_t n);
+extern int ntfs_ucsncasecmp(const ntfschar *s1, const ntfschar *s2, size_t n,
+               const ntfschar *upcase, const u32 upcase_size);
+extern void ntfs_upcase_name(ntfschar *name, u32 name_len,
+               const ntfschar *upcase, const u32 upcase_len);
 extern void ntfs_file_upcase_value(FILE_NAME_ATTR *file_name_attr,
-               const uchar_t *upcase, const u32 upcase_len);
+               const ntfschar *upcase, const u32 upcase_len);
 extern int ntfs_file_compare_values(FILE_NAME_ATTR *file_name_attr1,
                FILE_NAME_ATTR *file_name_attr2,
                const int err_val, const IGNORE_CASE_BOOL ic,
-               const uchar_t *upcase, const u32 upcase_len);
+               const ntfschar *upcase, const u32 upcase_len);
 extern int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
-               const int ins_len, uchar_t **outs);
-extern int ntfs_ucstonls(const ntfs_volume *vol, const uchar_t *ins,
+               const int ins_len, ntfschar **outs);
+extern int ntfs_ucstonls(const ntfs_volume *vol, const ntfschar *ins,
                const int ins_len, unsigned char **outs, int outs_len);
 
 /* From fs/ntfs/upcase.c */
-extern uchar_t *generate_default_upcase(void);
+extern ntfschar *generate_default_upcase(void);
 
 #endif /* _LINUX_NTFS_H */
-