#define SBI_DEFAULT_CONTENTION_SECONDS 60
/* default value for lockless_truncate_enable */
#define SBI_DEFAULT_LOCKLESS_TRUNCATE_ENABLE 1
+/* default value for ll_direct_io_default */
+#define SBI_DEFAULT_DIRECT_IO_DEFAULT 0
/* percpu data structure for lustre lru page list */
struct ll_pglist_data {
unsigned ll_contention_time; /* seconds */
unsigned ll_lockless_truncate_enable; /* true/false */
+ unsigned ll_direct_io_default; /* true/false */
struct ll_ra_info ll_ra_info;
unsigned int ll_namelen;
?: count;
}
+static int ll_rd_direct_io_default(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ struct super_block *sb = data;
+
+ *eof = 1;
+ return snprintf(page, count, "%u\n",
+ ll_s2sbi(sb)->ll_direct_io_default);
+}
+
+static int ll_wr_direct_io_default(struct file *file, const char *buffer,
+ unsigned long count, void *data)
+{
+ struct super_block *sb = data;
+ struct ll_sb_info *sbi = ll_s2sbi(sb);
+
+ return lprocfs_write_helper(buffer, count,
+ &sbi->ll_direct_io_default)
+ ?: count;
+}
+
static int ll_rd_statahead_max(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
ll_wr_contention_time, 0},
{ "lockless_truncate", ll_rd_lockless_truncate,
ll_wr_lockless_truncate, 0},
+ { "direct_io_default", ll_rd_direct_io_default,
+ ll_wr_direct_io_default, 0},
{ "statahead_max", ll_rd_statahead_max, ll_wr_statahead_max, 0 },
{ "statahead_stats", ll_rd_statahead_stats, 0, 0 },
{ "lazystatfs", ll_rd_lazystatfs, ll_wr_lazystatfs, 0 },