You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
dm: linear support discard
Allow discards to be passed through to linear mappings if at least one underlying device supports it. Discards will be forwarded only to devices that support them. A target that supports discards should set num_discard_requests to indicate how many times each discard request must be submitted to it. Verify table's underlying devices support discards prior to setting the associated DM device as capable of discards (via QUEUE_FLAG_DISCARD). Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reviewed-by: Joe Thornber <thornber@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
committed by
Alasdair G Kergon
parent
5ebaee6d29
commit
5ae89a8720
@@ -180,6 +180,12 @@ struct dm_target {
|
||||
*/
|
||||
unsigned num_flush_requests;
|
||||
|
||||
/*
|
||||
* The number of discard requests that will be submitted to the
|
||||
* target. map_info->request_nr is used just like num_flush_requests.
|
||||
*/
|
||||
unsigned num_discard_requests;
|
||||
|
||||
/* target specific data */
|
||||
void *private;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user