From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11866 invoked by alias); 11 May 2012 16:58:20 -0000 Received: (qmail 11842 invoked by uid 22791); 11 May 2012 16:58:17 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx.binnacle.cx (HELO mx.binnacle.cx) (74.95.187.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 May 2012 16:58:05 +0000 Received: from CIANNAIT.binnacle.cx (ciannait [172.29.87.10]) by mx.binnacle.cx (envelope-from ) (8.14.4/8.14.4) with ESMTP id q4BGw3KA005476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 11 May 2012 12:58:03 -0400 Message-Id: <6.2.5.6.2.20120511125624.05cd1ff8@binnacle.cx> Date: Fri, 11 May 2012 16:58:00 -0000 To: cygwin@cygwin.com From: starlight.2012q2@binnacle.cx Subject: Re: CYGWIN inode over Samba share not constructed from IndexNumber Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Received-SPF: pass (mx.binnacle.cx: 172.29.87.10 is whitelisted by SPF-milter whitelist entry) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-05/txt/msg00241.txt.bz2 Here is the logic Samba uses for inode determination, per Jermey Allison: 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; } -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple