X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fntfs%2Fmft.h;h=639cd1bab08b7919c3307964faaf75f525717950;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=4fd9b5ec6e0c652d1a361ca2225528f9ace7937f;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/fs/ntfs/mft.h b/fs/ntfs/mft.h index 4fd9b5ec6..639cd1bab 100644 --- a/fs/ntfs/mft.h +++ b/fs/ntfs/mft.h @@ -24,11 +24,11 @@ #define _LINUX_NTFS_MFT_H #include +#include +#include #include "inode.h" -extern int format_mft_record(ntfs_inode *ni, MFT_RECORD *m); - extern MFT_RECORD *map_mft_record(ntfs_inode *ni); extern void unmap_mft_record(ntfs_inode *ni); @@ -76,6 +76,9 @@ static inline void mark_mft_record_dirty(ntfs_inode *ni) __mark_mft_record_dirty(ni); } +extern int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, + MFT_RECORD *m, int sync); + extern int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync); /** @@ -94,10 +97,7 @@ extern int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync); * uptodate. * * On success, clean the mft record and return 0. On error, leave the mft - * record dirty and return -errno. The caller should call make_bad_inode() on - * the base inode to ensure no more access happens to this inode. We do not do - * it here as the caller may want to finish writing other extent mft records - * first to minimize on-disk metadata inconsistencies. + * record dirty and return -errno. */ static inline int write_mft_record(ntfs_inode *ni, MFT_RECORD *m, int sync) { @@ -111,6 +111,14 @@ static inline int write_mft_record(ntfs_inode *ni, MFT_RECORD *m, int sync) return err; } +extern BOOL ntfs_may_write_mft_record(ntfs_volume *vol, + const unsigned long mft_no, const MFT_RECORD *m, + ntfs_inode **locked_ni); + +extern ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode, + ntfs_inode *base_ni, MFT_RECORD **mrec); +extern int ntfs_extent_mft_record_free(ntfs_inode *ni, MFT_RECORD *m); + #endif /* NTFS_RW */ #endif /* _LINUX_NTFS_MFT_H */