[DRBD-cvs] svn commit by lars - r3034 - branches/drbd-8.0/user -
don't try to read from before the start of the device..
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Wed Aug 29 11:05:11 CEST 2007
Author: lars
Date: 2007-08-29 11:05:10 +0200 (Wed, 29 Aug 2007)
New Revision: 3034
Modified:
branches/drbd-8.0/user/drbdmeta_unfinished_rewrite.c
Log:
don't try to read from before the start of the device...
Modified: branches/drbd-8.0/user/drbdmeta_unfinished_rewrite.c
===================================================================
--- branches/drbd-8.0/user/drbdmeta_unfinished_rewrite.c 2007-08-28 20:18:46 UTC (rev 3033)
+++ branches/drbd-8.0/user/drbdmeta_unfinished_rewrite.c 2007-08-29 09:05:10 UTC (rev 3034)
@@ -2028,7 +2028,7 @@
DRBD_MD_INDEX_FLEX_INT, cfg->bd_size);
printf("%lld\n%lld\n%lld\n", cfg->bd_size, fixed_offset, flex_offset);
- if (fixed_offset < (off_t)cfg->bd_size - 4096) {
+ if (0 <= fixed_offset && fixed_offset < (off_t)cfg->bd_size - 4096) {
/* ... v07 fixed-size internal meta data? */
PREAD(cfg->md_fd, on_disk_buffer, 4096, fixed_offset);
More information about the drbd-cvs
mailing list