scoutfs: output full dirent name when tracing

The dirent name formatting code accidentally copied the calculation for
the length of the name from the xattrs, which are null terminated.  The
durents are not, their length is just the value length minus the dirent
header.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2017-05-16 10:29:59 -07:00
parent d5a2b0a6db
commit 6719733ddc
+1 -2
View File
@@ -156,8 +156,7 @@ int scoutfs_key_str(char *buf, struct scoutfs_key_buf *key)
case SCOUTFS_DIRENT_KEY: {
struct scoutfs_dirent_key *dkey = key->data;
len = (int)key->key_len - offsetof(struct scoutfs_dirent_key,
name[1]);
len = (int)key->key_len - sizeof(struct scoutfs_dirent_key);
if (len <= 0)
break;