From: Dave Chinner <dchinner@xxxxxxxxxx> To add O_TMPFILE support, we need to add a new method to the VFS interface. This method does the dentry manipulation and drives the transactional inode allocation and links it to the unlinked inode list. The inode allocation needs new transaction reservations that cover onyl the free inode allocation modifications - it does not need the reservations that cover directory entry additions. With these reservations, we can call the newly factored inode allocation function to get an allocated inode. The final step is to link the inode into the unlinked list on the AGI so that the inode will be freed and reclaimed when it is no longer referenced - that will remove it form the unlinked list at that time. If we crash with the O_TMPFILE still open, log recovery will process the unlinked lists and free it at that point in time. Once the inode is added to the unlinked list, we can commit the transaction and link the inode to the provided dentry and finish initialising the VFS part of the dentry. Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> --- fs/xfs/xfs_iops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 9c20a2c..82ea957 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1082,6 +1082,7 @@ static const struct inode_operations xfs_dir_inode_operations = { .removexattr = generic_removexattr, .listxattr = xfs_vn_listxattr, .update_time = xfs_vn_update_time, + //.tmpfile = xfs_vn_tmpfile, }; static const struct inode_operations xfs_dir_ci_inode_operations = { @@ -1108,6 +1109,7 @@ static const struct inode_operations xfs_dir_ci_inode_operations = { .removexattr = generic_removexattr, .listxattr = xfs_vn_listxattr, .update_time = xfs_vn_update_time, + //.tmpfile = xfs_vn_tmpfile, }; static const struct inode_operations xfs_symlink_inode_operations = { -- 1.8.3.2 _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs