Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce descriptor size if remaining bytes is less than request size #597

Closed
wants to merge 1 commit into from

Conversation

consp
Copy link

@consp consp commented Jul 31, 2023

Fixes #595

if (length < req->Length) {
desc = (struct smb2_buffer_desc_v1 *)((char *)req + le16_to_cpu(req->ReadChannelInfoOffset));
desc->length = cpu_to_le32(length);
}
err = ksmbd_conn_rdma_write(work->conn, data_buf, length,
(struct smb2_buffer_desc_v1 *)
((char *)req + le16_to_cpu(req->ReadChannelInfoOffset)),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change it to desc.


/* set descriptor lenght to nbytes if less than request size */
if (length < req->Length) {
desc = (struct smb2_buffer_desc_v1 *)((char *)req + le16_to_cpu(req->ReadChannelInfoOffset));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to out of if condition.

desc = (struct smb2_buffer_desc_v1 *)((char *)req + le16_to_cpu(req->ReadChannelInfoOffset));
/* set descriptor lenght to nbytes if less than request size */
if (length < req->Length)

@namjaejeon
Copy link
Member

Please update the subject to "ksmbd: reduce descriptor size if remaining bytes is less than request size".
And need to add signed-off-by tag. you can create the patch using git.

@namjaejeon
Copy link
Member

Have you ever sent the patch to the mailing list ? ksmbd patch should be sent to the mailing list([email protected])

@namjaejeon
Copy link
Member

Can you update the patch description ? You can add the description of ISSUE and how this patch fix it.

@consp
Copy link
Author

consp commented Aug 3, 2023

@namjaejeon sorry for the slow response

Yes, I'll add the changes this weekend (this is on my private time). No I have never send a patch to the kernel mailing list (and have no intention of putting considerable amounts of time into it).

@namjaejeon
Copy link
Member

Okay, I will directly update your patch and send the patch to mailing list. Let me know your full name and mail address to add signed-off-by tag.

@namjaejeon
Copy link
Member

Let me know your full name and mail address to add signed-off-by tag.

@consp Ping?

@namjaejeon
Copy link
Member

@consp I have reproduced it with cifs client, I will check it more. thanks.

@namjaejeon
Copy link
Member

Applied updated patch. Let me know if you have the issue.

@namjaejeon namjaejeon closed this Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Files over 128k not of size (N * 128k) create a "file too large for filesystem" error when using rdma
3 participants