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

Bug#582281: Upstream fix



Hello Stephen,

On 03.08.2010 21:43, Stephen Powell wrote:
On Tue, 20 Jul 2010 09:55:58 -0400 (EDT), Peter Oberparleiter wrote:
A fix for this problem has been accepted for inclusion into 2.6.35-rc5. See:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=cffab6bc5511cd6f67a60bf16b62de4267b68c4c

Hello, Peter.  I finally got a chance to take a look at this today.
I can't apply the patch as written to my 2.6.32 source code due to changes
between 2.6.32 and 2.6.35 that will cause the patch to not apply.
However, I did look at the patch.  While I confess to being a complete
novice in the C language, the patch doesn't look quite right to me.
Consider the following excerpt from the patch:

+       if ((info->cu_type == 0x6310&&  info->dev_type == 0x9336) ||
+           (info->cu_type == 0x3880&&  info->dev_type == 0x3370))
+               labelsect = info->label_block;
+       else
+               labelsect = info->label_block * (blocksize>>  9);

This is unexpected.  I expected that last line to be

+               labelsect = info->label_block * (blocksize/512)

Note that >> is the "shift right" operator in C and that shifting an integer 9 positions to the right is the same as a division by 512. I used the >> operator for consistency with the remaining function.

My concern is not for FBA DASD.  I expect your code to execute correctly
for FBA DASD.  My concern is that it will break for CKD DASD.  Are you
sure that this is correct?  Did you test the fix for CKD DASD as well
as FBA DASD?

I tested the code successfully for both FBA and CKD DASD.


Regards,
  Peter

--
Peter Oberparleiter
Linux on System z Development
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294




Reply to: