Thread (9 messages) 9 messages, 2 authors, 2021-06-28

Re: [PATCH 6/6] btrfs: use the filemap_fdatawrite_wbc helper for delalloc shrinking

From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-06-28 18:13:46
Also in: linux-fsdevel

On 6/28/21 12:50 PM, Christoph Hellwig wrote:
On Mon, Jun 28, 2021 at 11:37:11AM -0400, Josef Bacik wrote:
quoted
sync_inode() has some holes that can cause problems if we're under heavy
ENOSPC pressure.  If there's writeback running on a separate thread
sync_inode() will skip writing the inode altogether.  What we really
want is to make sure writeback has been started on all the pages to make
sure we can see the ordered extents and wait on them if appropriate.
Switch to this new helper which will allow us to accomplish this and
avoid ENOSPC'ing early.
The only other exported user of sync_inode is in btrfs as well.  What
is the difference vs this caller?  Mostly I'd like to kill sync_inode
to reduce the surface of different hooks into the writeback code, and
for something externally callable your new filemap_fdatawrite_wbc
helpers looks nassively preferable of sync_inode /
writeback_single_inode.
Sounds good, if you don't hate this helper I'll go through and clean up all the 
various helpers.  Thanks,

Josef
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help