Whamcloud - gitweb
LU-6557 llite: remove unused ll_max_rw_chunk
[fs/lustre-release.git] / lustre / llite / lproc_llite.c
index e4241e4..7e84cfe 100644 (file)
 #define DEBUG_SUBSYSTEM S_LLITE
 
 #include <linux/version.h>
+#include <linux/user_namespace.h>
+#ifdef HAVE_UIDGID_HEADER
+# include <linux/uidgid.h>
+#endif
 #include <lustre_param.h>
 #include <lprocfs_status.h>
 #include <obd_support.h>
@@ -396,7 +400,7 @@ static int ll_max_cached_mb_seq_show(struct seq_file *m, void *v)
 {
        struct super_block     *sb    = m->private;
        struct ll_sb_info      *sbi   = ll_s2sbi(sb);
-       struct cl_client_cache *cache = &sbi->ll_cache;
+       struct cl_client_cache *cache = sbi->ll_cache;
        int shift = 20 - PAGE_CACHE_SHIFT;
        long max_cached_mb;
        long unused_mb;
@@ -423,7 +427,7 @@ ll_max_cached_mb_seq_write(struct file *file, const char __user *buffer,
        struct seq_file *m = file->private_data;
        struct super_block *sb = m->private;
        struct ll_sb_info *sbi = ll_s2sbi(sb);
-       struct cl_client_cache *cache = &sbi->ll_cache;
+       struct cl_client_cache *cache = sbi->ll_cache;
        struct lu_env *env;
        __u64 val;
        long diff = 0;
@@ -566,29 +570,6 @@ static ssize_t ll_checksum_seq_write(struct file *file,
 }
 LPROC_SEQ_FOPS(ll_checksum);
 
-static int ll_max_rw_chunk_seq_show(struct seq_file *m, void *v)
-{
-       struct super_block *sb = m->private;
-
-       return seq_printf(m, "%lu\n", ll_s2sbi(sb)->ll_max_rw_chunk);
-}
-
-static ssize_t ll_max_rw_chunk_seq_write(struct file *file,
-                                        const char __user *buffer,
-                                        size_t count, loff_t *off)
-{
-       struct seq_file *m = file->private_data;
-       struct super_block *sb = m->private;
-        int rc, val;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-        ll_s2sbi(sb)->ll_max_rw_chunk = val;
-        return count;
-}
-LPROC_SEQ_FOPS(ll_max_rw_chunk);
-
 static int ll_rd_track_id(struct seq_file *m, enum stats_track_type type)
 {
        struct super_block *sb = m->private;
@@ -849,36 +830,6 @@ static ssize_t ll_default_easize_seq_write(struct file *file,
 }
 LPROC_SEQ_FOPS(ll_default_easize);
 
-static int ll_max_cookiesize_seq_show(struct seq_file *m, void *v)
-{
-       struct super_block *sb = m->private;
-       struct ll_sb_info *sbi = ll_s2sbi(sb);
-       unsigned int cookielen;
-       int rc;
-
-       rc = ll_get_max_cookiesize(sbi, &cookielen);
-       if (rc)
-               return rc;
-
-       return seq_printf(m, "%u\n", cookielen);
-}
-LPROC_SEQ_FOPS_RO(ll_max_cookiesize);
-
-static int ll_default_cookiesize_seq_show(struct seq_file *m, void *v)
-{
-       struct super_block *sb = m->private;
-       struct ll_sb_info *sbi = ll_s2sbi(sb);
-       unsigned int cookielen;
-       int rc;
-
-       rc = ll_get_default_cookiesize(sbi, &cookielen);
-       if (rc)
-               return rc;
-
-       return seq_printf(m, "%u\n", cookielen);
-}
-LPROC_SEQ_FOPS_RO(ll_default_cookiesize);
-
 static int ll_sbi_flags_seq_show(struct seq_file *m, void *v)
 {
        const char *str[] = LL_SBI_FLAGS;
@@ -907,7 +858,7 @@ static int ll_unstable_stats_seq_show(struct seq_file *m, void *v)
 {
        struct super_block      *sb    = m->private;
        struct ll_sb_info       *sbi   = ll_s2sbi(sb);
-       struct cl_client_cache  *cache = &sbi->ll_cache;
+       struct cl_client_cache  *cache = sbi->ll_cache;
        long pages;
        int mb;
 
@@ -945,9 +896,9 @@ static ssize_t ll_unstable_stats_seq_write(struct file *file,
                return rc;
 
        /* borrow lru lock to set the value */
-       spin_lock(&sbi->ll_cache.ccc_lru_lock);
-       sbi->ll_cache.ccc_unstable_check = !!val;
-       spin_unlock(&sbi->ll_cache.ccc_lru_lock);
+       spin_lock(&sbi->ll_cache->ccc_lru_lock);
+       sbi->ll_cache->ccc_unstable_check = !!val;
+       spin_unlock(&sbi->ll_cache->ccc_lru_lock);
 
        return count;
 }
@@ -1049,8 +1000,6 @@ struct lprocfs_vars lprocfs_llite_obd_vars[] = {
          .fops =       &ll_max_cached_mb_fops                  },
        { .name =       "checksum_pages",
          .fops =       &ll_checksum_fops                       },
-       { .name =       "max_rw_chunk",
-         .fops =       &ll_max_rw_chunk_fops                   },
        { .name =       "stats_track_pid",
          .fops =       &ll_track_pid_fops                      },
        { .name =       "stats_track_ppid",
@@ -1069,10 +1018,6 @@ struct lprocfs_vars lprocfs_llite_obd_vars[] = {
          .fops =       &ll_max_easize_fops                     },
        { .name =       "default_easize",
          .fops =       &ll_default_easize_fops                 },
-       { .name =       "max_cookiesize",
-         .fops =       &ll_max_cookiesize_fops                 },
-       { .name =       "default_cookiesize",
-         .fops =       &ll_default_cookiesize_fops             },
        { .name =       "sbi_flags",
          .fops =       &ll_sbi_flags_fops                      },
        { .name =       "xattr_cache",