xfs
[Top] [All Lists]

Re: [PATCH 17/19] xfsprogs: disable truncating of files

To: Jan Tulak <jtulak@xxxxxxxxxx>
Subject: Re: [PATCH 17/19] xfsprogs: disable truncating of files
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 13 Apr 2016 11:25:52 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CACj3i722SbMYzPG9KR6QJJsTVs2Nju6csGKF=+f+PYjbHPYYQA@xxxxxxxxxxxxxx>
References: <1458818136-56043-1-git-send-email-jtulak@xxxxxxxxxx> <1458818136-56043-18-git-send-email-jtulak@xxxxxxxxxx> <20160408000910.GB21804@dastard> <CACj3i73f_v=70pGrrLkRpHB-6UwiOOM2F9Sbu2aZMaJGmBLeiQ@xxxxxxxxxxxxxx> <20160408230843.GE567@dastard> <CACj3i71Grs8deYRtTaGmTmgBTrge-VKQKpn1Azj_y8=KQHWbgg@xxxxxxxxxxxxxx> <570E7129.3080900@xxxxxxxxxxx> <CACj3i722SbMYzPG9KR6QJJsTVs2Nju6csGKF=+f+PYjbHPYYQA@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 4/13/16 11:23 AM, Jan Tulak wrote:
> 
> 
> On Wed, Apr 13, 2016 at 6:17 PM, Eric Sandeen <sandeen@xxxxxxxxxxx 
> <mailto:sandeen@xxxxxxxxxxx>> wrote:
> 
>     On 4/13/16 10:08 AM, Jan Tulak wrote:
> 
>     ...
> 
>     > All rightâ, I will keep the O_TRUNC there. However, should it
>     > truncate the file every time, or should we offer a way how to avoid
>     > the file truncating? Until now, mkfs behaved differently based on
>     > whether -d file was given, or not. Your explanation suggests that we
>     > should truncate every time, right?
> 
>     There are probably valid reasons to keep size as well as to truncate;
>     it's not immediately clear to me how we should handle it.
> 
>     Honestly, at this point, in the interest of getting the other fixes in,
>     I think I might rather see the truncating behavior unchanged from what
>     we have today; we can tackle that as a separate problem at a later date.
> 
>     What do you think?
> 
> âFor keeping the size, the easiest way might be to implicitly set
> xi.dsize (or whatever) to the current size. Of course, after a check
> for -d file,name,size combo. AFAIK (without looking to the code, I'm
> just ending for today and in the middle of shutting everything down
> :-) ), we âdo the truncation after the combo check. So this should be
> no big issue... I will look on this tomorrow, to know better.

I'm just saying; let's not change current behavior without good reason.
If it requires a lot of discussion, let's keep current behavior in all
cases for now, so that we can move the larger patchset forward.

Thanks,
-Eric

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