#ifndef _LINUX_NTFS_MFT_H
#define _LINUX_NTFS_MFT_H
#include <linux/highmem.h>
#include <linux/pagemap.h>
#include "inode.h"
struct mft_record *map_mft_record(struct ntfs_inode *ni);
void unmap_mft_record(struct ntfs_inode *ni);
struct mft_record *map_extent_mft_record(struct ntfs_inode *base_ni, u64 mref,
struct ntfs_inode **ntfs_ino);
static inline void unmap_extent_mft_record(struct ntfs_inode *ni)
{
unmap_mft_record(ni);
}
void __mark_mft_record_dirty(struct ntfs_inode *ni);
static inline void mark_mft_record_dirty(struct ntfs_inode *ni)
{
if (!NInoTestSetDirty(ni))
__mark_mft_record_dirty(ni);
}
int ntfs_sync_mft_mirror(struct ntfs_volume *vol, const u64 mft_no,
struct mft_record *m);
int write_mft_record_nolock(struct ntfs_inode *ni, struct mft_record *m, int sync);
static inline int write_mft_record(struct ntfs_inode *ni, struct mft_record *m, int sync)
{
struct folio *folio = ni->folio;
int err;
folio_lock(folio);
err = write_mft_record_nolock(ni, m, sync);
folio_unlock(folio);
return err;
}
int ntfs_mft_record_alloc(struct ntfs_volume *vol, const int mode,
struct ntfs_inode **ni, struct ntfs_inode *base_ni,
struct mft_record **ni_mrec);
int ntfs_mft_record_free(struct ntfs_volume *vol, struct ntfs_inode *ni);
int ntfs_mft_records_write(const struct ntfs_volume *vol, const u64 mref,
const s64 count, struct mft_record *b);
int ntfs_mft_record_check(const struct ntfs_volume *vol, struct mft_record *m,
u64 mft_no);
int ntfs_mft_writepages(struct address_space *mapping,
struct writeback_control *wbc);
void ntfs_mft_mark_dirty(struct folio *folio);
#endif