Bug 765208 (GLUSTER-3476) - inode number is printed as a -ve number in the statedump
Summary: inode number is printed as a -ve number in the statedump
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-3476
Product: GlusterFS
Classification: Community
Component: core
Version: pre-release
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-24 13:03 UTC by Raghavendra Bhat
Modified: 2011-11-17 10:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Raghavendra Bhat 2011-08-24 13:03:58 UTC
In the statedump output inode number is printed as a -ve number.

xlator.mount.fuse.itable.active.1.ino=-3678276918
xlator.mount.fuse.itable.active.1.ia_type=2

[xlator.performance.stat-prefetch.inodectx]
xlator.performance.stat-prefetch.inodectx.inode.gfid=54096897-f2c5-4369-99d4-3a2b8aedb89f
xlator.performance.stat-prefetch.inodectx.inode.ino=-3678276918
xlator.performance.stat-prefetch.inodectx.looked_up=yes
xlator.performance.stat-prefetch.inodectx.lookup_in_progress=no
xlator.performance.stat-prefetch.inodectx.need_unwind=no
xlator.performance.stat-prefetch.inodectx.op_ret=0
xlator.performance.stat-prefetch.inodectx.op_errno=0

[xlator.mount.fuse.itable.active.2]
xlator.mount.fuse.itable.active.2.gfid=57b92fa2-ac22-4aec-81dd-71883da8c6b5
xlator.mount.fuse.itable.active.2.nlookup=1
xlator.mount.fuse.itable.active.2.ref=1
xlator.mount.fuse.itable.active.2.ino=-1081722819
xlator.mount.fuse.itable.active.2.ia_type=2

[xlator.performance.stat-prefetch.inodectx]
xlator.performance.stat-prefetch.inodectx.inode.gfid=57b92fa2-ac22-4aec-81dd-71883da8c6b5
xlator.performance.stat-prefetch.inodectx.inode.ino=-1081722819
xlator.performance.stat-prefetch.inodectx.looked_up=yes
xlator.performance.stat-prefetch.inodectx.lookup_in_progress=no
xlator.performance.stat-prefetch.inodectx.need_unwind=no
xlator.performance.stat-prefetch.inodectx.op_ret=0
xlator.performance.stat-prefetch.inodectx.op_errno=0

[xlator.mount.fuse.itable.active.3]
xlator.mount.fuse.itable.active.3.gfid=b2179834-17b3-4c7c-aa77-5ee249694a66
xlator.mount.fuse.itable.active.3.nlookup=1
xlator.mount.fuse.itable.active.3.ref=1
xlator.mount.fuse.itable.active.3.ino=-203380408
xlator.mount.fuse.itable.active.3.ia_type=2

[xlator.performance.stat-prefetch.inodectx]
xlator.performance.stat-prefetch.inodectx.inode.gfid=b2179834-17b3-4c7c-aa77-5ee249694a66
xlator.performance.stat-prefetch.inodectx.inode.ino=-203380408


Before we used to use the inode number provided by backend only (which did not give -ve numbers). But recently we made changes to get inode number from the gfid only. If the sign bit of the number which was got from the gfid is set, then it is given as the -ve number.

We are assuming that the inode number is not -ve and printing it as %ld. We should use %lu to print it.

              gf_proc_dump_build_key(key, prefix, "ino");
                gf_proc_dump_write(key, "%ld", inode->ino);

Comment 1 Amar Tumballi 2011-09-09 15:27:46 UTC
need to take out 'ino' logging from statedump.

Comment 2 Anand Avati 2011-10-01 09:55:25 UTC
CHANGE: http://review.gluster.com/530 (    Since gfid is used to uniquely identify a inode, in the statedump) merged in master by Vijay Bellur (vijay)

Comment 3 Amar Tumballi 2011-11-17 07:16:01 UTC
no more inode number in codebase


Note You need to log in before you can comment on or make changes to this bug.