Skip to contentSkip to conversation

btrfs: fix typos and repeated words in comments

PATCH In review Hemanth Selam 2 participants 4 messages Sep 4 Btrfs file system

lore
Share & tools
lore
#0 lore raw

cover btrfs: fix typos and repeated words in comments

This corrects 2 misspellings and repeated words in comments. Each is a separate patch so that any one of them can be dropped without touching the rest.

Nothing outside comments changes. Every touched C file was checked by dropping its comments, replacing each string literal with a placeholder and collapsing whitespace; what remained was identical before and after, so the compiled code cannot differ.

The mistakes were found with scripts/checkpatch.pl against the list in scripts/spelling.txt. The scanning, the edits and the changelogs were produced with Cursor running the claude-opus-5 model, from a request to find and fix spelling mistakes across the tree, and every correction was then re-checked by the comparison described above. Words that name an identifier were left alone deliberately, even when they read as typos, because correcting the prose would make the comment disagree with the code it describes.

Tested by building x86_64 defconfig at v7.3-rc1-269-gbc35965f6940, which is clean. Nothing else was built, so any patch touching code that x86_64 defconfig does not compile has been read but not compiled.

Hemanth Selam (2):
btrfs: fix typos in comments
btrfs: fix repeated words in comments

 fs/btrfs/block-group.h          | 2 +-
 fs/btrfs/raid56.c               | 4 ++--
 fs/btrfs/send.c                 | 2 +-
 include/uapi/linux/btrfs_tree.h | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH 1/2 btrfs: fix typos in comments

Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.

Assisted-by Cursor:claude-opus-5
---
 fs/btrfs/block-group.h          | 2 +-
 fs/btrfs/send.c                 | 2 +-
 include/uapi/linux/btrfs_tree.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/block-group.h +1 -1
index 69d56864d4ba..b349f94cf929 100644
@@ -135,7 +135,7 @@ struct btrfs_block_group {
 	u64 global_root_id;
 	u64 remap_bytes;
 	u32 identity_remap_count;
-	/* The last commited identity_remap_count value of this block group. */
+	/* The last committed identity_remap_count value of this block group. */
 	u32 last_identity_remap_count;
 	/*
 	 * The last committed used bytes of this block group, if the above @used
fs/btrfs/send.c +1 -1
index dca3570168c7..dd90da2859b8 100644
@@ -7016,7 +7016,7 @@ static int changed_extent(struct send_ctx *sctx,
 	 * get modified or replaced with a new one). Note that deduplication
 	 * updates the inode item, but it only changes the iversion (sequence
 	 * field in the inode item) of the inode, so if a file is deduplicated
-	 * the same amount of times in both the parent and send snapshots, its
+	 * the same number of times in both the parent and send snapshots, its
 	 * iversion becomes the same in both snapshots, whence the inode item is
 	 * the same on both snapshots.
 	 */
include/uapi/linux/btrfs_tree.h +1 -1
index cc3b9f7dccaf..127aabd88639 100644
@@ -243,7 +243,7 @@
 #define BTRFS_EXTENT_DATA_REF_KEY	178
 
 /*
- * Obsolete key. Defintion removed in 6.6, value may be reused in the future.
+ * Obsolete key. Definition removed in 6.6, value may be reused in the future.
  *
  * #define BTRFS_EXTENT_REF_V0_KEY	180
  */
Signature · 1 line
2.48.1
#2 lore raw

Re: [PATCH 1/2] btrfs: fix typos in comments

Quoted 6 lines · Hemanth Selam

Fix typos in comments, reported by scripts/checkpatch.pl using the misspelling list in scripts/spelling.txt. Only touches comments, no code changes.

Assisted-by Cursor:claude-opus-5

Thanks, despite all efforts the typos always make it back. Please merge the two patches together as they're fixing only comments.

I'm not sure which branch you've used, the most recent is
https://github.com/btrfs/linux for-next

I did a quick check using codespell and it found a few more typos, please include them in v2 too.

block-group.h:138: commited ==> committed extent-io-tree.c:754: Temporarilly ==> Temporarily fs.c:82: Checksume ==> Checksum raid56.c:991: coresponding ==> corresponding raid56.c:2635: caclulated ==> calculated transaction.h:291: wheather ==> weather, whether tree-checker.c:231: cannnot ==> cannot

#3 lore raw

PATCH 2/2 btrfs: fix repeated words in comments

In reply to Hemanth Selam

Drop words accidentally written twice, reported by checkpatch.pl as a possible repeated word. Only touches comments, no code changes.

Assisted-by Cursor:claude-opus-5
---
 fs/btrfs/raid56.c               | 4 ++--
 include/uapi/linux/btrfs_tree.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
fs/btrfs/raid56.c +2 -2
index 1ee52a9dcee3..577412b7886f 100644
@@ -953,7 +953,7 @@ static void rbio_orig_end_io(struct btrfs_raid_bio *rbio, blk_status_t status)
 
 	/*
 	 * Clear the data bitmap, as the rbio may be cached for later usage.
-	 * do this before before unlock_stripe() so there will be no new bio
+	 * do this before unlock_stripe() so there will be no new bio
 	 * for this bio.
 	 */
 	bitmap_clear(&rbio->dbitmap, 0, rbio->stripe_nsectors);
@@ -1451,7 +1451,7 @@ static int rmw_assemble_write_bios(struct btrfs_raid_bio *rbio,
 	ASSERT(bitmap_weight(&rbio->dbitmap, rbio->stripe_nsectors));
 
 	/*
-	 * Reset errors, as we may have errors inherited from from degraded
+	 * Reset errors, as we may have errors inherited from degraded
 	 * write.
 	 */
 	bitmap_clear(rbio->error_bitmap, 0, rbio->nr_sectors);
include/uapi/linux/btrfs_tree.h +1 -1
index 127aabd88639..81883beb3b7d 100644
@@ -230,7 +230,7 @@
  *
  * Stored as an inline ref rather to avoid wasting space on a separate item on
  * top of the existing extent item. However, unlike the other inline refs,
- * there is one one owner ref per extent rather than one per extent.
+ * there is one owner ref per extent rather than one per extent.
  *
  * Because of this, it goes at the front of the list of inline refs, and thus
  * must have a lower type value than any other inline ref type (to satisfy the
Signature · 1 line
2.48.1