]> Git Repo - linux.git/commit - fs/btrfs/ctree.h
Btrfs: adjust btrfs_discard_extent() return errors and trimmed bytes
authorLi Dongyang <[email protected]>
Thu, 24 Mar 2011 10:24:27 +0000 (10:24 +0000)
committerroot <Chris Mason [email protected]>
Mon, 28 Mar 2011 09:37:46 +0000 (05:37 -0400)
commit5378e60734f5b7bfe1b43dc191aaf6131c1befe7
treeb02c78e744a2a148b60a9c8046abef3f4381f544
parentfce3bb9a1bd492793170e117c60d5718b7896af4
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 <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
This page took 0.051703 seconds and 4 git commands to generate.