[PATCH] fix hard-coded disk header chunk size for persistent snapshot

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

 



Hi,

This patch fixes hard-coded value for the size of a chunk that includes
disk header for persistent snapshot. It should be changed to existing
macro NUM_SNAPSHOT_HDR_CHUNKS instead of using hard-coded value 1.

Thanks,
Tomohiro Kusumi


Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxxxxxxx>
---

diff -aNur linux-2.6.34-rc7.org/drivers/md/dm-snap-persistent.c linux-2.6.34-rc7/drivers/md/dm-snap-persistent.c
--- linux-2.6.34-rc7.org/drivers/md/dm-snap-persistent.c        2010-05-10 10:36:28.000000000 +0900
+++ linux-2.6.34-rc7/drivers/md/dm-snap-persistent.c    2010-05-12 09:21:50.000000000 +0900
@@ -266,7 +266,7 @@
  */
 static chunk_t area_location(struct pstore *ps, chunk_t area)
 {
-       return 1 + ((ps->exceptions_per_area + 1) * area);
+       return NUM_SNAPSHOT_HDR_CHUNKS + ((ps->exceptions_per_area + 1) * area);
 }
 
 /*

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux