1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

vfs_fruit: add some debugging of dev/ino

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>
This commit is contained in:
Ralph Boehme 2018-10-17 19:07:11 +02:00 committed by Jeremy Allison
parent 9d8751db64
commit 993c7c4e71

View 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;
}