[Top] [All Lists]

Why xfs_change_file_space is synchronous

To: linux-xfs@xxxxxxxxxxx
Subject: Why xfs_change_file_space is synchronous
From: Shailendra Tripathi <stripathi@xxxxxxxxx>
Date: Wed, 22 Mar 2006 18:22:08 +0530
In-reply-to: <20060322045620.319864A53FC7@xxxxxxxxxxxxxxxxxxxxxxx>
References: <20060322045620.319864A53FC7@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)
While looking at xfs_change_file_space, I noticed that the transaction is made synchronous.

        if (setprealloc)
                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 ?


<Prev in Thread] Current Thread [Next in Thread>