X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fllite%2Flproc_llite.c;h=a0aea001118d960a03021440d53331f5126cf22c;hb=e49995acfd026f3ca85d05dc1b91d97a8743fe72;hp=18f80d15ada9a4aae3b8d868f79a83cfd0dc9518;hpb=73c12f4d6c98476c0dc5de77a646a157db727eef;p=fs%2Flustre-release.git diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index 18f80d1..a0aea00 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -27,7 +27,7 @@ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2013, Intel Corporation. + * Copyright (c) 2012, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -47,9 +47,9 @@ struct proc_dir_entry *proc_lustre_fs_root; #ifdef LPROCFS /* /proc/lustre/llite mount point registration */ -struct file_operations ll_rw_extents_stats_fops; -struct file_operations ll_rw_extents_stats_pp_fops; -struct file_operations ll_rw_offset_stats_fops; +static const struct file_operations ll_rw_extents_stats_fops; +static const struct file_operations ll_rw_extents_stats_pp_fops; +static const struct file_operations ll_rw_offset_stats_fops; static int ll_blksize_seq_show(struct seq_file *m, void *v) { @@ -451,6 +451,8 @@ ll_max_cached_mb_seq_write(struct file *file, const char __user *buffer, totalram_pages >> (20 - PAGE_CACHE_SHIFT)); RETURN(-ERANGE); } + /* Allow enough cache so clients can make well-formed RPCs */ + pages_number = max_t(long, pages_number, PTLRPC_MAX_BRW_PAGES); spin_lock(&sbi->ll_lock); diff = pages_number - cache->ccc_lru_max; @@ -1022,7 +1024,7 @@ struct lprocfs_seq_vars lprocfs_llite_obd_vars[] = { .fops = &ll_root_squash_fops }, { .name = "nosquash_nids", .fops = &ll_nosquash_nids_fops }, - { 0 } + { NULL } }; #define MAX_STRING_SIZE 128