diff options
author | Filipe Manana <[email protected]> | 2019-03-26 10:49:56 +0000 |
---|---|---|
committer | David Sterba <[email protected]> | 2019-03-28 18:10:27 +0100 |
commit | f35f06c35560a86e841631f0243b83a984dc11a9 (patch) | |
tree | 5be85f835ef5e28c2e42db529d8e6c99ed12e08b /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 0ccc3876e4b2a1559a4dbe3126dda4459d38a83b (diff) |
Btrfs: do not allow trimming when a fs is mounted with the nologreplay option
Whan a filesystem is mounted with the nologreplay mount option, which
requires it to be mounted in RO mode as well, we can not allow discard on
free space inside block groups, because log trees refer to extents that
are not pinned in a block group's free space cache (pinning the extents is
precisely the first phase of replaying a log tree).
So do not allow the fitrim ioctl to do anything when the filesystem is
mounted with the nologreplay option, because later it can be mounted RW
without that option, which causes log replay to happen and result in
either a failure to replay the log trees (leading to a mount failure), a
crash or some silent corruption.
Reported-by: Darrick J. Wong <[email protected]>
Fixes: 96da09192cda ("btrfs: Introduce new mount option to disable tree log replay")
CC: [email protected] # 4.9+
Reviewed-by: Nikolay Borisov <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions