xfs
[Top] [All Lists]

Re: [PATCH 15/19] mkfs: don't treat files as though they are block devic

To: xfs@xxxxxxxxxxx
Subject: Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 20 Apr 2016 12:53:11 -0400
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CACj3i73jk5HjRuRRF7hnX0WoOv0amq-CduAwoHbhoT-=+hTREA@xxxxxxxxxxxxxx>
References: <1458818136-56043-1-git-send-email-jtulak@xxxxxxxxxx> <1458818136-56043-16-git-send-email-jtulak@xxxxxxxxxx> <5706FA7C.7020103@xxxxxxxxxxx> <CACj3i73JEzCj-4kp3=H9mjXCKYgcOUYCOyq-aZSWZFXUih+0MA@xxxxxxxxxxxxxx> <CACj3i722h=WVW-637__y6fi4EekAxxB=cwL8y+F1r1LFk-Z5rw@xxxxxxxxxxxxxx> <CACj3i71Ff2KS682DRP8zG76ee6rhz3X-NZKst1qsruMZKWaHJA@xxxxxxxxxxxxxx> <CACj3i73jk5HjRuRRF7hnX0WoOv0amq-CduAwoHbhoT-=+hTREA@xxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
On 4/20/16 9:17 AM, Jan Tulak wrote:
> âI'm taking it back, one tests fails, most likely it happened when I
> removed patch 17 - xfsprogs: disable truncating of files. If I do
> "mkfs.xfs $file", it doesn't know the old size to recreate it. I'm
> working on a change for this patch to fix this issue, but I'm not
> entirely certain how to proceed. The right place to get the size
> seems to be get_topology(). I could save it into xi.dsize, but then
> libxfs_init() zeroes it.
> 
> So I think that I might rather convert the measured size do char
> *dsize and pretend that it is an user-given value. But this looks to
> me more like a hack. On the other side, any other way would require
> further changes in the code to convert the char* to int as soon as
> possible - which does not belong to this patch...
...

> So, what do you think about this?
> 
> â And before anyone will reply, I found that putting a
> platform_findsizesâ into libxfs_init will fix it too. Which is nice,
> especially because for block devices, the findsizes is already used
> there. So ignore the previous hack. :-)

Huh - if I take your original patchset and simply remove patch 17,
I don't get any problems with "mkfs.xfs file" for an existing file,
it seems to work fine here.  So it might be something else...

-Eric

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