diff options
author | Gregoire Pichon <gregoire.pichon@bull.net> | 2016-11-10 20:30:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-14 18:02:54 +0300 |
commit | c7298013ce3042321db4652f72ed1f1dde453129 (patch) | |
tree | f943e60f50eb36ba3a62ee3d45175c99ed64f827 | |
parent | b8cb86fd95bb461c3496e1f4b4083b198c963a9c (diff) | |
download | linux-c7298013ce3042321db4652f72ed1f1dde453129.tar.xz |
staging: lustre: osc: fix max_dirty_mb tunable setting limit
The OSC tunable max_dirty_mb must be set to a value strictly lower
than 2048, as it is assumed by OSS in ofd_grant_alloc() routine.
Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7218
Reviewed-on: http://review.whamcloud.com/16652
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c index a837362d903d..4f56a49f2a32 100644 --- a/drivers/staging/lustre/lustre/osc/lproc_osc.c +++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c @@ -162,7 +162,7 @@ static ssize_t max_dirty_mb_store(struct kobject *kobj, pages_number *= 1 << (20 - PAGE_SHIFT); /* MB -> pages */ if (pages_number <= 0 || - pages_number > OSC_MAX_DIRTY_MB_MAX << (20 - PAGE_SHIFT) || + pages_number >= OSC_MAX_DIRTY_MB_MAX << (20 - PAGE_SHIFT) || pages_number > totalram_pages / 4) /* 1/4 of RAM */ return -ERANGE; |