Re: [PATCH 09/13] md-cluster: always setup in-memory bitmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






On 04/27/2016 11:24 AM, Shaohua Li wrote:
  static bitmap_counter_t *bitmap_get_counter(struct bitmap_counts *bitmap,
  					    sector_t offset, sector_t *blocks,
-					    int create)
+					    int create, int no_hijack)
  __releases(bitmap->lock)
  __acquires(bitmap->lock)
  {
@@ -1321,7 +1324,7 @@ __acquires(bitmap->lock)
  	sector_t csize;
  	int err;
-	err = bitmap_checkpage(bitmap, page, create);
+	err = bitmap_checkpage(bitmap, page, create, 0);
  	if (bitmap->bp[page].hijacked ||
  	    bitmap->bp[page].map == NULL)
bitmap_get_counter doesn't use the new no_hijack parameter. And you always pass
0 to this function. so looks this change isn't required.

The below part of this patch pass 1 to bitmap_checkpage, so it is needed.

+	/* For cluster raid, need to pre-allocate bitmap */
+	if (mddev_is_clustered(bitmap->mddev)) {
+		unsigned long page;
+		for (page = 0; page < pages; page++) {
+			ret = bitmap_checkpage(&bitmap->counts, page, 1, 1);
I mean bitmap_get_counter(). You add no_hijack parameter, but not use it

Yes, I misunderstood it, thanks for point it out and will remove it.

Regards,
Guoqing
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux