Whamcloud - gitweb
LU-8460 osc: max_pages_per_rpc should be chunk size aligned
[fs/lustre-release.git] / lustre / ofd / lproc_ofd.c
index c130194..38093a5 100644 (file)
@@ -533,7 +533,8 @@ ofd_brw_size_seq_write(struct file *file, const char __user *buffer,
                return -EINVAL;
 
        val = val * ONE_MB_BRW_SIZE;
-       if (val <= 0 || val > DT_MAX_BRW_SIZE)
+       if (val <= 0 || val > DT_MAX_BRW_SIZE ||
+           val < (1 << ofd->ofd_blockbits))
                return -ERANGE;
 
        spin_lock(&ofd->ofd_flags_lock);