From: Li Dongyang Date: Thu, 24 Mar 2011 10:24:27 +0000 (+0000) Subject: Btrfs: adjust btrfs_discard_extent() return errors and trimmed bytes X-Git-Tag: v2.6.39-rc1~19^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5378e60734f5b7bfe1b43dc191aaf6131c1befe7;p=pandora-kernel.git Btrfs: adjust btrfs_discard_extent() return errors and trimmed bytes Callers of btrfs_discard_extent() should check if we are mounted with -o discard, as we want to make fitrim to work even the fs is not mounted with -o discard. Also we should use REQ_DISCARD to map the free extent to get a full mapping, last we only return errors if 1. the error is not a EOPNOTSUPP 2. no device supports discard Signed-off-by: Li Dongyang Signed-off-by: Chris Mason --- Reading git-diff-tree failed