xfs
[Top] [All Lists]

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

To: Dave Chinner <david@xxxxxxxxxxxxx>, 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 17:58:45 +0800
Cc: "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>, linux-kernel mlist <linux-kernel@xxxxxxxxxxxxxxx>, xfstests <xfs@xxxxxxxxxxx>
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=qH1QOhuU8JaNOhFgvmuF6U4bwQ/vOAAzZagxYIqXF+Y=; b=G/fHU4xB5O2eg21/npZLwnN12YDfw6pufhLqdHg8dV2FrYvsgewhQbjH0KKUGIHXVa LLyVQCs6QMvEUFld5Y6P6wIVGhiSj2IRXnEUipT0CO+KkYzCfU+H6y676gYx25ILamxI vSE5r2xdoaddO7EOw3QEYHJMRZHZjbI8+aRsPUN5d/H5qU53URAHPuag3roehqU/acsM SDlvki6EdvoaeYXsgm3X0fk4zpyFmOe4w/GQWpVE24TUaR1/sOmQn4ybe2Y98dXungJu RrD6FJpdgk4iP/KbuMI3VwR+9JDkT9GIvXUrZgJ1X9PQf4JWh+MfF8umfp0LVeVroE7I hvcA==
In-reply-to: <20131214081944.GR31386@dastard>
References: <1386944873-16796-1-git-send-email-zwu.kernel@xxxxxxxxx> <1386944873-16796-6-git-send-email-zwu.kernel@xxxxxxxxx> <20131213164154.GH20803@xxxxxxxxxxxxx> <CAEH94LimS8mUCFwmnVi876mG9GB7DWsqG9p1O=R41XJ3-u1NQg@xxxxxxxxxxxxxx> <20131214081944.GR31386@dastard>
On Sat, Dec 14, 2013 at 4:19 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> On Sat, Dec 14, 2013 at 01:36:47AM +0800, Zhi Yong Wu wrote:
>> 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?
>
> This is a log space reservation, not a disk space reservation. End
> either way, what is unused by the transaction is returned to the
> free space pool at the end of the transaction. So for simplicity,
> we should just use the one reservation for the link transaction -
> take whichever is larger at calculation time.
Good explaination, thanks Dave and Christoph. By the way, can you help
check if the log reservation for adding/removing one inode to/from
unlinked list is correct? or  will you check after i post next version
out?

>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@xxxxxxxxxxxxx



-- 
Regards,

Zhi Yong Wu

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