]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: lustre: llite: record in stats attempted removal of lma/link xattr
authorJames Simmons <jsimmons@infradead.org>
Mon, 16 Apr 2018 04:15:03 +0000 (00:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Apr 2018 12:57:41 +0000 (14:57 +0200)
Keep track of attempted deletions as well as changing of the
lma/link xattrs.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183
Reviewed-on: https://review.whamcloud.com/27240
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/xattr.c

index 4b1e565fd83f384af097c3ddd3f7fa9dcd25a50b..3ab7ae01da392c35daacda6311a9147a2f5c908e 100644 (file)
@@ -296,7 +296,10 @@ static int ll_xattr_set(const struct xattr_handler *handler,
                return ll_setstripe_ea(dentry, (struct lov_user_md *)value,
                                       size);
        } else if (!strcmp(name, "lma") || !strcmp(name, "link")) {
-               ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1);
+               int op_type = flags == XATTR_REPLACE ? LPROC_LL_REMOVEXATTR :
+                                                      LPROC_LL_SETXATTR;
+
+               ll_stats_ops_tally(ll_i2sbi(inode), op_type, 1);
                return 0;
        }