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
..
2011-01-12 20:03:43 -05:00
2011-01-12 20:02:45 -05:00
2011-01-12 20:03:42 -05:00
2011-02-25 11:12:37 -08:00
2011-01-07 17:50:26 +11:00
2011-02-21 22:31:47 +00:00
2010-10-29 04:16:28 -04:00
2010-10-29 04:16:28 -04:00
2011-02-11 16:50:47 -06:00
2011-01-07 17:50:26 +11:00
2011-03-03 01:28:17 -05:00
2011-01-07 17:50:26 +11:00
2011-01-14 09:23:36 -08:00
2011-01-12 20:03:42 -05:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-12 20:02:43 -05:00
2011-03-03 01:28:16 -05:00
2011-03-08 19:46:10 -05:00
2010-10-29 04:16:13 -04:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2010-10-29 04:16:31 -04:00
2011-01-07 17:50:26 +11:00
2011-03-03 01:28:16 -05:00
2011-01-07 17:50:26 +11:00
2011-03-03 01:28:40 -05:00
2011-03-03 01:28:16 -05:00
2011-01-13 08:03:12 -08:00
2010-10-29 04:16:28 -04:00
2011-02-02 16:03:19 -08:00
2011-02-02 16:03:19 -08:00
2011-01-07 17:50:27 +11:00
2010-10-28 09:44:56 -07:00
2011-01-13 17:32:32 -08:00
2011-02-24 02:10:57 -05:00
2011-01-07 17:50:33 +11:00