Skip to content

Commit 0a1918d

Browse files
committed
btrfs-progs: fix typos or spelling
Manual pass over all sources to fix things not reported by codespell. Raw spellcheck used. Signed-off-by: David Sterba <dsterba@suse.com>
1 parent a26bfde commit 0a1918d

32 files changed

Lines changed: 55 additions & 56 deletions

btrfs-find-root.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ int btrfs_find_root_search(struct btrfs_fs_info *fs_info,
228228
* Root, chunk, log
229229
* and the following generations:
230230
* Root, chunk, uuid
231-
* Other gen/leven can only be read from its btrfs_tree_root if possible.
231+
* Other gen/level can only be read from its btrfs_tree_root if possible.
232232
*
233233
* Currently we only believe things from superblock.
234234
*/

check/main.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2785,7 +2785,7 @@ static int repair_inode_no_item(struct btrfs_trans_handle *trans,
27852785
type_recovered = 1;
27862786
filetype = BTRFS_FT_DIR;
27872787
} else{
2788-
printf("Can't determine the filetype for inode %llu, assume it is a normal file\n",
2788+
printf("Can't determine the file type for inode %llu, assume it is a normal file\n",
27892789
rec->ino);
27902790
type_recovered = 1;
27912791
filetype = BTRFS_FT_REG_FILE;
@@ -7650,7 +7650,7 @@ static int delete_duplicate_records(struct btrfs_root *root,
76507650

76517651
if (tmp->start + tmp->nr < good->start + good->nr) {
76527652
fprintf(stderr,
7653-
"Ok we have overlapping extents that aren't completely covered by each other, this is going to require more careful thought. The extents are [%llu-%llu] and [%llu-%llu]\n",
7653+
"we have overlapping extents that aren't completely covered by each other, this is going to require more careful thought. The extents are [%llu-%llu] and [%llu-%llu]\n",
76547654
tmp->start, tmp->nr, good->start, good->nr);
76557655
abort();
76567656
}
@@ -8866,7 +8866,7 @@ static int check_devices(struct rb_root *dev_cache,
88668866
if (dev_rec->devid == gfs_info->super_copy->dev_item.devid) {
88678867
/*
88688868
* This dev item mismatch between super and chunk tree
8869-
* is not a criticl problem, and CI kernels do not receive
8869+
* is not a critical problem, and CI kernels do not receive
88708870
* needed backport so they will cause mismatch during RW mounts.
88718871
*
88728872
* SO here we didn't record the mismatch as an error.
@@ -9729,7 +9729,7 @@ static int reinit_extent_tree(struct btrfs_trans_handle *trans, bool pin)
97299729
* extents we find. Not hard but why do it if we don't have to?
97309730
*/
97319731
if (btrfs_fs_incompat(gfs_info, MIXED_GROUPS)) {
9732-
fprintf(stderr, "We don't support re-initing the extent tree "
9732+
fprintf(stderr, "We don't support reinitializing the extent tree "
97339733
"for mixed block groups yet, please notify a btrfs "
97349734
"developer you want to do this so they can add this "
97359735
"functionality.\n");
@@ -10856,7 +10856,7 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
1085610856
goto close_out;
1085710857
}
1085810858
if (ret > 0) {
10859-
error("please finish/cacnel the running replace/balance before running this command");
10859+
error("please finish/cancel the running replace/balance before running this command");
1086010860
ret = -EINVAL;
1086110861
err |= !!ret;
1086210862
goto close_out;

check/mode-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ int insert_inode_item(struct btrfs_trans_handle *trans,
403403

404404
warning("root %llu inode %llu recreating inode item, this may "
405405
"be incomplete, please check permissions and content after "
406-
"the fsck completes.\n",
406+
"'btrfs check' completes.\n",
407407
root->objectid, ino);
408408

409409
return 0;

check/mode-lowmem.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int is_chunk_almost_full(u64 start)
476476

477477
/*
478478
* if the free space in the chunk is less than %10 of total,
479-
* or not not enough for CoW once, we think the chunk is almost full.
479+
* or not not enough for COW once, we think the chunk is almost full.
480480
*/
481481
min_free = max_t(u64, (BTRFS_MAX_LEVEL + 1) * gfs_info->nodesize,
482482
div_factor(total, 1));
@@ -1027,7 +1027,7 @@ static int repair_ternary_lowmem(struct btrfs_root *root, u64 dir_ino, u64 ino,
10271027
err |= DIR_INDEX_MISSING;
10281028
}
10291029
/*
1030-
* stage shall be one of following valild values:
1030+
* stage shall be one of following valid values:
10311031
* 0: Fine, nothing to do.
10321032
* 1: One of three is wrong, so add missing one.
10331033
* 2: Two of three is wrong, so delete existed one.
@@ -1039,7 +1039,7 @@ static int repair_ternary_lowmem(struct btrfs_root *root, u64 dir_ino, u64 ino,
10391039
if (err & (INODE_REF_MISSING))
10401040
stage++;
10411041

1042-
/* stage must be smllarer than 3 */
1042+
/* Stage must be smaller than 3. */
10431043
UASSERT(stage < 3);
10441044

10451045
trans = btrfs_start_transaction(root, 1);
@@ -2525,7 +2525,7 @@ static int repair_inode_nlinks_lowmem(struct btrfs_root *root,
25252525
}
25262526

25272527
btrfs_release_path(path);
2528-
/* if refs is 0, put it into lostfound */
2528+
/* If refs is 0, put it into lost+found. */
25292529
if (ref_count == 0) {
25302530
ret = link_inode_to_lostfound(trans, root, path, ino, namebuf,
25312531
name_len, filetype, &ref_count);
@@ -3148,7 +3148,7 @@ static int check_tree_block_ref(struct btrfs_root *root,
31483148
/*
31493149
* Due to the feature of shared tree blocks, if the upper node
31503150
* is a fs root or shared node, the extent of checked node may
3151-
* not be updated until the next CoW.
3151+
* not be updated until the next COW.
31523152
*/
31533153
if (nrefs)
31543154
strict = should_check_extent_strictly(root, nrefs,
@@ -3291,7 +3291,7 @@ static int check_tree_block_ref(struct btrfs_root *root,
32913291
* If @err contains BACKREF_MISSING then add extent of the
32923292
* file_extent_data_item.
32933293
*
3294-
* Returns error bits after reapir.
3294+
* Returns error bits after repair.
32953295
*/
32963296
static int repair_extent_data_item(struct btrfs_root *root,
32973297
struct btrfs_path *pathp,
@@ -3664,7 +3664,7 @@ static int check_extent_data_item(struct btrfs_root *root,
36643664
}
36653665

36663666
/*
3667-
* Check a block group item with its referener (chunk) and its used space
3667+
* Check a block group item with its referencer (chunk) and its used space
36683668
* with extent/metadata item
36693669
*/
36703670
static int check_block_group_item(struct extent_buffer *eb, int slot)
@@ -4521,7 +4521,7 @@ static int check_extent_item(struct btrfs_path *path)
45214521
if (item_size < sizeof(*ei)) {
45224522
/*
45234523
* COMPAT_EXTENT_TREE_V0 case, but it's already a super
4524-
* old thing when on disk format is still un-determined.
4524+
* old thing when on disk format is still undetermined.
45254525
* No need to care about it anymore
45264526
*/
45274527
error("unsupported COMPAT_EXTENT_TREE_V0 detected");

check/qgroup-verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ static void read_qgroup_status(struct btrfs_fs_info *info, struct extent_buffer
922922
if (ct->simple == 1)
923923
ct->enable_gen = btrfs_qgroup_status_enable_gen(eb, status_item);
924924
/*
925-
* Since qgroup_inconsist/rescan_running is just one bit,
925+
* Since qgroup_inconsistent/rescan_running is just one bit,
926926
* assign value directly won't work.
927927
*/
928928
ct->qgroup_inconsist = !!(flags & BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT);
@@ -1397,7 +1397,7 @@ void report_qgroups(int all)
13971397
*/
13981398
if (counts.qgroup_inconsist && !counts.rescan_running)
13991399
printf(
1400-
"Rescan hasn't been initialzied, a difference in qgroup accounting is expected\n");
1400+
"Rescan hasn't been initialized, a difference in qgroup accounting is expected\n");
14011401
node = rb_first(&counts.root);
14021402
while (node) {
14031403
c = rb_entry(node, struct qgroup_count, rb_node);

cmds/filesystem-du.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct shared_extent {
6161

6262
/*
6363
* extent_tree_* functions are defined in the massive interval tree
64-
* macro below. This serves to illustrate the api in human-readable
64+
* macro below. This serves to illustrate the API in human-readable
6565
* terms.
6666
*/
6767
static void

cmds/filesystem-usage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ static int load_device_info(int fd, struct array *devinfos)
798798
* kernel is not patched to provide fsid from the sysfs).
799799
* And we will skip only if device_is_seed is successful and dev
800800
* is a seed device.
801-
* Ignore any other error including -EACCES, which is seen when
801+
* Ignore any other error including -EACCESS, which is seen when
802802
* a non-root process calls dev_to_fsid(path)->open(path).
803803
*/
804804
ret = device_is_seed(fd, (const char *)dev_info.path, i, fi_args.fsid);

cmds/filesystem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ static int cmd_filesystem_defrag(const struct cmd_struct *cmd,
10601060
bool opt_nocomp = false;
10611061

10621062
/*
1063-
* Kernel 4.19+ supports defragmention of files open read-only,
1063+
* Kernel 4.19+ supports defragmentation of files open read-only,
10641064
* otherwise it's an ETXTBSY error
10651065
*/
10661066
if (get_running_kernel_version() < KERNEL_VERSION(4,19,0))

cmds/inspect-dump-super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static const char * const cmd_inspect_dump_super_usage[] = {
9595
"Deprecated syntax:",
9696
OPTLINE("-s BYTENR", "specify alternate superblock offset, values other than 0, 1, 2 "
9797
"will be interpreted as --bytenr for backward compatibility, "
98-
"option renamed for consistency with other tools (eg. check)"),
98+
"option renamed for consistency with other tools (e.g. check)"),
9999
OPTLINE("-i NUMBER", "specify which copy to print out (values: 0, 1, 2), now moved to --super"),
100100
NULL
101101
};

cmds/inspect-tree-stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static int walk_nodes(struct btrfs_root *root, struct btrfs_path *path,
162162
};
163163
tmp = read_tree_block(root->fs_info, cur_blocknr, &check);
164164
if (!extent_buffer_uptodate(tmp)) {
165-
error("failed to read blocknr %llu",
165+
error("failed to read block %llu",
166166
btrfs_node_blockptr(b, i));
167167
continue;
168168
}

0 commit comments

Comments
 (0)