aboutsummaryrefslogtreecommitdiff
path: root/fs/jbd2
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-08-04 14:52:27 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-29 13:29:08 -0700
commita2ea18615b6929ccc884e651cd1c0e04941548bf (patch)
tree8ffec687fe0432f5cb8d700f12fa01313ba8edd6 /fs/jbd2
parent6857336c7fddaf460a13adc0c395698fcf9423ff (diff)
Btrfs: detect wether a device supports discard
commit d5e2003c2bcda93a8f2e668eb4642d70c9c38301 upstream. We have a problem where if a user specifies discard but doesn't actually support it we will return EOPNOTSUPP from btrfs_discard_extent. This is a problem because this gets called (in a fashion) from the tree log recovery code, which has a nice little BUG_ON(ret) after it, which causes us to fail the tree log replay. So instead detect wether our devices support discard when we're adding them and then don't issue discards if we know that the device doesn't support it. And just for good measure set ret = 0 in btrfs_issue_discard just in case we still get EOPNOTSUPP so we don't screw anybody up like this again. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/jbd2')
0 files changed, 0 insertions, 0 deletions