Re: [PATCH] btrfs: fix a typo in comment of btrfs_balance
On Tue, Jul 03, 2018 at 04:16:29PM +0800, Su Yue wrote: > The typo 'mutexe' should be 'mutex'. > > Signed-off-by: Su Yue > --- > fs/btrfs/volumes.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c > index e034ad9e23b4..d9d87deb1160 100644 > --- a/fs/btrfs/volumes.c > +++ b/fs/btrfs/volumes.c > @@ -3771,7 +3771,7 @@ static inline int validate_convert_profile(struct > btrfs_balance_args *bctl_arg, > } > > /* > - * Should be called with balance mutexe held > + * Should be called with balance mutex held Well, fixing typos makes most sense for things that one would grep for and does not want to miss. Otherwise it's better to fix them at once, like commit 0132761017e012ab4dc8584d679503f2ba26ca86 . -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] btrfs: fix a typo in comment of btrfs_balance
The typo 'mutexe' should be 'mutex'. Signed-off-by: Su Yue --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e034ad9e23b4..d9d87deb1160 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3771,7 +3771,7 @@ static inline int validate_convert_profile(struct btrfs_balance_args *bctl_arg, } /* - * Should be called with balance mutexe held + * Should be called with balance mutex held */ int btrfs_balance(struct btrfs_fs_info *fs_info, struct btrfs_balance_control *bctl, -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] btrfs: Fix calculate typo caused by ambiguous meaning of logic_end
From: Zhao Lei zhao...@cn.fujitsu.com For example, in scrub_raid56_parity(), following lines are used to judge is all data processed: place1: if (key.objectid logic_end) ... place2: if (logic_start = logic_end) ... ... (place2 is typo, is should be , it is copied from other place, where logic_end's meaning is different, long story...) We can fix above typo directly, but the root reason is ambiguous meaning of logic_end in scrub raid56 parity. In other place, XXX_end is pointed to data which is not included, and we need to process segment of [XXX_start, XXX_end). But for scrub raid56 parity, logic_end is pointed to lattest data need to process, and introduced many + 1 and - 1 in code as below: length = sparity-logic_end - sparity-logic_start + 1 logic_end - logic_start + 1 stripe_logical + increment - 1 This patch changed logic_end's meaning to make it in normal understanding in raid56 parity functions and data struct alone with above bugfix. Signed-off-by: Zhao Lei zhao...@cn.fujitsu.com --- fs/btrfs/scrub.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 24720f6..7f56603 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -2702,7 +2702,7 @@ static void scrub_parity_check_and_repair(struct scrub_parity *sparity) sparity-nsectors)) goto out; - length = sparity-logic_end - sparity-logic_start + 1; + length = sparity-logic_end - sparity-logic_start; ret = btrfs_map_sblock(sctx-dev_root-fs_info, WRITE, sparity-logic_start, length, bbio, 0, 1); @@ -2868,7 +2868,7 @@ static noinline_for_stack int scrub_raid56_parity(struct scrub_ctx *sctx, key.type != BTRFS_METADATA_ITEM_KEY) goto next; - if (key.objectid logic_end) { + if (key.objectid = logic_end) { stop_loop = 1; break; } @@ -2957,7 +2957,7 @@ next: out: if (ret 0) scrub_parity_mark_sectors_error(sparity, logic_start, - logic_end - logic_start + 1); + logic_end - logic_start); scrub_parity_put(sparity); scrub_submit(sctx); mutex_lock(sctx-wr_ctx.wr_lock); @@ -3138,7 +3138,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, logical += base; if (ret) { stripe_logical += base; - stripe_end = stripe_logical + increment - 1; + stripe_end = stripe_logical + increment; ret = scrub_raid56_parity(sctx, map, scrub_dev, ppath, stripe_logical, stripe_end); @@ -3284,7 +3284,7 @@ loop: if (ret physical physical_end) { stripe_logical += base; stripe_end = stripe_logical + - increment - 1; + increment; ret = scrub_raid56_parity(sctx, map, scrub_dev, ppath, stripe_logical, -- 1.8.5.1 -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
It should be storing. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/ctree.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 4bab807..f9289db 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -116,7 +116,7 @@ struct btrfs_ordered_sum; #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 -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
On 08/16/2012 10:53 PM, Wang Sheng-Hui wrote: It should be storing. Please cc these typo fixes to triv...@kernel.org. thanks, liubo Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/ctree.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 4bab807..f9289db 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -116,7 +116,7 @@ struct btrfs_ordered_sum; #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 -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
On 2012年08月16日 23:18, Liu Bo wrote: On 08/16/2012 10:53 PM, Wang Sheng-Hui wrote: It should be storing. Please cc these typo fixes to triv...@kernel.org. thanks, liubo OK. Signed-off-by: Wang Sheng-Hui shh...@gmail.com --- fs/btrfs/ctree.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 4bab807..f9289db 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -116,7 +116,7 @@ struct btrfs_ordered_sum; #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 -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html