Skip to content

Commit 0132761

Browse files
sten0kdave
authored andcommitted
btrfs: fix string and comment grammatical issues and typos
Signed-off-by: Nicholas D Steeves <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 210aa27 commit 0132761

33 files changed

+106
-105
lines changed

fs/btrfs/backref.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ static int inode_to_path(u64 inum, u32 name_len, unsigned long name_off,
19391939
* from ipath->fspath->val[i].
19401940
* when it returns, there are ipath->fspath->elem_cnt number of paths available
19411941
* in ipath->fspath->val[]. when the allocated space wasn't sufficient, the
1942-
* number of missed paths in recored in ipath->fspath->elem_missed, otherwise,
1942+
* number of missed paths is recorded in ipath->fspath->elem_missed, otherwise,
19431943
* it's zero. ipath->fspath->bytes_missing holds the number of bytes that would
19441944
* have been needed to return all paths.
19451945
*/

fs/btrfs/btrfs_inode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ struct btrfs_dio_private {
303303
struct bio *dio_bio;
304304

305305
/*
306-
* The original bio may be splited to several sub-bios, this is
306+
* The original bio may be split to several sub-bios, this is
307307
* done during endio of sub-bios
308308
*/
309309
int (*subio_endio)(struct inode *, struct btrfs_io_bio *, int);

fs/btrfs/check-integrity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@ static void btrfsic_process_written_block(struct btrfsic_dev_state *dev_state,
19391939
/*
19401940
* Clear all references of this block. Do not free
19411941
* the block itself even if is not referenced anymore
1942-
* because it still carries valueable information
1942+
* because it still carries valuable information
19431943
* like whether it was ever written and IO completed.
19441944
*/
19451945
list_for_each_entry_safe(l, tmp, &block->ref_to_list,

fs/btrfs/ctree.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ struct extent_buffer *btrfs_root_node(struct btrfs_root *root)
156156

157157
/*
158158
* RCU really hurts here, we could free up the root node because
159-
* it was cow'ed but we may not get the new root node yet so do
159+
* it was COWed but we may not get the new root node yet so do
160160
* the inc_not_zero dance and if it doesn't work then
161161
* synchronize_rcu and try again.
162162
*/
@@ -955,7 +955,7 @@ int btrfs_block_can_be_shared(struct btrfs_root *root,
955955
struct extent_buffer *buf)
956956
{
957957
/*
958-
* Tree blocks not in refernece counted trees and tree roots
958+
* Tree blocks not in reference counted trees and tree roots
959959
* are never shared. If a block was allocated after the last
960960
* snapshot and the block was not allocated by tree relocation,
961961
* we know the block is not shared.
@@ -1270,7 +1270,7 @@ __tree_mod_log_oldest_root(struct btrfs_fs_info *fs_info,
12701270

12711271
/*
12721272
* tm is a pointer to the first operation to rewind within eb. then, all
1273-
* previous operations will be rewinded (until we reach something older than
1273+
* previous operations will be rewound (until we reach something older than
12741274
* time_seq).
12751275
*/
12761276
static void
@@ -1345,7 +1345,7 @@ __tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct extent_buffer *eb,
13451345
}
13461346

13471347
/*
1348-
* Called with eb read locked. If the buffer cannot be rewinded, the same buffer
1348+
* Called with eb read locked. If the buffer cannot be rewound, the same buffer
13491349
* is returned. If rewind operations happen, a fresh buffer is returned. The
13501350
* returned buffer is always read-locked. If the returned buffer is not the
13511351
* input buffer, the lock on the input buffer is released and the input buffer
@@ -1516,7 +1516,7 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
15161516
* 3) the root is not forced COW.
15171517
*
15181518
* What is forced COW:
1519-
* when we create snapshot during commiting the transaction,
1519+
* when we create snapshot during committing the transaction,
15201520
* after we've finished coping src root, we must COW the shared
15211521
* block to ensure the metadata consistency.
15221522
*/
@@ -1531,7 +1531,7 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
15311531

15321532
/*
15331533
* cows a single block, see __btrfs_cow_block for the real work.
1534-
* This version of it has extra checks so that a block isn't cow'd more than
1534+
* This version of it has extra checks so that a block isn't COWed more than
15351535
* once per transaction, as long as it hasn't been written yet
15361536
*/
15371537
noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
@@ -2986,7 +2986,7 @@ int btrfs_search_old_slot(struct btrfs_root *root, struct btrfs_key *key,
29862986
btrfs_unlock_up_safe(p, level + 1);
29872987

29882988
/*
2989-
* Since we can unwind eb's we want to do a real search every
2989+
* Since we can unwind ebs we want to do a real search every
29902990
* time.
29912991
*/
29922992
prev_cmp = -1;

fs/btrfs/ctree.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static const int btrfs_csum_sizes[] = { 4 };
186186
/* four bytes for CRC32 */
187187
#define BTRFS_EMPTY_DIR_SIZE 0
188188

189-
/* spefic to btrfs_map_block(), therefore not in include/linux/blk_types.h */
189+
/* specific to btrfs_map_block(), therefore not in include/linux/blk_types.h */
190190
#define REQ_GET_READ_MIRRORS (1 << 30)
191191

192192
#define BTRFS_FT_UNKNOWN 0
@@ -1221,7 +1221,7 @@ struct btrfs_space_info {
12211221
* bytes_pinned does not reflect the bytes that will be pinned once the
12221222
* delayed refs are flushed, so this counter is inc'ed every time we
12231223
* call btrfs_free_extent so it is a realtime count of what will be
1224-
* freed once the transaction is committed. It will be zero'ed every
1224+
* freed once the transaction is committed. It will be zeroed every
12251225
* time the transaction commits.
12261226
*/
12271227
struct percpu_counter total_bytes_pinned;
@@ -2392,7 +2392,7 @@ static inline void btrfs_init_map_token (struct btrfs_map_token *token)
23922392
token->kaddr = NULL;
23932393
}
23942394

2395-
/* some macros to generate set/get funcs for the struct fields. This
2395+
/* some macros to generate set/get functions for the struct fields. This
23962396
* assumes there is a lefoo_to_cpu for every type, so lets make a simple
23972397
* one for u8:
23982398
*/

fs/btrfs/delayed-ref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ struct btrfs_delayed_ref_root {
188188

189189
/*
190190
* To make qgroup to skip given root.
191-
* This is for snapshot, as btrfs_qgroup_inherit() will manully
191+
* This is for snapshot, as btrfs_qgroup_inherit() will manually
192192
* modify counters for snapshot and its source, so we should skip
193193
* the snapshot in new_root/old_roots or it will get calculated twice
194194
*/

fs/btrfs/dev-replace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
441441
}
442442

443443
/*
444-
* blocked until all flighting bios are finished.
444+
* blocked until all in-flight bios operations are finished.
445445
*/
446446
static void btrfs_rm_dev_replace_blocked(struct btrfs_fs_info *fs_info)
447447
{

fs/btrfs/disk-io.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
384384
/*
385385
* Things reading via commit roots that don't have normal protection,
386386
* like send, can have a really old block in cache that may point at a
387-
* block that has been free'd and re-allocated. So don't clear uptodate
387+
* block that has been freed and re-allocated. So don't clear uptodate
388388
* if we find an eb that is under IO (dirty/writeback) because we could
389389
* end up reading in the stale data and then writing it back out and
390390
* making everybody very sad.
@@ -418,7 +418,7 @@ static int btrfs_check_super_csum(char *raw_disk_sb)
418418
/*
419419
* The super_block structure does not span the whole
420420
* BTRFS_SUPER_INFO_SIZE range, we expect that the unused space
421-
* is filled with zeros and is included in the checkum.
421+
* is filled with zeros and is included in the checksum.
422422
*/
423423
crc = btrfs_csum_data(raw_disk_sb + BTRFS_CSUM_SIZE,
424424
crc, BTRFS_SUPER_INFO_SIZE - BTRFS_CSUM_SIZE);
@@ -600,7 +600,7 @@ static noinline int check_leaf(struct btrfs_root *root,
600600

601601
/*
602602
* Check to make sure that we don't point outside of the leaf,
603-
* just incase all the items are consistent to eachother, but
603+
* just in case all the items are consistent to each other, but
604604
* all point outside of the leaf.
605605
*/
606606
if (btrfs_item_end_nr(leaf, slot) >
@@ -3017,7 +3017,7 @@ int open_ctree(struct super_block *sb,
30173017
}
30183018

30193019
/*
3020-
* Mount does not set all options immediatelly, we can do it now and do
3020+
* Mount does not set all options immediately, we can do it now and do
30213021
* not have to wait for transaction commit
30223022
*/
30233023
btrfs_apply_pending_changes(fs_info);
@@ -3245,7 +3245,7 @@ static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate)
32453245
btrfs_warn_rl_in_rcu(device->dev_root->fs_info,
32463246
"lost page write due to IO error on %s",
32473247
rcu_str_deref(device->name));
3248-
/* note, we dont' set_buffer_write_io_error because we have
3248+
/* note, we don't set_buffer_write_io_error because we have
32493249
* our own ways of dealing with the IO errors
32503250
*/
32513251
clear_buffer_uptodate(bh);

fs/btrfs/extent-tree.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
980980
* event that tree block loses its owner tree's reference and do the
981981
* back refs conversion.
982982
*
983-
* When a tree block is COW'd through a tree, there are four cases:
983+
* When a tree block is COWed through a tree, there are four cases:
984984
*
985985
* The reference count of the block is one and the tree is the block's
986986
* owner tree. Nothing to do in this case.
@@ -2595,7 +2595,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
25952595
}
25962596

25972597
/*
2598-
* Need to drop our head ref lock and re-aqcuire the
2598+
* Need to drop our head ref lock and re-acquire the
25992599
* delayed ref lock and then re-check to make sure
26002600
* nobody got added.
26012601
*/
@@ -2747,7 +2747,7 @@ static inline u64 heads_to_leaves(struct btrfs_root *root, u64 heads)
27472747

27482748
/*
27492749
* We don't ever fill up leaves all the way so multiply by 2 just to be
2750-
* closer to what we're really going to want to ouse.
2750+
* closer to what we're really going to want to use.
27512751
*/
27522752
return div_u64(num_bytes, BTRFS_LEAF_DATA_SIZE(root));
27532753
}
@@ -2851,7 +2851,7 @@ static void delayed_ref_async_start(struct btrfs_work *work)
28512851
}
28522852

28532853
/*
2854-
* trans->sync means that when we call end_transaciton, we won't
2854+
* trans->sync means that when we call end_transaction, we won't
28552855
* wait on delayed refs
28562856
*/
28572857
trans->sync = true;
@@ -4243,7 +4243,7 @@ void btrfs_free_reserved_data_space_noquota(struct inode *inode, u64 start,
42434243
* Called if we need to clear a data reservation for this inode
42444244
* Normally in a error case.
42454245
*
4246-
* This one will handle the per-indoe data rsv map for accurate reserved
4246+
* This one will handle the per-inode data rsv map for accurate reserved
42474247
* space framework.
42484248
*/
42494249
void btrfs_free_reserved_data_space(struct inode *inode, u64 start, u64 len)
@@ -4911,7 +4911,7 @@ void btrfs_init_async_reclaim_work(struct work_struct *work)
49114911
* @orig_bytes - the number of bytes we want
49124912
* @flush - whether or not we can flush to make our reservation
49134913
*
4914-
* This will reserve orgi_bytes number of bytes from the space info associated
4914+
* This will reserve orig_bytes number of bytes from the space info associated
49154915
* with the block_rsv. If there is not enough space it will make an attempt to
49164916
* flush out space to make room. It will do this by flushing delalloc if
49174917
* possible or committing the transaction. If flush is 0 then no attempts to
@@ -5516,7 +5516,7 @@ void btrfs_orphan_release_metadata(struct inode *inode)
55165516
* common file/directory operations, they change two fs/file trees
55175517
* and root tree, the number of items that the qgroup reserves is
55185518
* different with the free space reservation. So we can not use
5519-
* the space reseravtion mechanism in start_transaction().
5519+
* the space reservation mechanism in start_transaction().
55205520
*/
55215521
int btrfs_subvolume_reserve_metadata(struct btrfs_root *root,
55225522
struct btrfs_block_rsv *rsv,
@@ -5565,7 +5565,7 @@ void btrfs_subvolume_release_metadata(struct btrfs_root *root,
55655565
/**
55665566
* drop_outstanding_extent - drop an outstanding extent
55675567
* @inode: the inode we're dropping the extent for
5568-
* @num_bytes: the number of bytes we're relaseing.
5568+
* @num_bytes: the number of bytes we're releasing.
55695569
*
55705570
* This is called when we are freeing up an outstanding extent, either called
55715571
* after an error or after an extent is written. This will return the number of
@@ -5591,7 +5591,7 @@ static unsigned drop_outstanding_extent(struct inode *inode, u64 num_bytes)
55915591
drop_inode_space = 1;
55925592

55935593
/*
5594-
* If we have more or the same amount of outsanding extents than we have
5594+
* If we have more or the same amount of outstanding extents than we have
55955595
* reserved then we need to leave the reserved extents count alone.
55965596
*/
55975597
if (BTRFS_I(inode)->outstanding_extents >=
@@ -5605,8 +5605,8 @@ static unsigned drop_outstanding_extent(struct inode *inode, u64 num_bytes)
56055605
}
56065606

56075607
/**
5608-
* calc_csum_metadata_size - return the amount of metada space that must be
5609-
* reserved/free'd for the given bytes.
5608+
* calc_csum_metadata_size - return the amount of metadata space that must be
5609+
* reserved/freed for the given bytes.
56105610
* @inode: the inode we're manipulating
56115611
* @num_bytes: the number of bytes in question
56125612
* @reserve: 1 if we are reserving space, 0 if we are freeing space
@@ -5758,7 +5758,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
57585758

57595759
/*
57605760
* This is tricky, but first we need to figure out how much we
5761-
* free'd from any free-ers that occurred during this
5761+
* freed from any free-ers that occurred during this
57625762
* reservation, so we reset ->csum_bytes to the csum_bytes
57635763
* before we dropped our lock, and then call the free for the
57645764
* number of bytes that were freed while we were trying our
@@ -5780,7 +5780,7 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
57805780

57815781
/*
57825782
* Now reset ->csum_bytes to what it should be. If bytes is
5783-
* more than to_free then we would have free'd more space had we
5783+
* more than to_free then we would have freed more space had we
57845784
* not had an artificially high ->csum_bytes, so we need to free
57855785
* the remainder. If bytes is the same or less then we don't
57865786
* need to do anything, the other free-ers did the correct
@@ -7471,7 +7471,7 @@ static noinline int find_free_extent(struct btrfs_root *orig_root,
74717471
if (loop == LOOP_CACHING_NOWAIT) {
74727472
/*
74737473
* We want to skip the LOOP_CACHING_WAIT step if we
7474-
* don't have any unached bgs and we've alrelady done a
7474+
* don't have any uncached bgs and we've already done a
74757475
* full search through.
74767476
*/
74777477
if (orig_have_caching_bg || !full_search)
@@ -7873,7 +7873,7 @@ int btrfs_alloc_logged_file_extent(struct btrfs_trans_handle *trans,
78737873

78747874
/*
78757875
* Mixed block groups will exclude before processing the log so we only
7876-
* need to do the exlude dance if this fs isn't mixed.
7876+
* need to do the exclude dance if this fs isn't mixed.
78777877
*/
78787878
if (!btrfs_fs_incompat(root->fs_info, MIXED_GROUPS)) {
78797879
ret = __exclude_logged_extent(root, ins->objectid, ins->offset);
@@ -9317,7 +9317,7 @@ u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo)
93179317
u64 free_bytes = 0;
93189318
int factor;
93199319

9320-
/* It's df, we don't care if it's racey */
9320+
/* It's df, we don't care if it's racy */
93219321
if (list_empty(&sinfo->ro_bgs))
93229322
return 0;
93239323

fs/btrfs/extent_io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4591,7 +4591,7 @@ static void btrfs_release_extent_buffer_page(struct extent_buffer *eb)
45914591
if (mapped)
45924592
spin_unlock(&page->mapping->private_lock);
45934593

4594-
/* One for when we alloced the page */
4594+
/* One for when we allocated the page */
45954595
put_page(page);
45964596
} while (index != 0);
45974597
}
@@ -5751,7 +5751,7 @@ int try_release_extent_buffer(struct page *page)
57515751
struct extent_buffer *eb;
57525752

57535753
/*
5754-
* We need to make sure noboody is attaching this page to an eb right
5754+
* We need to make sure nobody is attaching this page to an eb right
57555755
* now.
57565756
*/
57575757
spin_lock(&page->mapping->private_lock);

fs/btrfs/extent_map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct extent_map *alloc_extent_map(void)
6262

6363
/**
6464
* free_extent_map - drop reference count of an extent_map
65-
* @em: extent map being releasead
65+
* @em: extent map being released
6666
*
6767
* Drops the reference out on @em by one and free the structure
6868
* if the reference count hits zero.

fs/btrfs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
20242024
BTRFS_I(inode)->last_trans
20252025
<= root->fs_info->last_trans_committed)) {
20262026
/*
2027-
* We'v had everything committed since the last time we were
2027+
* We've had everything committed since the last time we were
20282028
* modified so clear this flag in case it was set for whatever
20292029
* reason, it's no longer relevant.
20302030
*/
@@ -2372,7 +2372,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len)
23722372

23732373
/* Check the aligned pages after the first unaligned page,
23742374
* if offset != orig_start, which means the first unaligned page
2375-
* including serveral following pages are already in holes,
2375+
* including several following pages are already in holes,
23762376
* the extra check can be skipped */
23772377
if (offset == orig_start) {
23782378
/* after truncate page, check hole again */

fs/btrfs/free-space-cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,7 @@ static bool use_bitmap(struct btrfs_free_space_ctl *ctl,
19831983
/*
19841984
* If this block group has some small extents we don't want to
19851985
* use up all of our free slots in the cache with them, we want
1986-
* to reserve them to larger extents, however if we have plent
1986+
* to reserve them to larger extents, however if we have plenty
19871987
* of cache left then go ahead an dadd them, no sense in adding
19881988
* the overhead of a bitmap if we don't have to.
19891989
*/

fs/btrfs/free-space-cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int btrfs_return_cluster_to_free_space(
123123
int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group,
124124
u64 *trimmed, u64 start, u64 end, u64 minlen);
125125

126-
/* Support functions for runnint our sanity tests */
126+
/* Support functions for running our sanity tests */
127127
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
128128
int test_add_free_space_entry(struct btrfs_block_group_cache *cache,
129129
u64 offset, u64 bytes, bool bitmap);

0 commit comments

Comments
 (0)