Whamcloud - gitweb
fuse2fs: log names of xattrs being set/get/removed
authorDarrick J. Wong <djwong@kernel.org>
Thu, 24 Apr 2025 21:42:05 +0000 (14:42 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 21 May 2025 14:25:07 +0000 (10:25 -0400)
Actually record the names of the xattrs being modified to make it easier
to debug fstests failures.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/174553065016.1160461.12942341433377716292.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index 28fabb8..1f24266 100644 (file)
@@ -2271,7 +2271,7 @@ static int op_getxattr(const char *path, const char *key, char *value,
                ret = translate_error(fs, 0, err);
                goto out;
        }
-       dbg_printf(ff, "%s: ino=%d\n", __func__, ino);
+       dbg_printf(ff, "%s: ino=%d name=%s\n", __func__, ino, key);
 
        ret = check_inum_access(fs, ino, R_OK);
        if (ret)
@@ -2438,7 +2438,7 @@ static int op_setxattr(const char *path EXT2FS_ATTR((unused)),
                ret = translate_error(fs, 0, err);
                goto out;
        }
-       dbg_printf(ff, "%s: ino=%d\n", __func__, ino);
+       dbg_printf(ff, "%s: ino=%d name=%s\n", __func__, ino, key);
 
        ret = check_inum_access(fs, ino, W_OK);
        if (ret == -EACCES) {
@@ -2504,7 +2504,7 @@ static int op_removexattr(const char *path, const char *key)
                ret = translate_error(fs, 0, err);
                goto out;
        }
-       dbg_printf(ff, "%s: ino=%d\n", __func__, ino);
+       dbg_printf(ff, "%s: ino=%d name=%s\n", __func__, ino, key);
 
        ret = check_inum_access(fs, ino, W_OK);
        if (ret)