* Use is subject to license terms.
*/
/*
- * Copyright (c) 2011, 2012 Whamcloud, Inc.
+ * Copyright (c) 2012, Intel Corporation.
* Use is subject to license terms.
*/
/*
#define DEBUG_SUBSYSTEM S_CLASS
#include <obd.h>
+#include <obd_class.h>
#include <lprocfs_status.h>
-#include <lu_time.h>
-
#include <lustre/lustre_idl.h>
-#include "udmu.h"
#include "osd_internal.h"
#ifdef LPROCFS
return rc == 0 ? count : rc;
}
-static int lprocfs_osd_rd_iused_est(char *page, char **start, off_t off, int count,
- int *eof, void *data)
+static int lprocfs_osd_rd_iused_est(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
{
struct osd_device *osd = osd_dt_dev((struct dt_device *)data);
LASSERT(osd != NULL);
return snprintf(page, count, "%d\n", osd->od_quota_iused_est);
}
-static int lprocfs_osd_wr_iused_est(struct file *file, const char *buffer,
- unsigned long count, void *data)
+static int lprocfs_osd_wr_iused_est(struct file *file,
+ const char __user *buffer,
+ unsigned long count, void *data)
{
struct osd_device *osd = osd_dt_dev((struct dt_device *)data);
int rc, val;
}
struct lprocfs_vars lprocfs_osd_obd_vars[] = {
- { "blocksize", lprocfs_osd_rd_blksize, 0, 0 },
- { "kbytestotal", lprocfs_osd_rd_kbytestotal, 0, 0 },
- { "kbytesfree", lprocfs_osd_rd_kbytesfree, 0, 0 },
- { "kbytesavail", lprocfs_osd_rd_kbytesavail, 0, 0 },
- { "filestotal", lprocfs_osd_rd_filestotal, 0, 0 },
- { "filesfree", lprocfs_osd_rd_filesfree, 0, 0 },
+ { "blocksize", lprocfs_dt_rd_blksize, 0, 0 },
+ { "kbytestotal", lprocfs_dt_rd_kbytestotal, 0, 0 },
+ { "kbytesfree", lprocfs_dt_rd_kbytesfree, 0, 0 },
+ { "kbytesavail", lprocfs_dt_rd_kbytesavail, 0, 0 },
+ { "filestotal", lprocfs_dt_rd_filestotal, 0, 0 },
+ { "filesfree", lprocfs_dt_rd_filesfree, 0, 0 },
{ "fstype", lprocfs_osd_rd_fstype, 0, 0 },
{ "mntdev", lprocfs_osd_rd_mntdev, 0, 0 },
{ "force_sync", 0, lprocfs_osd_wr_force_sync },
int osd_procfs_init(struct osd_device *osd, const char *name)
{
- struct lu_device *ld = &osd->od_dt_dev.dd_lu_dev;
- struct obd_type *type = ld->ld_type->ldt_obd_type;
- int rc;
+ struct obd_type *type;
+ int rc;
ENTRY;
if (osd->od_proc_entry)
RETURN(0);
+ /* at the moment there is no linkage between lu_type
+ * and obd_type, so we lookup obd_type this way */
+ type = class_search_type(LUSTRE_OSD_ZFS_NAME);
+
LASSERT(name != NULL);
LASSERT(type != NULL);