Re: New TRIM/UNMAP tree published (2009-05-02)

From: Jeff Garzik
Date: Sun May 03 2009 - 18:54:35 EST


Matthew Wilcox wrote:
(3) when creating a discard request, use block helpers w/ queue-specific knowledge to create either
(a) one request, REQ_TYPE_FS, with discard flag or
(b) two requests, REQ_TYPE_FS followed by REQ_TYPE_DISCARD

I'm not sure we need option 3b.


Well -- it is a hard requirement to map 1:1 struct request with the underlying hardware device's command set.

If a device command set lacks a READ-and-DISCARD operation, then you _must_ create two struct request. Otherwise you break block layer tagging and other 1:1-based assumptions that exist today.

Thus, given that all of ATA|SCSI|NVMHCI have a DISCARD operation distinct from other commands...

option 3b is the overwhelming common case.

Jeff



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/