Python's os stat is returning wrong inode value
<p>I'm running CentOS Linux.  </p>

<p>I create a directory as follows using a proprietary filesystem:</p>

<pre><code>$ mkdir fooDir
</code></pre>

<p>First, I check the inode value using "ls -ldi":</p>

<pre><code>$ ls -ldi
total 4
9223372036854783200 drwxrwxrwx 2 root root 4096 Jan  6 20:58 fooDir
</code></pre>

<p>Then, I confirm same inode is being reported by 'stat':</p>

<pre><code>$ stat /fooDir
  File: `/fooDir'
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: 14h/20d Inode: 9223372036854783200  Links: 2
Access: (0777/drwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-01-06 20:58:13.000000000 +0000
Modify: 2016-01-06 20:58:13.000000000 +0000
Change: 2016-01-06 20:58:23.000000000 +0000
</code></pre>

<p>But then I switch over to run in python's interactive prompt and run om.stat against the directory:</p>

<pre><code>$ python
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import os
&gt;&gt;&gt; os.stat("/fooDir")
posix.stat_result(st_mode=16895, st_ino=-9223372036854768416, st_dev=20L, st_nlink=2, st_uid=0, st_gid=0, st_size=4096, st_atime=1452113893, st_mtime=1452113893, st_ctime=1452113903)
&gt;&gt;&gt; 
</code></pre>

<p>The inode value being returned by Python's om.stat does not match the value as reported by stat command. </p>

<p>The filesystem has assigned the inode value of 9223372036854783200 to the directory 'fooDir', however Python's om.stat is returning "-9223372036854768416".  </p>

<p>I can handle that its treating it as a signed value and hence the negative sign, but I'm confused about why its a completely different value.  </p>

<p>Any ideas on what's happening here?  Why Python's os stat returning the wrong inode value? (or wrong according to 'stat' command)</p>