X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fntfs%2Fattrib.h;h=e0c2c6c81bc0871c037826c40c3fe60086dc8d08;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=92899f4ff571df2e84d899fa620d5c66a135b764;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/fs/ntfs/attrib.h b/fs/ntfs/attrib.h index 92899f4ff..e0c2c6c81 100644 --- a/fs/ntfs/attrib.h +++ b/fs/ntfs/attrib.h @@ -24,23 +24,12 @@ #ifndef _LINUX_NTFS_ATTRIB_H #define _LINUX_NTFS_ATTRIB_H -#include - #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 */