Commit ea737678 authored by Konstantin Komarov's avatar Konstantin Komarov

fs/ntfs3: Add some comments

Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 83cf2cf1
...@@ -4111,7 +4111,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4111,7 +4111,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
/* Allocate and Read the Transaction Table. */ /* Allocate and Read the Transaction Table. */
if (!rst->transact_table_len) if (!rst->transact_table_len)
goto check_dirty_page_table; goto check_dirty_page_table; /* reduce tab pressure. */
t64 = le64_to_cpu(rst->transact_table_lsn); t64 = le64_to_cpu(rst->transact_table_lsn);
err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb); err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb);
...@@ -4151,7 +4151,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4151,7 +4151,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
check_dirty_page_table: check_dirty_page_table:
/* The next record back should be the Dirty Pages Table. */ /* The next record back should be the Dirty Pages Table. */
if (!rst->dirty_pages_len) if (!rst->dirty_pages_len)
goto check_attribute_names; goto check_attribute_names; /* reduce tab pressure. */
t64 = le64_to_cpu(rst->dirty_pages_table_lsn); t64 = le64_to_cpu(rst->dirty_pages_table_lsn);
err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb); err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb);
...@@ -4187,7 +4187,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4187,7 +4187,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
/* Convert Ra version '0' into version '1'. */ /* Convert Ra version '0' into version '1'. */
if (rst->major_ver) if (rst->major_ver)
goto end_conv_1; goto end_conv_1; /* reduce tab pressure. */
dp = NULL; dp = NULL;
while ((dp = enum_rstbl(dptbl, dp))) { while ((dp = enum_rstbl(dptbl, dp))) {
...@@ -4207,8 +4207,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4207,8 +4207,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
* remembering the oldest lsn values. * remembering the oldest lsn values.
*/ */
if (sbi->cluster_size <= log->page_size) if (sbi->cluster_size <= log->page_size)
goto trace_dp_table; goto trace_dp_table; /* reduce tab pressure. */
dp = NULL; dp = NULL;
while ((dp = enum_rstbl(dptbl, dp))) { while ((dp = enum_rstbl(dptbl, dp))) {
struct DIR_PAGE_ENTRY *next = dp; struct DIR_PAGE_ENTRY *next = dp;
...@@ -4229,7 +4228,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4229,7 +4228,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
check_attribute_names: check_attribute_names:
/* The next record should be the Attribute Names. */ /* The next record should be the Attribute Names. */
if (!rst->attr_names_len) if (!rst->attr_names_len)
goto check_attr_table; goto check_attr_table; /* reduce tab pressure. */
t64 = le64_to_cpu(rst->attr_names_lsn); t64 = le64_to_cpu(rst->attr_names_lsn);
err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb); err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb);
...@@ -4261,7 +4260,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4261,7 +4260,7 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
check_attr_table: check_attr_table:
/* The next record should be the attribute Table. */ /* The next record should be the attribute Table. */
if (!rst->open_attr_len) if (!rst->open_attr_len)
goto check_attribute_names2; goto check_attribute_names2; /* reduce tab pressure. */
t64 = le64_to_cpu(rst->open_attr_table_lsn); t64 = le64_to_cpu(rst->open_attr_table_lsn);
err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb); err = read_log_rec_lcb(log, t64, lcb_ctx_prev, &lcb);
...@@ -4550,7 +4549,6 @@ int log_replay(struct ntfs_inode *ni, bool *initialized) ...@@ -4550,7 +4549,6 @@ int log_replay(struct ntfs_inode *ni, bool *initialized)
} }
} }
goto next_log_record_analyze; goto next_log_record_analyze;
;
} }
case OpenNonresidentAttribute: case OpenNonresidentAttribute:
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "ntfs_fs.h" #include "ntfs_fs.h"
/* /*
* ntfs_read_mft - Read record and parses MFT. * ntfs_read_mft - Read record and parse MFT.
*/ */
static struct inode *ntfs_read_mft(struct inode *inode, static struct inode *ntfs_read_mft(struct inode *inode,
const struct cpu_str *name, const struct cpu_str *name,
...@@ -1557,7 +1557,7 @@ int ntfs_create_inode(struct mnt_idmap *idmap, struct inode *dir, ...@@ -1557,7 +1557,7 @@ int ntfs_create_inode(struct mnt_idmap *idmap, struct inode *dir,
/* /*
* Below function 'ntfs_save_wsl_perm' requires 0x78 bytes. * Below function 'ntfs_save_wsl_perm' requires 0x78 bytes.
* It is good idea to keep extened attributes resident. * It is good idea to keep extended attributes resident.
*/ */
if (asize + t16 + 0x78 + 8 > sbi->record_size) { if (asize + t16 + 0x78 + 8 > sbi->record_size) {
CLST alen; CLST alen;
......
...@@ -1205,7 +1205,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) ...@@ -1205,7 +1205,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
/* /*
* Load $Volume. This should be done before $LogFile * Load $Volume. This should be done before $LogFile
* 'cause 'sbi->volume.ni' is used 'ntfs_set_state'. * 'cause 'sbi->volume.ni' is used in 'ntfs_set_state'.
*/ */
ref.low = cpu_to_le32(MFT_REC_VOL); ref.low = cpu_to_le32(MFT_REC_VOL);
ref.seq = cpu_to_le16(MFT_REC_VOL); ref.seq = cpu_to_le16(MFT_REC_VOL);
...@@ -1866,8 +1866,7 @@ static int __init init_ntfs_fs(void) ...@@ -1866,8 +1866,7 @@ static int __init init_ntfs_fs(void)
ntfs_inode_cachep = kmem_cache_create( ntfs_inode_cachep = kmem_cache_create(
"ntfs_inode_cache", sizeof(struct ntfs_inode), 0, "ntfs_inode_cache", sizeof(struct ntfs_inode), 0,
(SLAB_RECLAIM_ACCOUNT | SLAB_ACCOUNT), (SLAB_RECLAIM_ACCOUNT | SLAB_ACCOUNT), init_once);
init_once);
if (!ntfs_inode_cachep) { if (!ntfs_inode_cachep) {
err = -ENOMEM; err = -ENOMEM;
goto out1; goto out1;
......
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