[PATCH] PMFS: spelling fixes, remove unneeded comments
Ross Zwisler
ross.zwisler at linux.intel.com
Tue Aug 20 17:40:13 EDT 2013
Signed-off-by: Ross Zwisler <ross.zwisler at linux.intel.com>
---
Documentation/filesystems/pmfs.txt | 6 +++---
README.md | 6 +++---
fs/pmfs/balloc.c | 3 +--
fs/pmfs/bbuild.c | 3 +--
fs/pmfs/inode.c | 14 ++++++--------
fs/pmfs/ioctl.c | 1 -
fs/pmfs/journal.c | 4 ++--
fs/pmfs/namei.c | 2 +-
fs/pmfs/pmfs.h | 12 ++++++------
fs/pmfs/xip.c | 2 +-
include/linux/pmfs_def.h | 2 +-
11 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/Documentation/filesystems/pmfs.txt b/Documentation/filesystems/pmfs.txt
index 4ee7a97..b5180a9 100644
--- a/Documentation/filesystems/pmfs.txt
+++ b/Documentation/filesystems/pmfs.txt
@@ -121,9 +121,9 @@ a) PMFS uses a memory region not used by the kernel. Hence the memory needs to
be reserved by using the memmap= option or using BIOS ACPI tables.
b) Because of multiple blocksize support, PMFS supports multiple max file
-sizes. For example, if the file's block size is 4KB, the file can grow upto
-512 GB in size, if blocksize is 2MB, file can grow upto 256 TB, and if the
-blocksize is 1GB, the file can grow upto 128 PB.
+sizes. For example, if the file's block size is 4KB, the file can grow up to
+512 GB in size, if blocksize is 2MB, file can grow up to 256 TB, and if the
+blocksize is 1GB, the file can grow up to 128 PB.
c) PMFS does not currently support extended attributes.
diff --git a/README.md b/README.md
index 1a828e5..62e6951 100644
--- a/README.md
+++ b/README.md
@@ -121,9 +121,9 @@ Current Limitations
be reserved by using the memmap= option or using BIOS ACPI tables.
* Because of multiple blocksize support, PMFS supports multiple max file
-sizes. For example, if the file's block size is 4KB, the file can grow upto
-512 GB in size, if blocksize is 2MB, file can grow upto 256 TB, and if the
-blocksize is 1GB, the file can grow upto 128 PB.
+sizes. For example, if the file's block size is 4KB, the file can grow up to
+512 GB in size, if blocksize is 2MB, file can grow up to 256 TB, and if the
+blocksize is 1GB, the file can grow up to 128 PB.
* PMFS does not currently support extended attributes.
diff --git a/fs/pmfs/balloc.c b/fs/pmfs/balloc.c
index ba08166..15ae58b 100644
--- a/fs/pmfs/balloc.c
+++ b/fs/pmfs/balloc.c
@@ -170,7 +170,6 @@ int pmfs_new_block(struct super_block *sb, unsigned long *blocknr,
mutex_lock(&sbi->s_lock);
- /* Traverese each blocknode entry */
list_for_each_entry(i, head, link) {
if (i->link.next == head) {
next_i = NULL;
@@ -191,7 +190,7 @@ int pmfs_new_block(struct super_block *sb, unsigned long *blocknr,
if ((new_block_low == (i->block_high + 1)) &&
(new_block_high == (next_block_low - 1)))
{
- /* Fill the gap completly */
+ /* Fill the gap completely */
if (next_i) {
i->block_high = next_i->block_high;
list_del(&next_i->link);
diff --git a/fs/pmfs/bbuild.c b/fs/pmfs/bbuild.c
index 71fee7f..26733ec 100644
--- a/fs/pmfs/bbuild.c
+++ b/fs/pmfs/bbuild.c
@@ -327,7 +327,6 @@ static int pmfs_alloc_insert_blocknode_map(struct super_block *sb,
new_block_high = high;
num_blocks = high - low + 1;
- /* Traverese each blocknode entry */
list_for_each_entry(i, head, link) {
if (i->link.next == head) {
next_i = NULL;
@@ -346,7 +345,7 @@ static int pmfs_alloc_insert_blocknode_map(struct super_block *sb,
if ((new_block_low == (i->block_high + 1)) &&
(new_block_high == (next_block_low - 1)))
{
- /* Fill the gap completly */
+ /* Fill the gap completely */
if (next_i) {
i->block_high = next_i->block_high;
list_del(&next_i->link);
diff --git a/fs/pmfs/inode.c b/fs/pmfs/inode.c
index ce4f84e..71a9196 100644
--- a/fs/pmfs/inode.c
+++ b/fs/pmfs/inode.c
@@ -188,7 +188,7 @@ out:
return -ENXIO;
if (data_found && !hole_found) {
- /* Searching data but we are alredy into them */
+ /* Searching data but we are already into them */
if (hole)
/* Searching hole but only data found, go to the end */
*offset = inode->i_size;
@@ -215,9 +215,9 @@ out:
return 0;
}
-/* examine the meta-data block node upto the end_idx for any non-null
+/* examine the meta-data block node up to the end_idx for any non-null
* pointers. if found return false, else return true.
- * requied to determine if a meta-data block contains no pointers and hence
+ * required to determine if a meta-data block contains no pointers and hence
* can be freed.
*/
static inline bool is_empty_meta_block(u64 *node, unsigned int start_idx,
@@ -490,7 +490,8 @@ static void __pmfs_truncate_blocks(struct inode *inode, loff_t start,
}
}
/* if we are called during mount, a power/system failure had happened.
- * Dont trust inode->i_blocks; recalculate it by rescanning the inode */
+ * Don't trust inode->i_blocks; recalculate it by rescanning the inode
+ */
if (pmfs_is_mounting(sb))
inode->i_blocks = pmfs_inode_count_iblocks(sb, pi, root);
else
@@ -708,7 +709,6 @@ int __pmfs_alloc_blocks(pmfs_transaction_t *trans, struct super_block *sb,
}
root = cpu_to_le64(pmfs_get_block_off(sb, blocknr,
pi->i_blk_type));
- /* TODO: use RTM for in-place atomic update */
pmfs_memunlock_inode(sb, pi);
pi->root = root;
pi->height = height;
@@ -937,7 +937,6 @@ static int pmfs_free_inode(struct inode *inode)
pi = pmfs_get_inode(sb, inode->i_ino);
- /* This transaction can be avoided if using RTM */
trans = pmfs_new_transaction(sb, MAX_INODE_LENTRIES);
if (IS_ERR(trans)) {
err = PTR_ERR(trans);
@@ -946,7 +945,6 @@ static int pmfs_free_inode(struct inode *inode)
pmfs_add_logentry(sb, trans, pi, MAX_DATA_PER_LENTRY, LE_DATA);
- /* TODO: use RTM to write the below cacheline atomically */
pmfs_memunlock_inode(sb, pi);
pi->root = 0;
/* pi->i_links_count = 0;
@@ -1371,7 +1369,7 @@ out:
* when VFS calls evict_inode. If a power failure happens before evict_inode,
* the inode is freed during the next mount when we recover the truncate list
* 2) When truncating a file (reducing the file size and freeing the blocks),
- * we dont want to return the freed blocks to the free list until the whole
+ * we don't want to return the freed blocks to the free list until the whole
* truncate operation is complete. So we add the inode to the truncate list with
* the specified truncate_size. Now we can return freed blocks to the free list
* even before the transaction is complete. Because if a power failure happens
diff --git a/fs/pmfs/ioctl.c b/fs/pmfs/ioctl.c
index c9623ed..74a2936 100644
--- a/fs/pmfs/ioctl.c
+++ b/fs/pmfs/ioctl.c
@@ -70,7 +70,6 @@ long pmfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
flags = flags & FS_FL_USER_MODIFIABLE;
flags |= oldflags & ~FS_FL_USER_MODIFIABLE;
inode->i_ctime = CURRENT_TIME_SEC;
- /*TODO: This transaction can be avoided if we had RTM */
trans = pmfs_new_transaction(sb, MAX_INODE_LENTRIES);
if (IS_ERR(trans)) {
ret = PTR_ERR(trans);
diff --git a/fs/pmfs/journal.c b/fs/pmfs/journal.c
index bb710a2..2c09471 100644
--- a/fs/pmfs/journal.c
+++ b/fs/pmfs/journal.c
@@ -536,7 +536,7 @@ again:
tail = tail + req_size;
/* journal wraparound because of this transaction allocation.
* start the transaction from the beginning of the journal so
- * that we dont have any wraparound within a transaction */
+ * that we don't have any wraparound within a transaction */
pmfs_memunlock_range(sb, journal, sizeof(*journal));
if (tail >= sbi->jsize) {
volatile u64 *ptr;
@@ -672,7 +672,7 @@ int pmfs_add_logentry(struct super_block *sb,
pmfs_memlock_range(sb, le, sizeof(*le) * num_les);
return 0;
}
- /* put a compile time barrier so that compiler doesnt reorder
+ /* put a compile time barrier so that compiler doesn't reorder
* the writes to the log entry */
barrier();
diff --git a/fs/pmfs/namei.c b/fs/pmfs/namei.c
index 232faee..d3e5823 100644
--- a/fs/pmfs/namei.c
+++ b/fs/pmfs/namei.c
@@ -477,7 +477,7 @@ static int pmfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
inode->i_fop = &pmfs_dir_operations;
inode->i_mapping->a_ops = &pmfs_aops_xip;
- /* since this is a new inode so we dont need to include this
+ /* since this is a new inode so we don't need to include this
* pmfs_alloc_blocks in the transaction
*/
err = pmfs_alloc_blocks(NULL, inode, 0, 1, false);
diff --git a/fs/pmfs/pmfs.h b/fs/pmfs/pmfs.h
index f0a9100..78b9fdb 100644
--- a/fs/pmfs/pmfs.h
+++ b/fs/pmfs/pmfs.h
@@ -80,7 +80,7 @@ extern unsigned int pmfs_dbgmask;
#define test_opt(sb, opt) (PMFS_SB(sb)->s_mount_opt & PMFS_MOUNT_ ## opt)
#define PMFS_LARGE_INODE_TABLE_SIZE (0x200000)
-/* PMFS size threashold for using 2M blocks for inode table */
+/* PMFS size threshold for using 2M blocks for inode table */
#define PMFS_LARGE_INODE_TABLE_THREASHOLD (0x20000000)
/*
* pmfs inode flags
@@ -206,10 +206,10 @@ static inline void pmfs_flush_buffer(void *buf, uint32_t len, bool fence)
len = len + ((unsigned long)(buf) & (CACHELINE_SIZE - 1));
for (i = 0; i < len; i += CACHELINE_SIZE)
asm volatile ("clflush %0\n" : "+m" (*(char *)(buf+i)));
- /* Do a fence only if asked. We often don't need to do a fence immidiately
- * after clflush because even if we get context switched between clflush
- * and subsequent fence, the context switch operation provides implicit
- * fence. */
+ /* Do a fence only if asked. We often don't need to do a fence
+ * immediately after clflush because even if we get context switched
+ * between clflush and subsequent fence, the context switch operation
+ * provides implicit fence. */
if (fence)
asm volatile ("sfence\n" : : );
}
@@ -311,7 +311,7 @@ static inline void *pmfs_get_block(struct super_block *sb, u64 block)
return block ? ((void *)ps + block) : NULL;
}
-/* uses CPU instructions to atomically write upto 8 bytes */
+/* uses CPU instructions to atomically write up to 8 bytes */
static inline void pmfs_memcpy_atomic (void *dst, const void *src, u8 size)
{
switch (size) {
diff --git a/fs/pmfs/xip.c b/fs/pmfs/xip.c
index a7cf780..f52cf12 100644
--- a/fs/pmfs/xip.c
+++ b/fs/pmfs/xip.c
@@ -113,7 +113,7 @@ __pmfs_xip_file_write(struct address_space *mapping, const char __user *buf,
}
/* optimized path for file write that doesn't require a transaction. In this
- * path we dont need to allocate any new data blocks. So the only meta-data
+ * path we don't need to allocate any new data blocks. So the only meta-data
* modified in path is inode's i_size, i_ctime, and i_mtime fields */
static ssize_t pmfs_file_write_fast(struct super_block *sb, struct inode *inode,
struct pmfs_inode *pi, const char __user *buf, size_t count, loff_t pos,
diff --git a/include/linux/pmfs_def.h b/include/linux/pmfs_def.h
index e52741e..c9c1efe 100644
--- a/include/linux/pmfs_def.h
+++ b/include/linux/pmfs_def.h
@@ -164,7 +164,7 @@ typedef struct pmfs_journal {
*/
struct pmfs_super_block {
/* static fields. they never change after file system creation.
- * checksum only validates upto s_start_dynamic field below */
+ * checksum only validates up to s_start_dynamic field below */
__le16 s_sum; /* checksum of this sb */
__le16 s_magic; /* magic signature */
__le32 s_blocksize; /* blocksize in bytes */
--
1.8.2.GIT
More information about the Linux-pmfs
mailing list