On Thu, Nov 06, 2008 at 03:24:05PM +0000, David Woodhouse wrote: > I think we should be content to declare such devices 'broken'. > > They have to keep track of individual sectors _anyway_, and dropping > information for small discard requests is just careless. As an implementor of such a device, I say "ya, boo, sucks to you". ata_ram simply ignores the bits of the trim which don't line up with the page size chunks it's allocated. Sure, it'd be possible to add a bitmap to indicate which 512-byte chunks of the block contain data and which don't, but I haven't done that yet. I think there's even space in the struct page that I can abuse to do that. I think this really is a QoI thing. Vendors who don't track individual sectors will gradually get less and less efficient. Hopefully users will buy from vendors who don't cheat. We can even write a quick program to allocate the entire drive then trim sectors in a chessboard patterns. That'll let users see who's got a crap implementation and who's got a good one. -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html