summaryrefslogtreecommitdiffstats
path: root/drivers/misc/bh1780gli.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2015-06-15 09:41:16 -0400
committerChris Mason <clm@fb.com>2015-07-29 08:15:25 -0700
commit86557861dfe4f8defde0df40620b97cc60285aa4 (patch)
tree298d8216e934107e6357d76cb81f1d8c2edbc6e2 /drivers/misc/bh1780gli.c
parent4d89d377bbb0e34cd1571b57a984c2326cab69b5 (diff)
downloadop-kernel-dev-86557861dfe4f8defde0df40620b97cc60285aa4.zip
op-kernel-dev-86557861dfe4f8defde0df40620b97cc60285aa4.tar.gz
btrfs: skip superblocks during discard
Btrfs doesn't track superblocks with extent records so there is nothing persistent on-disk to indicate that those blocks are in use. We track the superblocks in memory to ensure they don't get used by removing them from the free space cache when we load a block group from disk. Prior to 47ab2a6c6a (Btrfs: remove empty block groups automatically), that was fine since the block group would never be reclaimed so the superblock was always safe. Once we started removing the empty block groups, we were protected by the fact that discards weren't being properly issued for unused space either via FITRIM or -odiscard. The block groups were still being released, but the blocks remained on disk. In order to properly discard unused block groups, we need to filter out the superblocks from the discard range. Superblocks are located at fixed locations on each device, so it makes sense to filter them out in btrfs_issue_discard, which is used by both -odiscard and FITRIM. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Tested-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'drivers/misc/bh1780gli.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud