# include <liblustre.h>
#endif
-#include <obd.h>
-#include <obd_class.h>
#include <dt_object.h>
-#include <md_object.h>
#include <obd_support.h>
-#include <lustre_req_layout.h>
#include <lustre_fld.h>
#include <lustre_fid.h>
#include "fld_internal.h"
+#include <md_object.h>
#ifdef LPROCFS
static int
struct lu_env fsp_env;
struct dt_it *fsp_it;
struct lu_server_fld *fsp_fld;
- int fsp_stop:1;
+ unsigned int fsp_stop:1;
+};
+
+struct lprocfs_vars fld_client_proc_list[] = {
+ { "targets", fld_proc_read_targets, NULL, NULL },
+ { "hash", fld_proc_read_hash, fld_proc_write_hash, NULL },
+ { "cache_flush", NULL, fld_proc_write_cache_flush, NULL },
+ { NULL }
};
+# ifdef HAVE_SERVER_SUPPORT
static void *fldb_seq_start(struct seq_file *p, loff_t *pos)
{
struct fld_seq_param *param = p->private;
struct lu_server_fld *fld;
struct dt_object *obj;
+ if (param == NULL)
+ return;
+
fld = param->fsp_fld;
obj = fld->lsf_obj;
LASSERT(obj != NULL);
iops = &obj->do_index_ops->dio_it;
iops->put(¶m->fsp_env, param->fsp_it);
- return;
}
static void *fldb_seq_next(struct seq_file *p, void *v, loff_t *pos)
int env_init = 0;
int rc;
- LPROCFS_ENTRY_AND_CHECK(dp);
+ LPROCFS_ENTRY_CHECK(dp);
rc = seq_open(file, &fldb_sops);
if (rc)
GOTO(out, rc);
lu_env_fini(¶m->fsp_env);
if (param != NULL)
OBD_FREE_PTR(param);
- LPROCFS_EXIT();
}
return rc;
}
iops = &obj->do_index_ops->dio_it;
LASSERT(iops != NULL);
- LASSERT(obj != NULL);
LASSERT(param->fsp_it != NULL);
iops->fini(¶m->fsp_env, param->fsp_it);
lu_env_fini(¶m->fsp_env);
return 0;
}
-struct lprocfs_vars fld_server_proc_list[] = {
- { NULL }};
-
-struct lprocfs_vars fld_client_proc_list[] = {
- { "targets", fld_proc_read_targets, NULL, NULL },
- { "hash", fld_proc_read_hash, fld_proc_write_hash, NULL },
- { "cache_flush", NULL, fld_proc_write_cache_flush, NULL },
- { NULL }};
-
-struct file_operations fld_proc_seq_fops = {
+const struct file_operations fld_proc_seq_fops = {
.owner = THIS_MODULE,
.open = fldb_seq_open,
.read = seq_read,
.release = fldb_seq_release,
};
-#endif
+struct lprocfs_vars fld_server_proc_list[] = {
+ { NULL }
+};
+
+# endif /* HAVE_SERVER_SUPPORT */
+
+#endif /* LPROCFS */