[PATCH][next] bcachefs: Fix a handful of spelling mistakes in various messages

Colin Ian King posted 1 patch 2 years, 3 months ago
fs/bcachefs/alloc_background.c | 2 +-
fs/bcachefs/backpointers.c     | 2 +-
fs/bcachefs/btree_iter.c       | 2 +-
fs/bcachefs/fsck.c             | 2 +-
fs/bcachefs/recovery.c         | 2 +-
fs/bcachefs/snapshot.c         | 2 +-
fs/bcachefs/super-io.c         | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
[PATCH][next] bcachefs: Fix a handful of spelling mistakes in various messages
Posted by Colin Ian King 2 years, 3 months ago
There are several spelling mistakes in error messages. Fix these.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 fs/bcachefs/alloc_background.c | 2 +-
 fs/bcachefs/backpointers.c     | 2 +-
 fs/bcachefs/btree_iter.c       | 2 +-
 fs/bcachefs/fsck.c             | 2 +-
 fs/bcachefs/recovery.c         | 2 +-
 fs/bcachefs/snapshot.c         | 2 +-
 fs/bcachefs/super-io.c         | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
index 540d94c0cceb..dd9f3cbace1e 100644
--- a/fs/bcachefs/alloc_background.c
+++ b/fs/bcachefs/alloc_background.c
@@ -1247,7 +1247,7 @@ static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_tr
 		return ret;
 
 	if (fsck_err_on(!bch2_dev_bucket_exists(c, pos), c,
-			"entry in %s btree for nonexistant dev:bucket %llu:%llu",
+			"entry in %s btree for non-existent dev:bucket %llu:%llu",
 			bch2_btree_ids[iter->btree_id], pos.inode, pos.offset))
 		goto delete;
 
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c
index 8747c5e19f99..bec62e5b21e5 100644
--- a/fs/bcachefs/backpointers.c
+++ b/fs/bcachefs/backpointers.c
@@ -357,7 +357,7 @@ static int bch2_check_btree_backpointer(struct btree_trans *trans, struct btree_
 	int ret = 0;
 
 	if (fsck_err_on(!bch2_dev_exists2(c, k.k->p.inode), c,
-			"backpointer for mising device:\n%s",
+			"backpointer for missing device:\n%s",
 			(bch2_bkey_val_to_text(&buf, c, k), buf.buf))) {
 		ret = bch2_btree_delete_at(trans, bp_iter, 0);
 		goto out;
diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
index 1dbb4d7dfb45..8d089bbdb1e5 100644
--- a/fs/bcachefs/btree_iter.c
+++ b/fs/bcachefs/btree_iter.c
@@ -1495,7 +1495,7 @@ static void bch2_trans_update_max_paths(struct btree_trans *trans)
 static noinline void btree_path_overflow(struct btree_trans *trans)
 {
 	bch2_dump_trans_paths_updates(trans);
-	panic("trans path oveflow\n");
+	panic("trans path overflow\n");
 }
 
 static inline struct btree_path *btree_path_alloc(struct btree_trans *trans,
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index 238caeeaf06c..cc04d5a22f40 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -80,7 +80,7 @@ static int __snapshot_lookup_subvol(struct btree_trans *trans, u32 snapshot,
 	if (!ret)
 		*subvol = le32_to_cpu(s.subvol);
 	else if (bch2_err_matches(ret, ENOENT))
-		bch_err(trans->c, "snapshot %u not fonud", snapshot);
+		bch_err(trans->c, "snapshot %u not found", snapshot);
 	return ret;
 
 }
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 30efb3c90560..a78f5d023ef2 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -561,7 +561,7 @@ static void check_version_upgrade(struct bch_fs *c)
 			if ((recovery_passes & RECOVERY_PASS_ALL_FSCK) == RECOVERY_PASS_ALL_FSCK)
 				prt_str(&buf, "fsck required");
 			else {
-				prt_str(&buf, "running recovery passses: ");
+				prt_str(&buf, "running recovery passes: ");
 				prt_bitflags(&buf, bch2_recovery_passes, recovery_passes);
 			}
 
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
index 9da09911466e..c2af574acb7c 100644
--- a/fs/bcachefs/snapshot.c
+++ b/fs/bcachefs/snapshot.c
@@ -1385,7 +1385,7 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
 	if (!test_bit(BCH_FS_STARTED, &c->flags)) {
 		ret = bch2_fs_read_write_early(c);
 		if (ret) {
-			bch_err(c, "error deleleting dead snapshots: error going rw: %s", bch2_err_str(ret));
+			bch_err(c, "error deleting dead snapshots: error going rw: %s", bch2_err_str(ret));
 			return ret;
 		}
 	}
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
index f01883e785a5..6efd279655ae 100644
--- a/fs/bcachefs/super-io.c
+++ b/fs/bcachefs/super-io.c
@@ -385,7 +385,7 @@ static int bch2_sb_validate(struct bch_sb_handle *disk_sb, struct printbuf *out,
 	}
 
 	if (bch2_is_zero(sb->uuid.b, sizeof(sb->uuid))) {
-		prt_printf(out, "Bad intenal UUID (got zeroes)");
+		prt_printf(out, "Bad internal UUID (got zeroes)");
 		return -BCH_ERR_invalid_sb_uuid;
 	}
 
-- 
2.39.2
Re: [PATCH][next] bcachefs: Fix a handful of spelling mistakes in various messages
Posted by Randy Dunlap 2 years, 3 months ago

On 9/12/23 01:25, Colin Ian King wrote:
> There are several spelling mistakes in error messages. Fix these.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/bcachefs/alloc_background.c | 2 +-
>  fs/bcachefs/backpointers.c     | 2 +-
>  fs/bcachefs/btree_iter.c       | 2 +-
>  fs/bcachefs/fsck.c             | 2 +-
>  fs/bcachefs/recovery.c         | 2 +-
>  fs/bcachefs/snapshot.c         | 2 +-
>  fs/bcachefs/super-io.c         | 2 +-
>  7 files changed, 7 insertions(+), 7 deletions(-)
> 

LGTM. Thanks.

Acked-by: Randy Dunlap <rdunlap@infradead.org>

-- 
~Randy
Re: [PATCH][next] bcachefs: Fix a handful of spelling mistakes in various messages
Posted by Brian Foster 2 years, 3 months ago
On Tue, Sep 12, 2023 at 09:25:27AM +0100, Colin Ian King wrote:
> There are several spelling mistakes in error messages. Fix these.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  fs/bcachefs/alloc_background.c | 2 +-
>  fs/bcachefs/backpointers.c     | 2 +-
>  fs/bcachefs/btree_iter.c       | 2 +-
>  fs/bcachefs/fsck.c             | 2 +-
>  fs/bcachefs/recovery.c         | 2 +-
>  fs/bcachefs/snapshot.c         | 2 +-
>  fs/bcachefs/super-io.c         | 2 +-
>  7 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
> index 540d94c0cceb..dd9f3cbace1e 100644
> --- a/fs/bcachefs/alloc_background.c
> +++ b/fs/bcachefs/alloc_background.c
> @@ -1247,7 +1247,7 @@ static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_tr
>  		return ret;
>  
>  	if (fsck_err_on(!bch2_dev_bucket_exists(c, pos), c,
> -			"entry in %s btree for nonexistant dev:bucket %llu:%llu",
> +			"entry in %s btree for non-existent dev:bucket %llu:%llu",

"nonexistent" doesn't necessarily need to be hyphenated, right?

Not that I really care ;), just curious. I'm sure Kent can massage or
not if desired:

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  			bch2_btree_ids[iter->btree_id], pos.inode, pos.offset))
>  		goto delete;
>  
> diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c
> index 8747c5e19f99..bec62e5b21e5 100644
> --- a/fs/bcachefs/backpointers.c
> +++ b/fs/bcachefs/backpointers.c
> @@ -357,7 +357,7 @@ static int bch2_check_btree_backpointer(struct btree_trans *trans, struct btree_
>  	int ret = 0;
>  
>  	if (fsck_err_on(!bch2_dev_exists2(c, k.k->p.inode), c,
> -			"backpointer for mising device:\n%s",
> +			"backpointer for missing device:\n%s",
>  			(bch2_bkey_val_to_text(&buf, c, k), buf.buf))) {
>  		ret = bch2_btree_delete_at(trans, bp_iter, 0);
>  		goto out;
> diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
> index 1dbb4d7dfb45..8d089bbdb1e5 100644
> --- a/fs/bcachefs/btree_iter.c
> +++ b/fs/bcachefs/btree_iter.c
> @@ -1495,7 +1495,7 @@ static void bch2_trans_update_max_paths(struct btree_trans *trans)
>  static noinline void btree_path_overflow(struct btree_trans *trans)
>  {
>  	bch2_dump_trans_paths_updates(trans);
> -	panic("trans path oveflow\n");
> +	panic("trans path overflow\n");
>  }
>  
>  static inline struct btree_path *btree_path_alloc(struct btree_trans *trans,
> diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
> index 238caeeaf06c..cc04d5a22f40 100644
> --- a/fs/bcachefs/fsck.c
> +++ b/fs/bcachefs/fsck.c
> @@ -80,7 +80,7 @@ static int __snapshot_lookup_subvol(struct btree_trans *trans, u32 snapshot,
>  	if (!ret)
>  		*subvol = le32_to_cpu(s.subvol);
>  	else if (bch2_err_matches(ret, ENOENT))
> -		bch_err(trans->c, "snapshot %u not fonud", snapshot);
> +		bch_err(trans->c, "snapshot %u not found", snapshot);
>  	return ret;
>  
>  }
> diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
> index 30efb3c90560..a78f5d023ef2 100644
> --- a/fs/bcachefs/recovery.c
> +++ b/fs/bcachefs/recovery.c
> @@ -561,7 +561,7 @@ static void check_version_upgrade(struct bch_fs *c)
>  			if ((recovery_passes & RECOVERY_PASS_ALL_FSCK) == RECOVERY_PASS_ALL_FSCK)
>  				prt_str(&buf, "fsck required");
>  			else {
> -				prt_str(&buf, "running recovery passses: ");
> +				prt_str(&buf, "running recovery passes: ");
>  				prt_bitflags(&buf, bch2_recovery_passes, recovery_passes);
>  			}
>  
> diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
> index 9da09911466e..c2af574acb7c 100644
> --- a/fs/bcachefs/snapshot.c
> +++ b/fs/bcachefs/snapshot.c
> @@ -1385,7 +1385,7 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
>  	if (!test_bit(BCH_FS_STARTED, &c->flags)) {
>  		ret = bch2_fs_read_write_early(c);
>  		if (ret) {
> -			bch_err(c, "error deleleting dead snapshots: error going rw: %s", bch2_err_str(ret));
> +			bch_err(c, "error deleting dead snapshots: error going rw: %s", bch2_err_str(ret));
>  			return ret;
>  		}
>  	}
> diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
> index f01883e785a5..6efd279655ae 100644
> --- a/fs/bcachefs/super-io.c
> +++ b/fs/bcachefs/super-io.c
> @@ -385,7 +385,7 @@ static int bch2_sb_validate(struct bch_sb_handle *disk_sb, struct printbuf *out,
>  	}
>  
>  	if (bch2_is_zero(sb->uuid.b, sizeof(sb->uuid))) {
> -		prt_printf(out, "Bad intenal UUID (got zeroes)");
> +		prt_printf(out, "Bad internal UUID (got zeroes)");
>  		return -BCH_ERR_invalid_sb_uuid;
>  	}
>  
> -- 
> 2.39.2
>
Re: [PATCH][next] bcachefs: Fix a handful of spelling mistakes in various messages
Posted by Colin King (gmail) 2 years, 3 months ago
On 12/09/2023 14:51, Brian Foster wrote:
> On Tue, Sep 12, 2023 at 09:25:27AM +0100, Colin Ian King wrote:
>> There are several spelling mistakes in error messages. Fix these.
>>
>> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
>> ---
>>   fs/bcachefs/alloc_background.c | 2 +-
>>   fs/bcachefs/backpointers.c     | 2 +-
>>   fs/bcachefs/btree_iter.c       | 2 +-
>>   fs/bcachefs/fsck.c             | 2 +-
>>   fs/bcachefs/recovery.c         | 2 +-
>>   fs/bcachefs/snapshot.c         | 2 +-
>>   fs/bcachefs/super-io.c         | 2 +-
>>   7 files changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
>> index 540d94c0cceb..dd9f3cbace1e 100644
>> --- a/fs/bcachefs/alloc_background.c
>> +++ b/fs/bcachefs/alloc_background.c
>> @@ -1247,7 +1247,7 @@ static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_tr
>>   		return ret;
>>   
>>   	if (fsck_err_on(!bch2_dev_bucket_exists(c, pos), c,
>> -			"entry in %s btree for nonexistant dev:bucket %llu:%llu",
>> +			"entry in %s btree for non-existent dev:bucket %llu:%llu",
> 
> "nonexistent" doesn't necessarily need to be hyphenated, right?

either way is valid, but some folk prefer the hyphenated version as it's 
apparently easier to scan.

> 
> Not that I really care ;), just curious. I'm sure Kent can massage or
> not if desired:
> 
> Reviewed-by: Brian Foster <bfoster@redhat.com>
> 
>>   			bch2_btree_ids[iter->btree_id], pos.inode, pos.offset))
>>   		goto delete;
>>   
>> diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c
>> index 8747c5e19f99..bec62e5b21e5 100644
>> --- a/fs/bcachefs/backpointers.c
>> +++ b/fs/bcachefs/backpointers.c
>> @@ -357,7 +357,7 @@ static int bch2_check_btree_backpointer(struct btree_trans *trans, struct btree_
>>   	int ret = 0;
>>   
>>   	if (fsck_err_on(!bch2_dev_exists2(c, k.k->p.inode), c,
>> -			"backpointer for mising device:\n%s",
>> +			"backpointer for missing device:\n%s",
>>   			(bch2_bkey_val_to_text(&buf, c, k), buf.buf))) {
>>   		ret = bch2_btree_delete_at(trans, bp_iter, 0);
>>   		goto out;
>> diff --git a/fs/bcachefs/btree_iter.c b/fs/bcachefs/btree_iter.c
>> index 1dbb4d7dfb45..8d089bbdb1e5 100644
>> --- a/fs/bcachefs/btree_iter.c
>> +++ b/fs/bcachefs/btree_iter.c
>> @@ -1495,7 +1495,7 @@ static void bch2_trans_update_max_paths(struct btree_trans *trans)
>>   static noinline void btree_path_overflow(struct btree_trans *trans)
>>   {
>>   	bch2_dump_trans_paths_updates(trans);
>> -	panic("trans path oveflow\n");
>> +	panic("trans path overflow\n");
>>   }
>>   
>>   static inline struct btree_path *btree_path_alloc(struct btree_trans *trans,
>> diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
>> index 238caeeaf06c..cc04d5a22f40 100644
>> --- a/fs/bcachefs/fsck.c
>> +++ b/fs/bcachefs/fsck.c
>> @@ -80,7 +80,7 @@ static int __snapshot_lookup_subvol(struct btree_trans *trans, u32 snapshot,
>>   	if (!ret)
>>   		*subvol = le32_to_cpu(s.subvol);
>>   	else if (bch2_err_matches(ret, ENOENT))
>> -		bch_err(trans->c, "snapshot %u not fonud", snapshot);
>> +		bch_err(trans->c, "snapshot %u not found", snapshot);
>>   	return ret;
>>   
>>   }
>> diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
>> index 30efb3c90560..a78f5d023ef2 100644
>> --- a/fs/bcachefs/recovery.c
>> +++ b/fs/bcachefs/recovery.c
>> @@ -561,7 +561,7 @@ static void check_version_upgrade(struct bch_fs *c)
>>   			if ((recovery_passes & RECOVERY_PASS_ALL_FSCK) == RECOVERY_PASS_ALL_FSCK)
>>   				prt_str(&buf, "fsck required");
>>   			else {
>> -				prt_str(&buf, "running recovery passses: ");
>> +				prt_str(&buf, "running recovery passes: ");
>>   				prt_bitflags(&buf, bch2_recovery_passes, recovery_passes);
>>   			}
>>   
>> diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
>> index 9da09911466e..c2af574acb7c 100644
>> --- a/fs/bcachefs/snapshot.c
>> +++ b/fs/bcachefs/snapshot.c
>> @@ -1385,7 +1385,7 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
>>   	if (!test_bit(BCH_FS_STARTED, &c->flags)) {
>>   		ret = bch2_fs_read_write_early(c);
>>   		if (ret) {
>> -			bch_err(c, "error deleleting dead snapshots: error going rw: %s", bch2_err_str(ret));
>> +			bch_err(c, "error deleting dead snapshots: error going rw: %s", bch2_err_str(ret));
>>   			return ret;
>>   		}
>>   	}
>> diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
>> index f01883e785a5..6efd279655ae 100644
>> --- a/fs/bcachefs/super-io.c
>> +++ b/fs/bcachefs/super-io.c
>> @@ -385,7 +385,7 @@ static int bch2_sb_validate(struct bch_sb_handle *disk_sb, struct printbuf *out,
>>   	}
>>   
>>   	if (bch2_is_zero(sb->uuid.b, sizeof(sb->uuid))) {
>> -		prt_printf(out, "Bad intenal UUID (got zeroes)");
>> +		prt_printf(out, "Bad internal UUID (got zeroes)");
>>   		return -BCH_ERR_invalid_sb_uuid;
>>   	}
>>   
>> -- 
>> 2.39.2
>>
>
Re: [PATCH][next] bcachefs: Fix a handful of spelling mistakes in various messages
Posted by Kent Overstreet 2 years, 3 months ago
On Tue, Sep 12, 2023 at 04:00:23PM +0100, Colin King (gmail) wrote:
> On 12/09/2023 14:51, Brian Foster wrote:
> > On Tue, Sep 12, 2023 at 09:25:27AM +0100, Colin Ian King wrote:
> > > There are several spelling mistakes in error messages. Fix these.
> > > 
> > > Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> > > ---
> > >   fs/bcachefs/alloc_background.c | 2 +-
> > >   fs/bcachefs/backpointers.c     | 2 +-
> > >   fs/bcachefs/btree_iter.c       | 2 +-
> > >   fs/bcachefs/fsck.c             | 2 +-
> > >   fs/bcachefs/recovery.c         | 2 +-
> > >   fs/bcachefs/snapshot.c         | 2 +-
> > >   fs/bcachefs/super-io.c         | 2 +-
> > >   7 files changed, 7 insertions(+), 7 deletions(-)
> > > 
> > > diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c
> > > index 540d94c0cceb..dd9f3cbace1e 100644
> > > --- a/fs/bcachefs/alloc_background.c
> > > +++ b/fs/bcachefs/alloc_background.c
> > > @@ -1247,7 +1247,7 @@ static noinline_for_stack int __bch2_check_discard_freespace_key(struct btree_tr
> > >   		return ret;
> > >   	if (fsck_err_on(!bch2_dev_bucket_exists(c, pos), c,
> > > -			"entry in %s btree for nonexistant dev:bucket %llu:%llu",
> > > +			"entry in %s btree for non-existent dev:bucket %llu:%llu",
> > 
> > "nonexistent" doesn't necessarily need to be hyphenated, right?
> 
> either way is valid, but some folk prefer the hyphenated version as it's
> apparently easier to scan.

Let's stick with the non hyphenated.