[Top] [All Lists]

Re: [PATCH v2 3/3] xfs: allow linkat() on O_TMPFILE files

To: Zhi Yong Wu <zwu.kernel@xxxxxxxxx>
Subject: Re: [PATCH v2 3/3] xfs: allow linkat() on O_TMPFILE files
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 24 Dec 2013 11:55:36 +1100
Cc: xfs@xxxxxxxxxxx, Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1387326161-24530-4-git-send-email-zwu.kernel@xxxxxxxxx>
References: <1387326161-24530-1-git-send-email-zwu.kernel@xxxxxxxxx> <1387326161-24530-4-git-send-email-zwu.kernel@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Dec 18, 2013 at 08:22:41AM +0800, Zhi Yong Wu wrote:
> From: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
> The VFS allows an anonymous temporary file to be named at a later
> time via a linkat() syscall. The inodes for O_TMPFILE files are
> are marked with a special flag I_LINKABLE and have a zero link count.
> To support this in XFS, xfs_link() detects if this flag I_LINKABLE
> is set and behaves appropriately when detected. So in this case,
> its transaciton reservation takes into account the additional
> overhead of removing the inode from the unlinked list. Then the
> inode is removed from the unlinked list and the directory entry
> is added. Finally its link count is bumped accordingly.
> Signed-off-by: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>

Looks good.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

Dave Chinner

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