summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2025-11-10 21:18:44 +0000
committerAndreas Gruenbacher <agruenba@redhat.com>2026-03-23 20:55:27 +0100
commitbd67f17718ccb3e99ab834f4d32f848a471e6bbf (patch)
tree8eaa4a472da66c333814c0006d57158e56b46014 /tools/perf/scripts/python
parent2b34a9e760f484a437a768781444da1f67a92768 (diff)
gfs2: Fix data loss during inode evict
When gfs2_evict_inode() is called on an inode with unwritten data in the page cache, the page cache needs to be written before it can be truncated. This doesn't always happen. Fix that by changing gfs2_evict_inode() to always either call evict_linked_inode() or evict_unlinked_inode(). Inside evict_unlinked_inode(), first check if the inode is dirty. If it is, make sure the inode glock is held and write back the data and metadata. If it isn't, skip those steps. Also, make sure that gfs2_evict_inode() calls gfs2_evict_inode() and evict_unlinked_inode() only if ip->i_gl is not NULL; this avoids unnecessary complications there. Fixes xfstest generic/211. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions