Re: [RFC PATCH] btrfs: don't call btrfs_sync_file from iomap context

Johannes Thumshirn
2020-09-01T14:21:13Z

On 01/09/2020 16:17, Goldwyn Rodrigues wrote:
> This must be applied before calling generic_write_sync() as opposed to
> after so generic_write_sync() can be called with the correct parameters.
> This is required for AIO cases.

Thanks for spotting, will update and retest.

The question I have though is, is this a correct fix or am I papering over
something (hence the RFC tag). Maybe we can relax the time we're under the
inode_lock() a bit so we can avoid this deadlock. David, Josef, Filipe any
comments?