From: Martin K. Petersen Date: Wed, 18 May 2011 08:37:35 +0000 (+0200) Subject: block: Fix discard topology stacking and reporting X-Git-Tag: v2.6.39.1~139 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=071f305d6f2ecd2239f148858ead57a2f4fb16d9;p=pandora-kernel.git block: Fix discard topology stacking and reporting commit a934a00a69e940b126b9bdbf83e630ef5fe43523 upstream. In some cases we would end up stacking discard_zeroes_data incorrectly. Fix this by enabling the feature by default for stacking drivers and clearing it for low-level drivers. Incorporating a device that does not support dzd will then cause the feature to be disabled in the stacking driver. Also ensure that the maximum discard value does not overflow when exported in sysfs and return 0 in the alignment and dzd fields for devices that don't support discard. Reported-by: Lukas Czerner Signed-off-by: Martin K. Petersen Acked-by: Mike Snitzer Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed