Whamcloud - gitweb
- fixes in fld procfs;
authoryury <yury>
Sun, 25 Jun 2006 14:29:53 +0000 (14:29 +0000)
committeryury <yury>
Sun, 25 Jun 2006 14:29:53 +0000 (14:29 +0000)
- added server procfs entry to client's seq-mgrs

lustre/fid/lproc_fid.c
lustre/fld/fld_request.c
lustre/include/lustre_fld.h

index 4c52797..9b30ac8 100644 (file)
@@ -378,6 +378,21 @@ seq_proc_read_seq_width(char *page, char **start, off_t off,
        RETURN(rc);
 }
 
+static int
+seq_proc_read_server(char *page, char **start, off_t off,
+                     int count, int *eof, void *data)
+{
+        struct lu_client_seq *seq = (struct lu_client_seq *)data;
+        struct client_obd *cli = &seq->seq_exp->exp_obd->u.cli;
+       int rc;
+       ENTRY;
+
+        LASSERT(seq != NULL);
+        rc = snprintf(page, count, "%s\n",
+                      cli->cl_target_uuid.uuid);
+       RETURN(rc);
+}
+
 struct lprocfs_vars seq_server_proc_list[] = {
        { "space",       seq_proc_read_space, seq_proc_write_space, NULL },
        { "super",       seq_proc_read_super, seq_proc_write_super, NULL },
@@ -388,6 +403,7 @@ struct lprocfs_vars seq_server_proc_list[] = {
 
 struct lprocfs_vars seq_client_proc_list[] = {
        { "range",      seq_proc_read_range, seq_proc_write_range, NULL },
+       { "server",     seq_proc_read_server, NULL, NULL },
        { "seq_width",  seq_proc_read_seq_width, seq_proc_write_seq_width, NULL },
        { NULL }};
 #endif
index 2dd46d4..86f04fa 100644 (file)
@@ -272,7 +272,7 @@ int fld_client_init(struct lu_client_fld *fld, int hash)
         fld->fld_hash = &fld_hash[hash];
         fld->fld_count = 0;
         
-        CDEBUG(D_INFO|D_WARNING, "Client FLD initialized, using \"%s\" hash\n",
+        CDEBUG(D_INFO|D_WARNING, "Client FLD, using \"%s\" hash\n",
                fld->fld_hash->fh_name);
         RETURN(rc);
 }
index 119dfe6..e046119 100644 (file)
@@ -43,15 +43,16 @@ struct lu_fld_hash {
 };
 
 struct lu_server_fld {
-        struct proc_dir_entry   *fld_proc_entry;
+        cfs_proc_dir_entry_t    *fld_proc_entry;
+        cfs_proc_dir_entry_t    *fld_proc_dir;
         struct ptlrpc_service   *fld_service;
         struct dt_device        *fld_dt;
         struct dt_object        *fld_obj;
-        struct lu_fid            fld_fid; /* used during initialization */
+        struct lu_fid            fld_fid;
 };
 
 struct lu_client_fld {
-        struct proc_dir_entry   *fld_proc_entry;
+        cfs_proc_dir_entry_t    *fld_proc_dir;
         struct list_head         fld_exports;
         struct lu_fld_hash      *fld_hash;
         int                      fld_count;