John, > Thanks alot for responding Martin. Forgive my ignorance; just trying > to gain understanding. For example, if we find a device with a 2TiB > max discard (way too high for any device to handle reasonably from > what I've seen), That really depends. On some devices performing a 2TB discard may just involve updating a few entries in a block translation table. It could be close to constant time regardless of the number of terabytes unmapped. > and we make a quirk for it that brings the max discard down, how do we > decide what value to bring that down to? Would we ask the hardware > vendor for an optimal value? Is there some way we could decide the > value? The best thing would be to ask the vendor. Or maybe if you provide the output of # sg_vpd -p bl /dev/sdN and we can try to see if we can come up with a suitable heuristic for a quirk. -- Martin K. Petersen Oracle Linux Engineering