Merge branch 'misc' into for-next
authorMartin Brandenburg <martin@omnibond.com>
Wed, 28 Sep 2016 18:50:46 +0000 (14:50 -0400)
committerMartin Brandenburg <martin@omnibond.com>
Wed, 28 Sep 2016 18:50:46 +0000 (14:50 -0400)
Pull in an OrangeFS branch containing miscellaneous improvements.

- clean up debugfs globals
- remove dead code in sysfs
- reorganize duplicated sysfs attribute structs
- consolidate sysfs show and store functions
- remove duplicated sysfs_ops structures
- describe organization of sysfs
- make devreq_mutex static
- g_orangefs_stats -> orangefs_stats for consistency
- rename most remaining global variables

1  2 
fs/orangefs/devorangefs-req.c
fs/orangefs/file.c
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-sysfs.c
fs/orangefs/super.c

  
  /* this file implements the /dev/pvfs2-req device node */
  
 +uint32_t orangefs_userspace_version;
 +
  static int open_access_count;
  
+ static DEFINE_MUTEX(devreq_mutex);
  #define DUMP_DEVICE_ERROR()                                                   \
  do {                                                                          \
        gossip_err("*****************************************************\n");\
Simple merge
Simple merge
@@@ -836,26 -321,14 +321,23 @@@ static ssize_t sysfs_service_op_show(st
                goto out;
        }
  
-       if (strcmp(kobj_id, PC_KOBJ_ID))
+       if (strcmp(kobj->name, PC_KOBJ_ID))
                new_op->upcall.req.param.type = ORANGEFS_PARAM_REQUEST_GET;
  
-       if (!strcmp(kobj_id, ORANGEFS_KOBJ_ID)) {
-               orangefs_attr = (struct orangefs_attribute *)attr;
+       if (!strcmp(kobj->name, ORANGEFS_KOBJ_ID)) {
 +              /* Drop unsupported requests first. */
 +              if (!(orangefs_features & ORANGEFS_FEATURE_READAHEAD) &&
-                   (!strcmp(orangefs_attr->attr.name, "readahead_count") ||
-                   !strcmp(orangefs_attr->attr.name, "readahead_size") ||
-                   !strcmp(orangefs_attr->attr.name,
-                   "readahead_count_size"))) {
++                  (!strcmp(attr->attr.name, "readahead_count") ||
++                  !strcmp(attr->attr.name, "readahead_size") ||
++                  !strcmp(attr->attr.name, "readahead_count_size"))) {
 +                      rc = -EINVAL;
 +                      goto out;
 +              }
 +
-               if (!strcmp(orangefs_attr->attr.name, "perf_history_size"))
+               if (!strcmp(attr->attr.name, "perf_history_size"))
                        new_op->upcall.req.param.op =
                                ORANGEFS_PARAM_REQUEST_OP_PERF_HISTORY_SIZE;
-               else if (!strcmp(orangefs_attr->attr.name,
+               else if (!strcmp(attr->attr.name,
                                 "perf_time_interval_secs"))
                        new_op->upcall.req.param.op =
                                ORANGEFS_PARAM_REQUEST_OP_PERF_TIME_INTERVAL_SECS;
@@@ -1141,19 -528,8 +537,17 @@@ static ssize_t sysfs_service_op_store(s
  
        new_op->upcall.req.param.type = ORANGEFS_PARAM_REQUEST_SET;
  
-       if (!strcmp(kobj_id, ORANGEFS_KOBJ_ID)) {
-               orangefs_attr = (struct orangefs_attribute *)attr;
+       if (!strcmp(kobj->name, ORANGEFS_KOBJ_ID)) {
 +              /* Drop unsupported requests first. */
 +              if (!(orangefs_features & ORANGEFS_FEATURE_READAHEAD) &&
-                   (!strcmp(orangefs_attr->attr.name, "readahead_count") ||
-                   !strcmp(orangefs_attr->attr.name, "readahead_size") ||
-                   !strcmp(orangefs_attr->attr.name,
-                   "readahead_count_size"))) {
++                  (!strcmp(attr->attr.name, "readahead_count") ||
++                  !strcmp(attr->attr.name, "readahead_size") ||
++                  !strcmp(attr->attr.name, "readahead_count_size"))) {
 +                      rc = -EINVAL;
 +                      goto out;
 +              }
 +
-               if (!strcmp(orangefs_attr->attr.name, "perf_history_size")) {
+               if (!strcmp(attr->attr.name, "perf_history_size")) {
                        if (val > 0) {
                                new_op->upcall.req.param.op =
                                  ORANGEFS_PARAM_REQUEST_OP_PERF_HISTORY_SIZE;
Simple merge