summaryrefslogtreecommitdiff
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2018-07-25 18:45:08 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2018-07-25 22:56:14 +0200
commit776125785a87ff05d49938bd5b9f336f2a05bff6 (patch)
treebba6683dd63e2daa3f0b32d67af0132e3b7aa328 /drivers/clocksource
parentf6753df35c32f17b7abf0de37aa52850ca9733c9 (diff)
gfs2: Special-case rindex for gfs2_grow
To speed up the common case of appending to a file, gfs2_write_alloc_required presumes that writing beyond the end of a file will always require additional blocks to be allocated. This assumption is incorrect for preallocates files, but there are no negative consequences as long as *some* space is still left on the filesystem. One special file that always has some space preallocated beyond the end of the file is the rindex: when growing a filesystem, gfs2_grow adds one or more new resource groups and appends records describing those resource groups to the rindex; the preallocated space ensures that this is always possible. However, when a filesystem is completely full, gfs2_write_alloc_required will indicate that an additional allocation is required, and appending the next record to the rindex will fail even though space for that record has already been preallocated. To fix that, skip the incorrect optimization in gfs2_write_alloc_required, but for the rindex only. Other writes to preallocated space beyond the end of the file are still allowed to fail on completely full filesystems. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'drivers/clocksource')
0 files changed, 0 insertions, 0 deletions