|
From: | David Hildenbrand |
Subject: | Re: [PATCH v5 03/11] virtio-mem: Implement RamDiscardMgr interface |
Date: | Mon, 22 Feb 2021 12:29:59 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
+ if (ret) { + /* Could be a mapping attempt resulted in memory getting populated. */ + ret2 = ram_block_discard_range(vmem->memdev->mr.ram_block, offset, + size); + if (ret2) { + error_report("Unexpected error discarding RAM: %s", + strerror(-ret2));Not a blocker, but it's good to include the RAMBlock/offset/size in errors like these.
Having a second look, ram_block_discard_range() already properly prints errors including details. I think I can drop this error_report completely (all errors when discarding are unexpected).
-- Thanks, David / dhildenb
[Prev in Thread] | Current Thread | [Next in Thread] |