[Gluster-devel] inodes
Emmanuel Dreyfus
manu at netbsd.org
Wed Oct 26 06:03:49 UTC 2011
Emmanuel Dreyfus <manu at netbsd.org> wrote:
> I applied the patch on 3.2.3, updated and restarted my servers, but the
> inode is still not related to the gfid, and I still see mismatches
> between lookup and readdir.
Right, I make progresses. Logs in posix_fill_ino_from_gfid() shows that
the patch you sent me is either incomplete, or incorrect.
With this formula inode gets clobbered at mine when the fifth byte is
added.
for (i = 15; i > (15 - 8); i--) {
temp_ino += buf->ia_gfid[i] << j;
j += 8;
}
A simple cast fixes the problem:
for (i = 15; i > (15 - 8); i--) {
temp_ino += (uint64_t)(buf->ia_gfid[i]) << j;
j += 8;
}
The inode number seen on the client is still wrong, which suggests there
could be the same king of problem higher in the stack. I will
investigate further, but let me know if the problem already has a known
fix.
I assume it works at yours, therefore comparing gcc versions can be
interesting. Here is mine:
# gcc -v
Using built-in specs.
Target: i386--netbsdelf
Configured with: /usr/src/tools/gcc/../../gnu/dist/gcc4/configure
--enable-long-long --disable-multilib --enable-threads --disable-symvers
--build=x86_64-unknown-netbsd4.99.72 --host=i386--netbsdelf
--target=i386--netbsdelf --enable-__cxa_atexit
Thread model: posix
gcc version 4.1.3 20080704 prerelease (NetBSD nb2 20081120)
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu at netbsd.org
More information about the Gluster-devel
mailing list