Whamcloud - gitweb
LU-15367 llite: add setattr to iotrace 05/52005/5
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 18 Aug 2023 20:20:47 +0000 (16:20 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Feb 2024 07:10:19 +0000 (07:10 +0000)
Add setattr messages to iotrace.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I10a51285d38e1684ce0ddcc7bb2a0cd90579c96c
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52005
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
lustre/llite/llite_lib.c

index 7462971..9cff0f1 100644 (file)
@@ -2258,11 +2258,15 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr,
        /* VFS has locked the inode before calling this */
        ll_set_inode_lock_owner(inode);
 
-       CDEBUG(D_VFSTRACE, "%s: setattr inode "DFID"(%p) from %llu to %llu, "
-              "valid %x, hsm_import %d\n",
-              ll_i2sbi(inode)->ll_fsname, PFID(&lli->lli_fid),
-              inode, i_size_read(inode), attr->ia_size, attr->ia_valid,
-              hsm_import);
+       CDEBUG(D_VFSTRACE|D_IOTRACE,
+              "START file %s:"DFID"(%p) current size %llu, valid attrs %x, mode %x, uid %d, gid %d, new size %llu, atime %lld.%.9ld, mtime %lld.%.9ld, ctime %lld.%.9ld\n",
+              dentry->d_name.name, PFID(ll_inode2fid(inode)), inode,
+              i_size_read(inode), attr->ia_valid, attr->ia_mode,
+              attr->ia_uid.val, attr->ia_gid.val, attr->ia_size,
+              (long long) attr->ia_atime.tv_sec, attr->ia_atime.tv_nsec,
+              (long long) attr->ia_mtime.tv_sec, attr->ia_mtime.tv_nsec,
+              (long long) attr->ia_ctime.tv_sec, attr->ia_ctime.tv_nsec);
+
 
        if (attr->ia_valid & ATTR_SIZE) {
                /* Check new size against VFS/VM file size limit and rlimit */
@@ -2505,6 +2509,15 @@ out:
                                        LPROC_LL_TRUNC : LPROC_LL_SETATTR,
                                   ktime_us_delta(ktime_get(), kstart));
 clear:
+       CDEBUG(D_VFSTRACE|D_IOTRACE,
+              "COMPLETED file %s:"DFID"(%p) current size %llu, valid attrs %x, mode %x, uid %d, gid %d, new size %llu, atime %lld.%.9ld, mtime %lld.%.9ld, ctime %lld.%.9ld\n",
+              dentry->d_name.name, PFID(ll_inode2fid(inode)), inode,
+              i_size_read(inode), attr->ia_valid, attr->ia_mode,
+              attr->ia_uid.val, attr->ia_gid.val, attr->ia_size,
+              (long long) attr->ia_atime.tv_sec, attr->ia_atime.tv_nsec,
+              (long long) attr->ia_mtime.tv_sec, attr->ia_mtime.tv_nsec,
+              (long long) attr->ia_ctime.tv_sec, attr->ia_ctime.tv_nsec);
+
        ll_clear_inode_lock_owner(inode);
 
        RETURN(rc);