summaryrefslogtreecommitdiff
path: root/fs/ntfs3/ntfs.h
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-05-08 12:37:22 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-07-02 23:21:28 +0300
commit33e70701ed313fa4aca78cde89ef09c794584a9b (patch)
tree6280c798156d87579a2aabca87c98ec1edf66940 /fs/ntfs3/ntfs.h
parenta81f47c4406e372ce47aff140f3876babac5f01e (diff)
downloadlinux-33e70701ed313fa4aca78cde89ef09c794584a9b.tar.xz
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/ntfs.h')
-rw-r--r--fs/ntfs3/ntfs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ntfs3/ntfs.h b/fs/ntfs3/ntfs.h
index 3ec2eaf31996..98b76d1b09e7 100644
--- a/fs/ntfs3/ntfs.h
+++ b/fs/ntfs3/ntfs.h
@@ -288,6 +288,15 @@ struct MFT_REC {
#define MFTRECORD_FIXUP_OFFSET_1 offsetof(struct MFT_REC, res)
#define MFTRECORD_FIXUP_OFFSET_3 offsetof(struct MFT_REC, fixups)
+/*
+ * define MFTRECORD_FIXUP_OFFSET as MFTRECORD_FIXUP_OFFSET_3 (0x30)
+ * to format new mft records with bigger header (as current ntfs.sys does)
+ *
+ * define MFTRECORD_FIXUP_OFFSET as MFTRECORD_FIXUP_OFFSET_1 (0x2A)
+ * to format new mft records with smaller header (as old ntfs.sys did)
+ * Both variants are valid.
+ */
+#define MFTRECORD_FIXUP_OFFSET MFTRECORD_FIXUP_OFFSET_1
static_assert(MFTRECORD_FIXUP_OFFSET_1 == 0x2A);
static_assert(MFTRECORD_FIXUP_OFFSET_3 == 0x30);