Reduce max trim request size to 512K
512K is the maximum request size for which request map fits into one page (4K) regardless of cacheline size. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
3eadffad0f
commit
26fd938ccf
@ -352,6 +352,6 @@ typedef enum {
|
||||
* @}
|
||||
*/
|
||||
|
||||
#define MAX_TRIM_RQ_SIZE (1 * MiB)
|
||||
#define MAX_TRIM_RQ_SIZE (512 * KiB)
|
||||
|
||||
#endif /* __OCF_DEF_H__ */
|
||||
|
@ -224,6 +224,9 @@ int ocf_req_alloc_map(struct ocf_request *req)
|
||||
|
||||
int ocf_req_alloc_map_discard(struct ocf_request *req)
|
||||
{
|
||||
ENV_BUILD_BUG_ON(MAX_TRIM_RQ_SIZE / ocf_cache_line_size_4 *
|
||||
sizeof(struct ocf_map_info) > 4 * KiB);
|
||||
|
||||
if (req->byte_length <= MAX_TRIM_RQ_SIZE)
|
||||
return ocf_req_alloc_map(req);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user