Преглед на файлове

dm cache: always split discards on cache block boundaries

The DM cache target cannot cope with discards that span multiple cache
blocks, so each discard bio that spans more than one cache block must
get split by the DM core.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # v3.9+
Heinz Mauelshagen преди 11 години
родител
ревизия
f1daa838e8
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      drivers/md/dm-cache-target.c

+ 2 - 0
drivers/md/dm-cache-target.c

@@ -2178,6 +2178,8 @@ static int cache_create(struct cache_args *ca, struct cache **result)
 	ti->num_discard_bios = 1;
 	ti->num_discard_bios = 1;
 	ti->discards_supported = true;
 	ti->discards_supported = true;
 	ti->discard_zeroes_data_unsupported = true;
 	ti->discard_zeroes_data_unsupported = true;
+	/* Discard bios must be split on a block boundary */
+	ti->split_discard_bios = true;
 
 
 	cache->features = ca->features;
 	cache->features = ca->features;
 	ti->per_bio_data_size = get_per_bio_data_size(cache);
 	ti->per_bio_data_size = get_per_bio_data_size(cache);