Whamcloud - gitweb
LU-3963 libcfs: convert lod, mdt, and gss to linux list api
[fs/lustre-release.git] / lustre / mdt / mdt_hsm_cdt_agent.c
index 92e0730..158cced 100644 (file)
@@ -576,15 +576,16 @@ static int mdt_hsm_agent_proc_show(struct seq_file *s, void *v)
                RETURN(0);
 
        ha = list_entry(pos, struct hsm_agent, ha_list);
-       seq_printf(s, "uuid=%s archive#=%d (", ha->ha_uuid.uuid,
-                  ha->ha_archive_cnt);
-       if (ha->ha_archive_cnt == 0)
-               seq_printf(s, "all");
-       else
-               for (i = 0; i < ha->ha_archive_cnt; i++)
-                       seq_printf(s, "%d ", ha->ha_archive_id[i]);
+       seq_printf(s, "uuid=%s archive_id=", ha->ha_uuid.uuid);
+       if (ha->ha_archive_cnt == 0) {
+               seq_printf(s, "ANY");
+       } else {
+               seq_printf(s, "%d", ha->ha_archive_id[0]);
+               for (i = 1; i < ha->ha_archive_cnt; i++)
+                       seq_printf(s, ",%d", ha->ha_archive_id[i]);
+       }
 
-       seq_printf(s, ") r=%d s=%d f=%d\n",
+       seq_printf(s, " requests=[current:%d ok:%d errors:%d]\n",
                   atomic_read(&ha->ha_requests),
                   atomic_read(&ha->ha_success),
                   atomic_read(&ha->ha_failure));
@@ -620,16 +621,12 @@ static int lprocfs_open_hsm_agent(struct inode *inode, struct file *file)
        int              rc;
        ENTRY;
 
-       if (LPROCFS_ENTRY_AND_CHECK(PDE(inode)))
-                       RETURN(-ENOENT);
-
        rc = seq_open(file, &mdt_hsm_agent_proc_ops);
-       if (rc) {
-               LPROCFS_EXIT();
+       if (rc)
                RETURN(rc);
-       }
+
        s = file->private_data;
-       s->private = PDE(inode)->data;
+       s->private = PDE_DATA(inode);
 
        RETURN(rc);
 }