get_object_id
Björn JACKE
bj at sernet.de
Wed Jul 6 21:44:18 GMT 2005
Hi,
while taking a look at a msbackup sniff I found two FSCTLs we do
not support jet. The applied patch at least adds them to ntioctl.h. :)
The one which should be quite easy to implement is the
FSCTL_GET_OBJECT_ID, here used by the backup software to find
hardlinks. The Object ID seems to be nothing more and nothing less
than a combination of inode (file ID) and volume/filesystem ID (there
also seems to be something like a domain ID, all zero here, no idea
what this is). Creating a hardlink on ntfs also results in both files
having the same OID. The file ID is a 64-bit identifier, so that we
can easily just write our inode number into it. 128-bit filesystems
with larger inode numbers are by definition not supported.
Additionally to the file ID also a volume ID is supplied to make the
whole identifier unique for the system.
First of all I wonder, how can we get a unique volume/filesystem ID to
support this feature. Any idea?
Another thing is this: running "fsutil objectid query testbild.bmp" on
a 2k/XP machine gives me this:
Objektkennung : 30e74d1d4deed911abf0000c293e2926
Anfangsvolumekennung : e4ca1fbd9db65949ac234dc315a0f953
Anfangsobjektkennung : 30e74d1d4deed911abf0000c293e2926
Domänenkennung : 00000000000000000000000000000000
In the sniff made between a w2k and an XP machine (see the sniffed
packages attached) the file ID ("Objektkennung") starts with 31e7...
instead of 30e7... A bug in fsutil ?
Bjoern
-------------- next part --------------
Index: include/ntioctl.h
===================================================================
--- include/ntioctl.h (Revision 8059)
+++ include/ntioctl.h (Arbeitskopie)
@@ -42,6 +42,7 @@
#define FSCTL_REQUEST_FILTER_OPLOCK 0x0009008C
#define FSCTL_FIND_FILES_BY_SID 0x0009008F
#define FSCTL_FILESYS_GET_STATISTICS 0x00090090
+#define FSCTL_GET_OBJECT_ID 0x0009009C
#define FSCTL_SET_REPARSE_POINT 0x000900A4
#define FSCTL_GET_REPARSE_POINT 0x000900A8
#define FSCTL_DELETE_REPARSE_POINT 0x000900AC
@@ -53,6 +54,7 @@
#define FSCTL_WRITE_RAW_ENCRYPTED 0x000900DF
#define FSCTL_READ_RAW_ENCRYPTED 0x000900E3
#define FSCTL_SIS_COPYFILE 0x00090100
+#define FSCTL_QUERY_ALLOCATED_RANGES 0x000940CF
#define FSCTL_SIS_LINK_FILES 0x0009C104
#define FSCTL_GET_SHADOW_COPY_DATA 0x00144064 /* KJC -- Shadow Copy information */
@@ -63,7 +65,6 @@
#define FSCTL_GET_NTFS_FILE_RECORD
#define FSCTL_ALLOW_EXTENDED_DASD_IO
#define FSCTL_RECALL_FILE
-#define FSCTL_QUERY_ALLOCATED_RANGES
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_object_id.cap
Type: application/octet-stream
Size: 560 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20050706/1a8d365e/get_object_id.obj
More information about the samba-technical
mailing list