if (ours == NULL)
return -ENOMEM;
- if (size < OUT_UPDATE_INIT_BUFFER_SIZE)
- size = OUT_UPDATE_INIT_BUFFER_SIZE;
-
+ /* Since this buffer will be put on wire, let's
+ * align the buffer size to PAGE_SIZE to avoid
+ * trouble.
+ */
+ LASSERT(size > 0);
+ size = ((size - 1) | (PAGE_SIZE - 1)) + 1;
ours->ours_req = object_update_request_alloc(size);
-
if (IS_ERR(ours->ours_req)) {
OBD_FREE_PTR(ours);
return -ENOMEM;
INIT_LIST_HEAD(&our->our_invalidate_cb_list);
spin_lock_init(&our->our_list_lock);
- rc = osp_object_update_request_create(our, OUT_UPDATE_INIT_BUFFER_SIZE);
+ rc = osp_object_update_request_create(our, PAGE_SIZE);
if (rc != 0) {
OBD_FREE_PTR(our);
return ERR_PTR(rc);