* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
if (unlikely(nr_pages == 0))
return;
- blocks_per_page = CFS_PAGE_SIZE >> osd_sb(osd)->s_blocksize_bits;
+ blocks_per_page = PAGE_CACHE_SIZE >> osd_sb(osd)->s_blocksize_bits;
lprocfs_oh_tally_log2(&s->hist[BRW_R_PAGES+rw], nr_pages);
LPROCFS_CNTR_AVGMINMAX,
"thandle closing", "usec");
#endif
- lprocfs_seq_create(osd->od_proc_entry, "brw_stats",
- 0644, &osd_brw_stats_fops, osd);
+ result = lprocfs_seq_create(osd->od_proc_entry, "brw_stats",
+ 0644, &osd_brw_stats_fops, osd);
} else
result = -ENOMEM;
return rc == 0 ? count : rc;
}
-#ifdef HAVE_LDISKFS_PDO
static int lprocfs_osd_rd_pdo(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
return count;
}
-#endif
static int lprocfs_osd_rd_auto_scrub(char *page, char **start, off_t off,
int count, int *eof, void *data)
return count;
}
+static int lprocfs_osd_rd_track_declares_assert(char *page, char **start,
+ off_t off, int count,
+ int *eof, void *data)
+{
+ *eof = 1;
+
+ return snprintf(page, count, "%d\n", ldiskfs_track_declares_assert);
+}
+
+static int lprocfs_osd_wr_track_declares_assert(struct file *file,
+ const char *buffer,
+ unsigned long count, void *data)
+{
+ int track_declares_assert;
+ int rc;
+
+ rc = lprocfs_write_helper(buffer, count, &track_declares_assert);
+ if (rc != 0)
+ return rc;
+
+ ldiskfs_track_declares_assert = !!track_declares_assert;
+
+ return count;
+}
+
static int lprocfs_osd_rd_oi_scrub(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
}
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 },
-#ifdef HAVE_LDISKFS_PDO
{ "pdo", lprocfs_osd_rd_pdo, lprocfs_osd_wr_pdo, 0 },
-#endif
{ "auto_scrub", lprocfs_osd_rd_auto_scrub,
lprocfs_osd_wr_auto_scrub, 0 },
{ "oi_scrub", lprocfs_osd_rd_oi_scrub, 0, 0 },
struct lprocfs_vars lprocfs_osd_module_vars[] = {
{ "num_refs", lprocfs_rd_numrefs, 0, 0 },
+ { "track_declares_assert", lprocfs_osd_rd_track_declares_assert,
+ lprocfs_osd_wr_track_declares_assert,
+ 0 },
{ 0 }
};