[Drbd-dev] DRBD-8: recent regression causing corruption andcrashes
Graham, Simon
Simon.Graham at stratus.com
Sat Aug 12 00:31:01 CEST 2006
That was it -- things are going MUCH better now - trivial patch
attached.
Simon
> -----Original Message-----
> From: drbd-dev-bounces at linbit.com [mailto:drbd-dev-bounces at linbit.com]
> On Behalf Of Graham, Simon
> Sent: Friday, August 11, 2006 5:56 PM
> To: Lars Ellenberg; drbd-dev at linbit.com
> Subject: RE: [Drbd-dev] DRBD-8: recent regression causing corruption
> andcrashes
>
> After a lot of looking at the disassembly of the send-ack routines, I
> think I've found it -- the new routines Philipp added do this:
>
> static int _drbd_send_ack(drbd_dev *mdev, Drbd_Packet_Cmd cmd,
> sector_t sector,
> unsigned int blksize,
> u64 block_id)
> {...}
>
> int drbd_send_ack(drbd_dev *mdev, Drbd_Packet_Cmd cmd, struct
> Tl_epoch_entry *e)
> {
> return _drbd_send_ack(mdev,cmd,
> cpu_to_be64(drbd_ee_get_sector(e)),
> cpu_to_be32(drbd_ee_get_size(e)),
> e->block_id);
> }
>
> Now, if you build on a system that does NOT have CONFIG_LBD defined,
> then the definition of sector_t is 'unsigned long' - i.e. 32-bits, to
> the code above byte swaps the sector number as a u64, then truncates
it
> to 32-bits leaving JUST the byte-swapped upper portion, i.e. zero
> _ALWAYS_.
>
> I just checked my config and CONFIG_LBD is off -- I'm guessing it's
> probably on for the tests you run?
>
> I also think the fix is simply a matter of changing the definition of
> _drbd_send_ack to be 'u64 sector' - I'm going to try this right now!
>
> Simon
>
> _______________________________________________
> drbd-dev mailing list
> drbd-dev at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: drbd-sector.patch
Type: application/octet-stream
Size: 354 bytes
Desc: drbd-sector.patch
Url : http://lists.linbit.com/pipermail/drbd-dev/attachments/20060811/1e03ad33/drbd-sector.obj
More information about the drbd-dev
mailing list