Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-7160 mgs: Skip processing .bak files on MGS
[fs/lustre-release.git]
/
lustre
/
mdc
/
lproc_mdc.c
diff --git
a/lustre/mdc/lproc_mdc.c
b/lustre/mdc/lproc_mdc.c
index
023b779
..
6a11414
100644
(file)
--- a/
lustre/mdc/lproc_mdc.c
+++ b/
lustre/mdc/lproc_mdc.c
@@
-46,12
+46,11
@@
static int mdc_active_seq_show(struct seq_file *m, void *v)
{
struct obd_device *dev = m->private;
static int mdc_active_seq_show(struct seq_file *m, void *v)
{
struct obd_device *dev = m->private;
- int rc;
LPROCFS_CLIMP_CHECK(dev);
LPROCFS_CLIMP_CHECK(dev);
-
rc =
seq_printf(m, "%d\n", !dev->u.cli.cl_import->imp_deactive);
+ seq_printf(m, "%d\n", !dev->u.cli.cl_import->imp_deactive);
LPROCFS_CLIMP_EXIT(dev);
LPROCFS_CLIMP_EXIT(dev);
- return
rc
;
+ return
0
;
}
static ssize_t mdc_active_seq_write(struct file *file,
}
static ssize_t mdc_active_seq_write(struct file *file,
@@
-59,10
+58,11
@@
static ssize_t mdc_active_seq_write(struct file *file,
size_t count, loff_t *off)
{
struct obd_device *dev;
size_t count, loff_t *off)
{
struct obd_device *dev;
- int val, rc;
+ int rc;
+ __s64 val;
dev = ((struct seq_file *)file->private_data)->private;
dev = ((struct seq_file *)file->private_data)->private;
- rc = lprocfs_
write_helper
(buffer, count, &val);
+ rc = lprocfs_
str_to_s64
(buffer, count, &val);
if (rc)
return rc;
if (val < 0 || val > 1)
if (rc)
return rc;
if (val < 0 || val > 1)
@@
-72,7
+72,8
@@
static ssize_t mdc_active_seq_write(struct file *file,
if (dev->u.cli.cl_import->imp_deactive == val)
rc = ptlrpc_set_import_active(dev->u.cli.cl_import, val);
else
if (dev->u.cli.cl_import->imp_deactive == val)
rc = ptlrpc_set_import_active(dev->u.cli.cl_import, val);
else
- CDEBUG(D_CONFIG, "activate %d: ignoring repeat request\n", val);
+ CDEBUG(D_CONFIG, "activate %llu: ignoring repeat request\n",
+ val);
return count;
}
return count;
}
@@
-82,12
+83,11
@@
static int mdc_max_rpcs_in_flight_seq_show(struct seq_file *m, void *v)
{
struct obd_device *dev = m->private;
__u32 max;
{
struct obd_device *dev = m->private;
__u32 max;
- int rc;
max = obd_get_max_rpcs_in_flight(&dev->u.cli);
max = obd_get_max_rpcs_in_flight(&dev->u.cli);
-
rc =
seq_printf(m, "%u\n", max);
+ seq_printf(m, "%u\n", max);
- return
rc
;
+ return
0
;
}
static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file,
}
static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file,
@@
-96,15
+96,19
@@
static ssize_t mdc_max_rpcs_in_flight_seq_write(struct file *file,
loff_t *off)
{
struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
loff_t *off)
{
struct obd_device *dev = ((struct seq_file *)file->private_data)->private;
-
int
val;
+
__s64
val;
int rc;
int rc;
- rc = lprocfs_
write_helper
(buffer, count, &val);
- if (rc
== 0
)
- r
c = obd_set_max_rpcs_in_flight(&dev->u.cli, val)
;
+ rc = lprocfs_
str_to_s64
(buffer, count, &val);
+ if (rc)
+ r
eturn rc
;
- if (rc != 0)
- count = rc;
+ if (val < 0 || val > UINT_MAX)
+ return -ERANGE;
+
+ rc = obd_set_max_rpcs_in_flight(&dev->u.cli, val);
+ if (rc)
+ return rc;
return count;
}
return count;
}
@@
-115,12
+119,11
@@
static int mdc_max_mod_rpcs_in_flight_seq_show(struct seq_file *m, void *v)
{
struct obd_device *dev = m->private;
__u16 max;
{
struct obd_device *dev = m->private;
__u16 max;
- int rc;
max = obd_get_max_mod_rpcs_in_flight(&dev->u.cli);
max = obd_get_max_mod_rpcs_in_flight(&dev->u.cli);
-
rc =
seq_printf(m, "%hu\n", max);
+ seq_printf(m, "%hu\n", max);
- return
rc
;
+ return
0
;
}
static ssize_t mdc_max_mod_rpcs_in_flight_seq_write(struct file *file,
}
static ssize_t mdc_max_mod_rpcs_in_flight_seq_write(struct file *file,
@@
-130,18
+133,18
@@
static ssize_t mdc_max_mod_rpcs_in_flight_seq_write(struct file *file,
{
struct obd_device *dev =
((struct seq_file *)file->private_data)->private;
{
struct obd_device *dev =
((struct seq_file *)file->private_data)->private;
-
int
val;
+
__s64
val;
int rc;
int rc;
- rc = lprocfs_
write_helper
(buffer, count, &val);
- if (rc
!= 0
)
+ rc = lprocfs_
str_to_s64
(buffer, count, &val);
+ if (rc)
return rc;
if (val < 0 || val > USHRT_MAX)
return -ERANGE;
rc = obd_set_max_mod_rpcs_in_flight(&dev->u.cli, val);
return rc;
if (val < 0 || val > USHRT_MAX)
return -ERANGE;
rc = obd_set_max_mod_rpcs_in_flight(&dev->u.cli, val);
- if (rc
!= 0
)
+ if (rc)
count = rc;
return count;
count = rc;
return count;