vfs_fruit: add some debugging of dev/ino
authorRalph Boehme <slow@samba.org>
Wed, 17 Oct 2018 17:07:11 +0000 (19:07 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Oct 2018 20:27:21 +0000 (21:27 +0100)
Aids in debugging dev/ino mismatch failures in open_file_ntcreate.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13646

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_fruit.c

index 70ddffe72c2cf583279ce0600ffde2bbbd1c21ff..45dec2a3f57333043e0b820dbca6d973d62bd83b 100644 (file)
@@ -2374,6 +2374,10 @@ static SMB_INO_T fruit_inode(const SMB_STRUCT_STAT *sbuf, const char *sname)
        SMB_INO_T result;
        char *upper_sname;
 
+       DBG_DEBUG("fruit_inode called for %ju/%ju [%s]\n",
+                 (uintmax_t)sbuf->st_ex_dev,
+                 (uintmax_t)sbuf->st_ex_ino, sname);
+
        upper_sname = talloc_strdup_upper(talloc_tos(), sname);
        SMB_ASSERT(upper_sname != NULL);
 
@@ -2391,8 +2395,8 @@ static SMB_INO_T fruit_inode(const SMB_STRUCT_STAT *sbuf, const char *sname)
        /* Hopefully all the variation is in the lower 4 (or 8) bytes! */
        memcpy(&result, hash, sizeof(result));
 
-       DEBUG(10, ("fruit_inode \"%s\": ino=0x%llu\n",
-                  sname, (unsigned long long)result));
+       DBG_DEBUG("fruit_inode \"%s\": ino=%ju\n",
+                 sname, (uintmax_t)result);
 
        return result;
 }
@@ -4815,6 +4819,11 @@ static int fruit_stat_base(vfs_handle_struct *handle,
                rc = SMB_VFS_NEXT_LSTAT(handle, smb_fname);
        }
        smb_fname->stream_name = tmp_stream_name;
+
+       DBG_DEBUG("fruit_stat_base [%s] dev [%ju] ino [%ju]\n",
+                 smb_fname->base_name,
+                 (uintmax_t)smb_fname->st.st_ex_dev,
+                 (uintmax_t)smb_fname->st.st_ex_ino);
        return rc;
 }