Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Tue, Aug 28, 2007 at 05:05:38PM +0200, Leroy van Logchem wrote: > > >Details: > I can use the resource normally, but the drbdtools give errors.. no worries, in this case it is probably harmless. > 17:02:57.440874 open("/dev/sdb1", O_RDWR) = 4 > 17:02:57.440958 fstat(4, {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 17), > ...}) = 0 > 17:02:57.441052 ioctl(4, BLKFLSBUF, 0) = 0 here it works. > 17:02:57.441135 ioctl(4, BLKGETSIZE64, 0x7fff05074828) = 0 > 17:02:57.441222 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 4, 0) > = 0x2aaaaaaac000 > 17:02:57.441624 ioctl(4, BLKGETSIZE64, 0x7fff05074828) = 0 > 17:02:57.441789 mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_SHARED, 4, > 0x1000) = 0x2aaaaaaad000 > 17:02:57.441934 ioctl(4, BLKGETSIZE64, 0x7fff05074828) = 0 > 17:02:57.442087 mmap(NULL, 134180864, PROT_READ|PROT_WRITE, MAP_SHARED, > 4, 0x9000) = 0x2aaaaaabd000 > 17:02:57.504556 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), > ...}) = 0 > 17:02:57.504810 mmap(NULL, 4096, PROT_READ|PROT_WRITE, > MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaab2ab4000 > 17:02:57.504981 write(1, "2B0369060852235C:000000000000000"..., > 802B0369060852235C:0000000000000004:0000000000000000:0000000000000000:1:1:0:0:0:0 > ) = 80 > 17:02:57.505118 munmap(0x2aaaaaabd000, 134180864) = 0 > 17:02:57.506510 munmap(0x2aaaaaaad000, 32768) = 0 > 17:02:57.506644 munmap(0x2aaaaaaac000, 4096) = 0 > 17:02:57.506801 fsync(4) = 0 > 17:02:57.506939 ioctl(4, BLKFLSBUF, 0x1000) = -1 EFAULT (Bad address) we did everything, now we fsync and ioctl BLKFLSBUF just because we are paranoid. and it does not work, because the argp is 0x1000, instead of 0. compare the both BLKFLSBUF ioctls. aparently one may not leave off the explicit NULL, even if the ioctl does not need/use any parameter at all. please try this patch Index: drbdmeta.c =================================================================== --- drbdmeta.c (revision 3023) +++ drbdmeta.c (working copy) @@ -905,7 +905,7 @@ exit(20); } - if (ioctl(cfg->md_fd, BLKFLSBUF) == -1) { + if (ioctl(cfg->md_fd, BLKFLSBUF, NULL) == -1) { PERROR("WARN: ioctl(,BLKFLSBUF,) failed"); } @@ -1509,7 +1509,7 @@ PERROR("fsync() failed"); err = -1; } - if (ioctl(cfg->md_fd, BLKFLSBUF) == -1) { + if (ioctl(cfg->md_fd, BLKFLSBUF, NULL) == -1) { PERROR("ioctl(,BLKFLSBUF,) failed"); err = -1; } -- : Lars Ellenberg Tel +43-1-8178292-0 : : LINBIT Information Technologies GmbH Fax +43-1-8178292-82 : : Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com : __ please use the "List-Reply" function of your email client.