summaryrefslogtreecommitdiffstats
path: root/fs/ntfs3/record.c
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-05-08 11:37:22 +0200
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-07-02 22:21:28 +0200
commit33e70701ed313fa4aca78cde89ef09c794584a9b (patch)
tree6280c798156d87579a2aabca87c98ec1edf66940 /fs/ntfs3/record.c
parentfs/ntfs3: Code refactoring (diff)
downloadlinux-33e70701ed313fa4aca78cde89ef09c794584a9b.tar.xz
linux-33e70701ed313fa4aca78cde89ef09c794584a9b.zip
fs/ntfs3: Add ability to format new mft records with bigger/smaller header
Just define in ntfs.h #define MFTRECORD_FIXUP_OFFSET MFTRECORD_FIXUP_OFFSET_1 or #define MFTRECORD_FIXUP_OFFSET MFTRECORD_FIXUP_OFFSET_3 Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/record.c')
-rw-r--r--fs/ntfs3/record.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index e73ca2df42eb..c12ebffc94da 100644
--- a/fs/ntfs3/record.c
+++ b/fs/ntfs3/record.c
@@ -388,6 +388,8 @@ int mi_format_new(struct mft_inode *mi, struct ntfs_sb_info *sbi, CLST rno,
rec->seq = cpu_to_le16(seq);
rec->flags = RECORD_FLAG_IN_USE | flags;
+ if (MFTRECORD_FIXUP_OFFSET == MFTRECORD_FIXUP_OFFSET_3)
+ rec->mft_record = cpu_to_le32(rno);
mi->dirty = true;