[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250929075644.338686-1-kartikey406@gmail.com>
Date: Mon, 29 Sep 2025 13:26:43 +0530
From: Deepanshu Kartikey <kartikey406@...il.com>
To: kent.overstreet@...ux.dev
Cc: linux-bcachefs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bcachefs: Fix deadlocks between fallocate and readahead
I found that bchfs_fallocate() only evicts pagecache when FALLOC_FL_ZERO_RANGE is set:
if (mode & FALLOC_FL_ZERO_RANGE) {
ret = bch2_truncate_folios(inode, offset, end);
truncate_pagecache_range(&inode->v, offset, end - 1);
}
So basic fallocate (mode=0 or just KEEP_SIZE) doesn't evict pages and shouldn't need pagecache_block_get().
Should the fix be to only acquire pagecache_block_get() for modes that actually evict (ZERO_RANGE, PUNCH_HOLE, INSERT/COLLAPSE)?
Powered by blists - more mailing lists