Commit 97a6815e authored by Konstantin Komarov's avatar Konstantin Komarov

fs/ntfs3: Use ALIGN kernel macro

This way code will be more readable.
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent e31195a3
...@@ -503,7 +503,7 @@ static int ntfs_extend_mft(struct ntfs_sb_info *sbi) ...@@ -503,7 +503,7 @@ static int ntfs_extend_mft(struct ntfs_sb_info *sbi)
struct ATTRIB *attr; struct ATTRIB *attr;
struct wnd_bitmap *wnd = &sbi->mft.bitmap; struct wnd_bitmap *wnd = &sbi->mft.bitmap;
new_mft_total = (wnd->nbits + MFT_INCREASE_CHUNK + 127) & (CLST)~127; new_mft_total = ALIGN(wnd->nbits + NTFS_MFT_INCREASE_STEP, 128);
new_mft_bytes = (u64)new_mft_total << sbi->record_bits; new_mft_bytes = (u64)new_mft_total << sbi->record_bits;
/* Step 1: Resize $MFT::DATA. */ /* Step 1: Resize $MFT::DATA. */
......
...@@ -84,7 +84,6 @@ typedef u32 CLST; ...@@ -84,7 +84,6 @@ typedef u32 CLST;
#define COMPRESSION_UNIT 4 #define COMPRESSION_UNIT 4
#define COMPRESS_MAX_CLUSTER 0x1000 #define COMPRESS_MAX_CLUSTER 0x1000
#define MFT_INCREASE_CHUNK 1024
enum RECORD_NUM { enum RECORD_NUM {
MFT_REC_MFT = 0, MFT_REC_MFT = 0,
......
...@@ -199,6 +199,8 @@ struct ntfs_index { ...@@ -199,6 +199,8 @@ struct ntfs_index {
/* Minimum MFT zone. */ /* Minimum MFT zone. */
#define NTFS_MIN_MFT_ZONE 100 #define NTFS_MIN_MFT_ZONE 100
/* Step to increase the MFT. */
#define NTFS_MFT_INCREASE_STEP 1024
/* Ntfs file system in-core superblock data. */ /* Ntfs file system in-core superblock data. */
struct ntfs_sb_info { struct ntfs_sb_info {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment