Page MenuHomeFreeBSD

ctl ramdisk: Free compare buffer after a compare I/O request.
ClosedPublic

Authored by jhb on Feb 18 2022, 5:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 20 2024, 5:33 PM
Unknown Object (File)
Oct 20 2024, 12:41 PM
Unknown Object (File)
Sep 27 2024, 12:59 PM
Unknown Object (File)
Sep 12 2024, 8:19 PM
Unknown Object (File)
Sep 11 2024, 7:33 AM
Unknown Object (File)
Sep 10 2024, 11:47 PM
Unknown Object (File)
Sep 7 2024, 8:41 PM
Unknown Object (File)
Sep 6 2024, 9:40 PM
Subscribers

Details

Summary

For a compare request, the ramdisk backend allocates a temporary
buffer to hold the I/O data and then compares it against the LUN's
pages in ctl_backend_ramdisk_cmp after the data has been filled.
However, the tempory buffer was leaked when after the comparison was
complete. Fix this by freeing the buffer after the comparison.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44501
Build 41389: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Feb 18 2022, 5:30 PM

I haven't figured out a good way to test this (don't see a way to easily generate COMPARE WRITE or VERIFY commands to daX), just noticed this while investigating a possible memory leak reported by Chelsio's QA folks.

Looks good to me.

There are sg_compare_and_write and sg_verify in sg3_utils port.

This revision is now accepted and ready to land.Feb 18 2022, 5:47 PM

Thanks, I tested with sg_verify and sg_compare_and_write.