[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 5/5] xfs: allow linkat() on O_TMPFILE files
From: Zhi Yong Wu <zwu.kernel@xxxxxxxxx>
Date: Sat, 14 Dec 2013 01:36:47 +0800
Cc: xfstests <xfs@xxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>, linux-kernel mlist <linux-kernel@xxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HASRkXwUYu0W1zp7FOlZ6Vj5vhfM16Z9UuOGgR/TuT0=; b=mczNdBNqFBuKa1lZrJNPeaKb7pftNIdnFEyIUEpRdczcDH4v0cYHCnta2ukGvzohSp 2BS1HzhPuCVAmJLlEU5wYNvBgbomewc3Mkm1B2LWj1q2LICbVGMusfIZIqfkYv8NDvlK KYjd4dXyrNJ/SkkX/nr7QuiQzOa9guWBtcCveYemGtxPy7z02/f0/B3HTQsej88Ro4Xk WpftPb1muvIR5pLQBvzm1ssJpBSfIV5T0XJ+7lNXRGM+uH+HNthjlf2phL9XR4bIrltz njoSd55LFDLgBotwqqzX5STBddXttgS8guGV6jjNHPOVZIc70Sud/uBNG9BdarHxDGuo Htgw==
In-reply-to: <20131213164154.GH20803@xxxxxxxxxxxxx>
References: <1386944873-16796-1-git-send-email-zwu.kernel@xxxxxxxxx> <1386944873-16796-6-git-send-email-zwu.kernel@xxxxxxxxx> <20131213164154.GH20803@xxxxxxxxxxxxx>
On Sat, Dec 14, 2013 at 12:41 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Fri, Dec 13, 2013 at 10:27:53PM +0800, Zhi Yong Wu wrote:
>> From: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
>> Enable O_TMPFILE support in linkat().
>> For more info, please refer to:
>>   http://oss.sgi.com/archives/xfs/2013-08/msg00341.html
> Generall you should provide all reasonable information in the changelog
> instead of linking to it.
will apply this, thanks.
>> +     if (sip->i_d.di_nlink == 0)
>> +             tres = &M_RES(mp)->tr_link_tmpfile;
>> +     else
>> +             tres = &M_RES(mp)->tr_link;
> As mentioned before I think Dave wanted you to always use the same
> reservation, but I'll leave that discussion to him.
If as you said, when some tons of regular files are created, it won't
waste some disk space? e.g. some files want to reserve some space, but
get NOSPACE due to other files reserving additional space?

>> +/* For creating a link to an O_TMPFILE inode, except modifying
>> + * those metadata for regular inode, we still need to remove an inode
>> + * from unlinked list at first. That is,  we can modify:
>> + *    the agi hash list and counters: sector size
>> + *    the on disk inode before ours in the agi hash list: inode cluster size
>> + */
> We always have an emptry content
Done, thanks.
> /*
> line at the beginning of comments in XFS and the Linux kernel in
> general.


Zhi Yong Wu

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