Li Dongyang 5378e60734 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 <lidongyang@novell.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-03-28 05:37:46 -04:00
..
2008-09-25 11:04:06 -04:00
2011-03-28 05:37:35 -04:00
2011-03-28 05:37:35 -04:00
2010-12-22 23:15:47 +08:00
2010-12-22 23:15:47 +08:00
2011-03-28 05:37:35 -04:00
2011-03-28 05:37:35 -04:00
2011-03-28 05:37:35 -04:00
2010-05-21 18:31:18 -04:00