On Wed, Nov 18, 2026 at 05:41:42PM +0100, Mikulas Patocka wrote: > There may be multiple targets in a table - if you use the name of the md > device as the base directory, they will clash.
That would be a real problem, but none of the existing dm-bufio users can reach it for now: dm-verity, dm-thin and dm-integrity are all DM_TARGET_SINGLETON, so a table can hold at most one of them and the directory under a device holds at most one "hash"/"fec"/"fec-data" client per role. If a custom targe_type which allows multi target and each of them have a dm-bufio client, that will be hard to handle. I just want to show the client info through sysfs, how about show such info via message? > There may be at most two tables for a given "md" device (the active table > and the inactive table). Each will have its own dm-bufio instance and they > will clash. That did collide in v1; in v2 the directories are detached in ->presuspend (names freed, kobjects kept until the table is destroyed), so the new table's directories are created synchronously at resume, with no warning. > Another problem is that if you reload a dm table, you lose all dm-bufio > settings that were set by the user in sysfs. That applies equally to messages. The default is recomputed from hash_retain_percent at every ctr, only an explicit runtime tweak is lost. Most of the sysfs content is state anyway (current_bytes/buffers), not settings. > What do you think? Which of these two possibilities is better? I prefer messages, please review [PATCH 4/4]: 1. The constructor line would have to be taught to veritysetup, dmctl in android and lvm2; a message is one command, no userspace change. 2. This knob wants runtime adjustment (raise at boot, drop later); persisting it in the table line makes every tweak a suspend/resume reload, while a message adjusts the live device directly. Thanks for the review, Yongpeng
