* [PATCH 0/3] md: trivial changes
@ 2016-03-14 9:01 Guoqing Jiang
2016-03-14 9:01 ` [PATCH 1/3] md/raid1: remove unnecessary BUG_ON Guoqing Jiang
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Guoqing Jiang @ 2016-03-14 9:01 UTC (permalink / raw)
To: shli; +Cc: linux-raid, Guoqing Jiang
Hi,
I found some trivial issues when look into md code, and
all the changes are based on for-next branch of new md
tree.
Thanks,
Guoqing
Guoqing Jiang (3):
md/raid1: remove unnecessary BUG_ON
md/bitmap: remove redundant return in bitmap_checkpage
md: fix typos for stipe
drivers/md/bitmap.c | 1 -
drivers/md/bitmap.h | 4 ++--
drivers/md/raid1.c | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)
--
2.6.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] md/raid1: remove unnecessary BUG_ON
2016-03-14 9:01 [PATCH 0/3] md: trivial changes Guoqing Jiang
@ 2016-03-14 9:01 ` Guoqing Jiang
2016-03-14 9:01 ` [PATCH 2/3] md/bitmap: remove redundant return in bitmap_checkpage Guoqing Jiang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Guoqing Jiang @ 2016-03-14 9:01 UTC (permalink / raw)
To: shli; +Cc: linux-raid, Guoqing Jiang
Since bitmap_start_sync will not return until
sync_blocks is not less than PAGE_SIZE>>9, so
the BUG_ON is not needed anymore.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
drivers/md/raid1.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 4e3843f..d1d5363 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2695,7 +2695,6 @@ static sector_t raid1_sync_request(struct mddev *mddev, sector_t sector_nr,
!conf->fullsync &&
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
break;
- BUG_ON(sync_blocks < (PAGE_SIZE>>9));
if ((len >> 9) > sync_blocks)
len = sync_blocks<<9;
}
--
2.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] md/bitmap: remove redundant return in bitmap_checkpage
2016-03-14 9:01 [PATCH 0/3] md: trivial changes Guoqing Jiang
2016-03-14 9:01 ` [PATCH 1/3] md/raid1: remove unnecessary BUG_ON Guoqing Jiang
@ 2016-03-14 9:01 ` Guoqing Jiang
2016-03-14 9:01 ` [PATCH 3/3] md: fix typos for stipe Guoqing Jiang
2016-03-14 18:16 ` [PATCH 0/3] md: trivial changes Shaohua Li
3 siblings, 0 replies; 5+ messages in thread
From: Guoqing Jiang @ 2016-03-14 9:01 UTC (permalink / raw)
To: shli; +Cc: linux-raid, Guoqing Jiang
The "return 0" is not needed since bitmap_checkpage
will finally return 0 for the case.
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
drivers/md/bitmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index bbe7b64..7df6b4f 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -98,7 +98,6 @@ __acquires(bitmap->lock)
bitmap->bp[page].hijacked) {
/* somebody beat us to getting the page */
kfree(mappage);
- return 0;
} else {
/* no page was in place and we have one, so install it */
--
2.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] md: fix typos for stipe
2016-03-14 9:01 [PATCH 0/3] md: trivial changes Guoqing Jiang
2016-03-14 9:01 ` [PATCH 1/3] md/raid1: remove unnecessary BUG_ON Guoqing Jiang
2016-03-14 9:01 ` [PATCH 2/3] md/bitmap: remove redundant return in bitmap_checkpage Guoqing Jiang
@ 2016-03-14 9:01 ` Guoqing Jiang
2016-03-14 18:16 ` [PATCH 0/3] md: trivial changes Shaohua Li
3 siblings, 0 replies; 5+ messages in thread
From: Guoqing Jiang @ 2016-03-14 9:01 UTC (permalink / raw)
To: shli; +Cc: linux-raid, Guoqing Jiang
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
---
drivers/md/bitmap.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h
index 7d5c3a6..5e3fcd6 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -49,8 +49,8 @@
* When we set a bit, or in the counter (to start a write), if the fields is
* 0, we first set the disk bit and set the counter to 1.
*
- * If the counter is 0, the on-disk bit is clear and the stipe is clean
- * Anything that dirties the stipe pushes the counter to 2 (at least)
+ * If the counter is 0, the on-disk bit is clear and the stripe is clean
+ * Anything that dirties the stripe pushes the counter to 2 (at least)
* and sets the on-disk bit (lazily).
* If a periodic sweep find the counter at 2, it is decremented to 1.
* If the sweep find the counter at 1, the on-disk bit is cleared and the
--
2.6.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] md: trivial changes
2016-03-14 9:01 [PATCH 0/3] md: trivial changes Guoqing Jiang
` (2 preceding siblings ...)
2016-03-14 9:01 ` [PATCH 3/3] md: fix typos for stipe Guoqing Jiang
@ 2016-03-14 18:16 ` Shaohua Li
3 siblings, 0 replies; 5+ messages in thread
From: Shaohua Li @ 2016-03-14 18:16 UTC (permalink / raw)
To: Guoqing Jiang; +Cc: shli, linux-raid
On Mon, Mar 14, 2016 at 05:01:36PM +0800, Guoqing Jiang wrote:
> Hi,
>
> I found some trivial issues when look into md code, and
> all the changes are based on for-next branch of new md
> tree.
Applied all three, thanks!
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-14 18:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 9:01 [PATCH 0/3] md: trivial changes Guoqing Jiang
2016-03-14 9:01 ` [PATCH 1/3] md/raid1: remove unnecessary BUG_ON Guoqing Jiang
2016-03-14 9:01 ` [PATCH 2/3] md/bitmap: remove redundant return in bitmap_checkpage Guoqing Jiang
2016-03-14 9:01 ` [PATCH 3/3] md: fix typos for stipe Guoqing Jiang
2016-03-14 18:16 ` [PATCH 0/3] md: trivial changes Shaohua Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).