vserver 1.9.5.x5
[linux-2.6.git] / fs / ntfs / attrib.h
index 92899f4..e0c2c6c 100644 (file)
 #ifndef _LINUX_NTFS_ATTRIB_H
 #define _LINUX_NTFS_ATTRIB_H
 
-#include <linux/fs.h>
-
 #include "endian.h"
 #include "types.h"
 #include "layout.h"
-
-static inline void init_runlist(runlist *rl)
-{
-       rl->rl = NULL;
-       init_rwsem(&rl->lock);
-}
-
-typedef enum {
-       LCN_HOLE                = -1,   /* Keep this as highest value or die! */
-       LCN_RL_NOT_MAPPED       = -2,
-       LCN_ENOENT              = -3,
-} LCN_SPECIAL_VALUES;
+#include "inode.h"
+#include "runlist.h"
+#include "volume.h"
 
 /**
  * ntfs_attr_search_ctx - used in attribute search functions
@@ -71,13 +60,8 @@ typedef struct {
        ATTR_RECORD *base_attr;
 } ntfs_attr_search_ctx;
 
-extern runlist_element *decompress_mapping_pairs(const ntfs_volume *vol,
-               const ATTR_RECORD *attr, runlist_element *old_rl);
-
 extern int ntfs_map_runlist(ntfs_inode *ni, VCN vcn);
 
-extern LCN ntfs_vcn_to_lcn(const runlist_element *rl, const VCN vcn);
-
 extern runlist_element *ntfs_find_vcn(ntfs_inode *ni, const VCN vcn,
                const BOOL need_write);
 
@@ -101,4 +85,16 @@ extern ntfs_attr_search_ctx *ntfs_attr_get_search_ctx(ntfs_inode *ni,
                MFT_RECORD *mrec);
 extern void ntfs_attr_put_search_ctx(ntfs_attr_search_ctx *ctx);
 
+extern int ntfs_attr_size_bounds_check(const ntfs_volume *vol,
+               const ATTR_TYPE type, const s64 size);
+extern int ntfs_attr_can_be_non_resident(const ntfs_volume *vol,
+               const ATTR_TYPE type);
+extern int ntfs_attr_can_be_resident(const ntfs_volume *vol,
+               const ATTR_TYPE type);
+
+extern int ntfs_attr_record_resize(MFT_RECORD *m, ATTR_RECORD *a, u32 new_size);
+
+extern int ntfs_attr_set(ntfs_inode *ni, const s64 ofs, const s64 cnt,
+               const u8 val);
+
 #endif /* _LINUX_NTFS_ATTRIB_H */