delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
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 |
Message-Id: | <6.2.5.6.2.20120511125624.05cd1ff8@binnacle.cx> |
Date: | Fri, 11 May 2012 12:56:54 -0400 |
To: | cygwin AT cygwin DOT com |
From: | starlight DOT 2012q2 AT binnacle DOT cx |
Subject: | Re: CYGWIN inode over Samba share not constructed from IndexNumber |
Mime-Version: | 1.0 |
Received-SPF: | pass (mx.binnacle.cx: 172.29.87.10 is whitelisted by SPF-milter whitelist entry) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |