btrfs-progs: fix typos in comments

Generated by https://github.com/jsoref/spelling

Issue: #154
Author: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: David Sterba <dsterba@suse.com>
master
Josh Soref 2018-11-26 18:01:42 +01:00 committed by David Sterba
parent 584749488a
commit b1d39a42a4
26 changed files with 42 additions and 42 deletions

View File

@ -169,7 +169,7 @@ static int cmd_version(int argc, char **argv)
* Parse global options, between binary name and first non-option argument
* after processing all valid options (including those with arguments).
*
* Returns index to argv where parsting stopped, optind is reset to 1
* Returns index to argv where parsing stopped, optind is reset to 1
*/
static int handle_global_options(int argc, char **argv)
{

View File

@ -4052,7 +4052,7 @@ static int try_to_fix_bad_block(struct btrfs_root *root,
btrfs_init_path(&path);
ULIST_ITER_INIT(&iter);
/*
* If we found no roots referrening to this tree block, there is no
* If we found no roots referencing to this tree block, there is no
* chance to fix. So our default ret is -EIO.
*/
ret = -EIO;
@ -8654,7 +8654,7 @@ static int reinit_extent_tree(struct btrfs_trans_handle *trans,
* first we need to walk all of the trees except the extent tree and pin
* down/exclude the bytes that are in use so we don't overwrite any
* existing metadata.
* If pinnned, unpin will be done in the end of transaction.
* If pinned, unpin will be done in the end of transaction.
* If excluded, cleanup will be done in check_chunks_and_extents_lowmem.
*/
again:
@ -9146,7 +9146,7 @@ static int build_roots_info_cache(struct btrfs_fs_info *info)
* It's a valid extent/metadata item that has no inline ref,
* but SHARED_BLOCK_REF or other shared references.
* So we need to do extra check to avoid reading beyond leaf
* boudnary.
* boundary.
*/
if ((unsigned long)iref >= item_end)
goto next;

View File

@ -493,7 +493,7 @@ out:
}
/*
* Extra (optional) check for dev_item size to report possbile problem on a new
* Extra (optional) check for dev_item size to report possible problem on a new
* kernel.
*/
void check_dev_size_alignment(u64 devid, u64 total_bytes, u32 sectorsize)

View File

@ -2636,7 +2636,7 @@ again:
if (err & LAST_ITEM)
goto out;
/* still have inode items in thie leaf */
/* still have inode items in this leaf */
if (cur->start == cur_bytenr)
goto again;
@ -2674,7 +2674,7 @@ out:
/*
* @level if @level == -1 means extent data item
* else normal treeblocl.
* else normal treeblock.
*/
static int should_check_extent_strictly(struct btrfs_root *root,
struct node_refs *nrefs, int level)

View File

@ -56,7 +56,7 @@
#define BACKREF_MISMATCH (1 << 1) /* Backref exists but does not match */
#define BYTES_UNALIGNED (1 << 2) /* Some bytes are not aligned */
#define REFERENCER_MISSING (1 << 3) /* Referencer not found */
#define REFERENCER_MISMATCH (1 << 4) /* Referenceer found but does not match */
#define REFERENCER_MISMATCH (1 << 4) /* Referencer found but does not match */
#define CROSSING_STRIPE_BOUNDARY (1 << 4) /* For kernel scrub workaround */
#define ITEM_SIZE_MISMATCH (1 << 5) /* Bad item size */
#define UNKNOWN_TYPE (1 << 6) /* Unknown type */

View File

@ -111,7 +111,7 @@ static const char * const cmd_rescue_super_recover_usage[] = {
* 0 : All superblocks are valid, no need to recover
* 1 : Usage or syntax error
* 2 : Recover all bad superblocks successfully
* 3 : Fail to Recover bad supeblocks
* 3 : Fail to Recover bad superblocks
* 4 : Abort to recover bad superblocks
*/
static int cmd_rescue_super_recover(int argc, char **argv)

View File

@ -76,7 +76,7 @@ static inline int write_temp_super(int fd, struct btrfs_super_block *sb,
}
/*
* Setup temporary superblock at cfg->super_bynter
* Setup temporary superblock at cfg->super_bytenr
* Needed info are extracted from cfg, and root_bytenr, chunk_bytenr
*
* For now sys chunk array will be empty and dev_item is empty too.

View File

@ -66,7 +66,7 @@
* c. Doesn't cover any data chunks in 1.1
*
* 2) Create basic btrfs filesystem structure
* Initial metadata and sys chunks are inserted in the first availabe
* Initial metadata and sys chunks are inserted in the first available
* space found in step 1.3
* Then insert all data chunks into the basic btrfs
*
@ -682,7 +682,7 @@ static int calculate_available_space(struct btrfs_convert_context *cctx)
cur_off = 0;
/*
* Calculate free space
* Always round up the start bytenr, to avoid metadata extent corss
* Always round up the start bytenr, to avoid metadata extent cross
* stripe boundary, as later mkfs_convert() won't have all the extent
* allocation check
*/
@ -724,7 +724,7 @@ out:
/*
* Read used space, and since we have the used space,
* calcuate data_chunks and free for later mkfs
* calculate data_chunks and free for later mkfs
*/
static int convert_read_used_space(struct btrfs_convert_context *cctx)
{
@ -975,7 +975,7 @@ static int init_btrfs(struct btrfs_mkfs_config *cfg, struct btrfs_root *root,
/*
* Don't alloc any metadata/system chunk, as we don't want
* any meta/sys chunk allcated before all data chunks are inserted.
* any meta/sys chunk allocated before all data chunks are inserted.
* Or we screw up the chunk layout just like the old implement.
*/
fs_info->avoid_sys_chunk_alloc = 1;
@ -1344,7 +1344,7 @@ static bool is_chunk_direct_mapped(struct btrfs_fs_info *fs_info, u64 start)
if (map->num_stripes != 1)
goto out;
/* Chunk's logical doesn't match with phisical, not 1:1 mapped */
/* Chunk's logical doesn't match with physical, not 1:1 mapped */
if (map->ce.start != map->stripes[0].physical)
goto out;
ret = true;
@ -1356,7 +1356,7 @@ out:
* Iterate all file extents of the convert image.
*
* All file extents except ones in btrfs_reserved_ranges must be mapped 1:1
* on disk. (Means thier file_offset must match their on disk bytenr)
* on disk. (Means their file_offset must match their on disk bytenr)
*
* File extents in reserved ranges can be relocated to other place, and in
* that case we will read them out for later use.

View File

@ -26,7 +26,7 @@
#define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID
/*
* Reresents a simple contiguous range.
* Represents a simple contiguous range.
*
* For multiple or non-contiguous ranges, use extent_cache_tree from
* extent-cache.c

View File

@ -301,7 +301,7 @@ static int reiserfs_record_indirect_extent(reiserfs_filsys_t fs, u64 position,
/*
* Unlike btrfs inline extents, reiserfs can have multiple inline extents.
* This handles concatanating multiple tails into one inline extent
* This handles concatenating multiple tails into one inline extent
* for insertion.
*/
static int reiserfs_record_direct_extent(reiserfs_filsys_t fs, __u64 position,
@ -564,7 +564,7 @@ static int reiserfs_copy_meta(reiserfs_filsys_t fs, struct btrfs_root *root,
};
/* The root directory's dirid in reiserfs points to an object
* that does't exist. In btrfs it's self-referential.
* that doens't exist. In btrfs it's self-referential.
*/
if (deh_dirid == REISERFS_ROOT_PARENT_OBJECTID)
parent = objectid;

View File

@ -3043,7 +3043,7 @@ int btrfs_previous_item(struct btrfs_root *root,
/*
* search in extent tree to find a previous Metadata/Data extent item with
* min objecitd.
* min objectid.
*
* returns 0 if something is found, 1 if nothing was found and < 0 on error
*/

View File

@ -97,7 +97,7 @@ struct btrfs_free_space_ctl;
/* for storing balance parameters in the root tree */
#define BTRFS_BALANCE_OBJECTID -4ULL
/* oprhan objectid for tracking unlinked/truncated files */
/* orphan objectid for tracking unlinked/truncated files */
#define BTRFS_ORPHAN_OBJECTID -5ULL
/* does write ahead logging to speed up fsyncs */
@ -119,7 +119,7 @@ struct btrfs_free_space_ctl;
#define BTRFS_FREE_SPACE_OBJECTID -11ULL
/*
* The inode number assigned to the special inode for sotring
* The inode number assigned to the special inode for storing
* free ino cache
*/
#define BTRFS_FREE_INO_OBJECTID -12ULL
@ -2404,7 +2404,7 @@ static inline struct btrfs_disk_balance_args* btrfs_balance_item_sys(
/*
* btrfs_dev_stats_item helper, returns pointer to the raw array, do the
* endiannes conversion, @dsi is offset to eb data
* endianness conversion, @dsi is offset to eb data
*/
static inline __le64* btrfs_dev_stats_values(struct extent_buffer *eb,
struct btrfs_dev_stats_item *dsi)

View File

@ -1440,7 +1440,7 @@ error_out:
* @sb_bytenr: offset of the particular superblock copy we want
* @sbflags: flags controlling how the superblock is read
*
* This function is used by various btrfs comands to obtain a valid superblock.
* This function is used by various btrfs commands to obtain a valid superblock.
*
* It's mode of operation is controlled by the @sb_bytenr and @sbdflags
* parameters. If SBREAD_RECOVER flag is set and @sb_bytenr is

View File

@ -36,7 +36,7 @@ enum btrfs_open_ctree_flags {
OPEN_CTREE_PARTIAL = (1U << 1),
/* If primary root pinters are invalid, try backup copies */
OPEN_CTREE_BACKUP_ROOT = (1U << 2),
/* Allow reading all superblock sopies if the primary is damaged */
/* Allow reading all superblock copies if the primary is damaged */
OPEN_CTREE_RECOVER_SUPER = (1U << 3),
/* Restoring filesystem image */
OPEN_CTREE_RESTORE = (1U << 4),

4
file.c
View File

@ -178,7 +178,7 @@ out:
* 3) data read out is also aligned to sectorsize, not truncated to inode size
*
* Return < 0 for fatal error during read.
* Otherwise return the number of succesfully read data in bytes.
* Otherwise return the number of successfully read data in bytes.
*/
int btrfs_read_file(struct btrfs_root *root, u64 ino, u64 start, int len,
char *dest)
@ -301,7 +301,7 @@ next:
/*
* Special trick for no_holes, since for no_holes we don't have good
* method to account skipped and tailling holes, we used
* method to account skipped and tailing holes, we used
* min(inode size, len) as return value
*/
if (no_holes) {

2
help.c
View File

@ -108,7 +108,7 @@ void clean_args_no_options(int argc, char *argv[], const char * const *usagestr)
/*
* Same as clean_args_no_options but pass through arguments that could look
* like short options. Eg. reisze which takes a negative resize argument like
* like short options. Eg. resize which takes a negative resize argument like
* '-123M' .
*
* This accepts only two forms:

View File

@ -55,7 +55,7 @@ struct fs_chunk {
u64 logical;
u64 physical;
/*
* physical_dup only store additonal physical for BTRFS_BLOCK_GROUP_DUP
* physical_dup only store additional physical for BTRFS_BLOCK_GROUP_DUP
* currently restore only support single and DUP
* TODO: modify this structure and the function related to this
* structure for support RAID*

View File

@ -330,7 +330,7 @@ int raid56_recov(int nr_devs, size_t stripe_len, u64 profile, int dest1,
return 0;
}
/* Regerneate data from P */
/* Regenerate data from P */
return raid5_gen_result(nr_devs - 1, stripe_len, dest1, data);
}

View File

@ -19,7 +19,7 @@
linux/include/linux/rbtree.h
To use rbtrees you'll have to implement your own insert and search cores.
This will avoid us to use callbacks and to drop drammatically performances.
This will avoid us to use callbacks and to drop dramatically performances.
I know it's not the cleaner way, but in C (not in C++) to get
performances and genericity...

View File

@ -134,7 +134,7 @@ struct btrfs_scrub_progress {
__u64 tree_bytes_scrubbed; /* # of tree bytes scrubbed */
__u64 read_errors; /* # of read errors encountered (EIO) */
__u64 csum_errors; /* # of failed csum checks */
__u64 verify_errors; /* # of occurences, where the metadata
__u64 verify_errors; /* # of occurrences, where the metadata
* of a tree block did not match the
* expected values, like generation or
* logical */
@ -154,7 +154,7 @@ struct btrfs_scrub_progress {
__u64 last_physical; /* last physical address scrubbed. In
* case a scrub was aborted, this can
* be used to restart the scrub */
__u64 unverified_errors; /* # of occurences where a read for a
__u64 unverified_errors; /* # of occurrences where a read for a
* full (64k) bio failed, but the re-
* check succeeded for each 4k piece.
* Intermittent error. */

View File

@ -54,7 +54,7 @@
/* for storing balance parameters in the root tree */
#define BTRFS_BALANCE_OBJECTID -4ULL
/* orhpan objectid for tracking unlinked/truncated files */
/* orphan objectid for tracking unlinked/truncated files */
#define BTRFS_ORPHAN_OBJECTID -5ULL
/* does write ahead logging to speed up fsyncs */
@ -270,7 +270,7 @@
#define BTRFS_PERSISTENT_ITEM_KEY 249
/*
* Persistantly stores the device replace state in the device tree.
* Persistently stores the device replace state in the device tree.
* The key is built like this: (0, BTRFS_DEV_REPLACE_KEY, 0).
*/
#define BTRFS_DEV_REPLACE_KEY 250

View File

@ -887,7 +887,7 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset,
})
/*
* Caller should ensure sizeof(*ret) >= 102: all charactors plus '|' of
* Caller should ensure sizeof(*ret) >= 102: all characters plus '|' of
* BTRFS_INODE_* flags
*/
static void inode_flags_to_str(u64 flags, char *ret)

View File

@ -47,7 +47,7 @@
})
/*
* Print path and escape chaacters (in a C way) that could break the line.
* Print path and escape characters (in a C way) that could break the line.
* Returns the length of the escaped characters. Unprintable characters are
* escaped as octals.
*/

View File

@ -35,7 +35,7 @@ struct btrfs_send_stream {
/*
* end of last successful read, equivalent to start of current
* malformated part of block
* malformed part of block
*/
size_t stream_pos;

View File

@ -188,7 +188,7 @@ commit_tree:
ret = commit_tree_roots(trans, fs_info);
BUG_ON(ret);
/*
* Ensure that all comitted roots are properly accounted in the
* Ensure that all committed roots are properly accounted in the
* extent tree
*/
ret = btrfs_run_delayed_refs(trans, -1);

View File

@ -835,7 +835,7 @@ static int blk_file_in_dev_list(struct btrfs_fs_devices* fs_devices,
/*
* Resolve a pathname to a device mapper node to /dev/mapper/<name>
* Returns NULL on invalid input or malloc failure; Other failures
* will be handled by the caller using the input pathame.
* will be handled by the caller using the input pathname.
*/
char *canonicalize_dm_name(const char *ptname)
{
@ -866,7 +866,7 @@ char *canonicalize_dm_name(const char *ptname)
* Resolve a pathname to a canonical device node, e.g. /dev/sda1 or
* to a device mapper pathname.
* Returns NULL on invalid input or malloc failure; Other failures
* will be handled by the caller using the input pathame.
* will be handled by the caller using the input pathname.
*/
char *canonicalize_path(const char *path)
{
@ -2521,7 +2521,7 @@ u32 rand_u32(void)
{
__init_seed();
/*
* Don't use nrand48, its range is [0,2^31) The highest bit will alwasy
* Don't use nrand48, its range is [0,2^31) The highest bit will always
* be 0. Use jrand48 to include the highest bit.
*/
return (u32)jrand48(rand_seed);