Re: "file not found" under high-contention

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



On Fri, May 11, 2012 at 10:19:48AM -0400, starlight.2012q2@xxxxxxxxxxx wrote:
> At 07:08 AM 5/11/2012 -0700, Jeremy Allison wrote:
> >On Fri, May 11, 2012 at 09:56:52AM -0400, 
> >I need to know what calls are being made on the wire to
> >get these inode numbers back from Samba. Just showing
> >the cygwin output doesn't help, sorry.
> 
> 
> GetFileInformationByHandle
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa364952%28v=vs.85%29.aspx
> 
> 
> BY_HANDLE_FILE_INFORMATION
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa363788%28v=vs.85%29.aspx
> 
> 
> .
> .
> .
> DWORD nNumberOfLinks;
> DWORD nFileIndexHigh;
> DWORD nFileIndexLow;

Ok, here's how we construct the 64-bit return
value for that field:

/********************************************************************
 Create a 64 bit FileIndex. If the file is on the same device as
 the root of the share, just return the 64-bit inode. If it isn't,
 mangle as we used to do.
********************************************************************/

uint64_t get_FileIndex(connection_struct *conn, const SMB_STRUCT_STAT *psbuf)
{
        uint64_t file_index;
        if (conn->base_share_dev == psbuf->st_ex_dev) {
                return (uint64_t)psbuf->st_ex_ino;
        }
        file_index = ((psbuf->st_ex_ino) & UINT32_MAX); /* FileIndexLow */
        file_index |= ((uint64_t)((psbuf->st_ex_dev) & UINT32_MAX)) << 32; /* FileIndexHigh */
        return file_index;
}

Does that help you figure out why it's different for
the different paths ? (I can't see why it is, to be
honest).

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Linux]     [Info Cyrus]     [LARTC]     [Bugtraq]     [Netfilter]     [Internet Dating Forums]     [RAID]     [Yosemite News]     [Photography]

Add to Google Powered by Linux