While looking at xfs_change_file_space, I noticed that the transaction
is made synchronous.
ip->i_d.di_flags |= XFS_DIFLAG_PREALLOC;
else if (clrprealloc)
ip->i_d.di_flags &= ~XFS_DIFLAG_PREALLOC;
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
xfs_trans_set_sync(tp); --> Why do we need to make it synchronous ?
error = xfs_trans_commit(tp, 0, NULL);
Why this transaction is made synchronous. I can't think of the scenario
where log will not be able to recover this if it is asynchronous. What
might be the potential reason for making it synchronous ?