I found the following bug in the RTL. I thought I would post to save
someone else the grief that I went through finding it. This bug is
present in NT4 and W2k. I have not tested it in XP, but i would be
surprised if it is not there also.
The FsRtl LargeMcb functions don’t utilize the upper 32 bits of the LBN.
They are totally ignored as if they were 0. Here is code that demonstrates
the problem:
LARGE_MCB mcb;
FsRtlInitializeLargeMcb (&mcb, PagedPool);
FsRtlAddLargeMcbEntry (&mcb, 0, 0, 0x1000);
FsRtlAddLargeMcbEntry (&mcb, 0x1000, 0x1111111111111000, 0x1000);
FsRtlAddLargeMcbEntry (&mcb, 0x2000, 0x2222222222222000, 0x1000);
FsRtlAddLargeMcbEntry (&mcb, 0x3000, 0x3333333333333000, 0x1000);
LONGLONG vbo, lbo, size;
for (int i = 0; FsRtlGetNextLargeMcbEntry (&mcb, i, &vbo, &lbo, &size);
i++)
{
DbgPrintLongLong (vbo);
DbgPrintLongLong (lbo);
DbgPrintLongLong (size);
}
The output from this is:
0x0000000000000000
0x0000000000000000
0x0000000000001000
0x0000000000001000
0x0000000011111000
0x0000000000001000
0x0000000000002000
0x0000000022222000
0x0000000000001000
0x0000000000003000
0x0000000033333000
0x0000000000001000
The output should be
0x0000000000000000
0x0000000000000000
0x0000000000001000
0x0000000000001000
0x1111111111111000
0x0000000000001000
0x0000000000002000
0x2222222222222000
0x0000000000001000
0x0000000000003000
0x3333333333333000
0x0000000000001000
As you can see, the upper 32 bits have been chopped off.
Now I need to find an alternative.
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com