Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8facb61 authored by Mike Snitzer's avatar Mike Snitzer Committed by Alasdair G Kergon
Browse files

dm: zero silently drop discards



Have the zero target silently drop a discard rather than fail the
request with -EOPNOTSUPP.

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent b441a262
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,11 @@ static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv)
		return -EINVAL;
		return -EINVAL;
	}
	}


	/*
	 * Silently drop discards, avoiding -EOPNOTSUPP.
	 */
	ti->num_discard_requests = 1;

	return 0;
	return 0;
}
}