From: yury Date: Sun, 25 Jun 2006 14:29:53 +0000 (+0000) Subject: - fixes in fld procfs; X-Git-Tag: v1_8_0_110~486^2~1550 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ef79d6b388a6fd8c7d368e7a408681adccc0ea5e;p=fs%2Flustre-release.git - fixes in fld procfs; - added server procfs entry to client's seq-mgrs --- diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c index 4c52797..9b30ac8 100644 --- a/lustre/fid/lproc_fid.c +++ b/lustre/fid/lproc_fid.c @@ -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 diff --git a/lustre/fld/fld_request.c b/lustre/fld/fld_request.c index 2dd46d4..86f04fa 100644 --- a/lustre/fld/fld_request.c +++ b/lustre/fld/fld_request.c @@ -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); } diff --git a/lustre/include/lustre_fld.h b/lustre/include/lustre_fld.h index 119dfe6..e046119 100644 --- a/lustre/include/lustre_fld.h +++ b/lustre/include/lustre_fld.h @@ -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;