From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Chandan Rajendra <chandan@linux.vnet.ibm.com>,
Vivek Goyal <vgoyal@redhat.com>,
"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>
Subject: Re: [PATCH v7 8/8] ovl: ovl_iterate_real() for all pure upper/lower in non-samefs case
Date: Mon, 6 Nov 2017 15:52:22 +0100 [thread overview]
Message-ID: <CAJfpegu7Rvhgq4NWmn_hJbFcOC_-DT7u006TD4pmwPz97L1xTg@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxjmWUnQfCfpP_MncQSmcy978qj8tBo_pUsS7+3ektpsfg@mail.gmail.com>
On Mon, Nov 6, 2017 at 3:30 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> On Mon, Nov 6, 2017 at 3:57 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>> On Mon, Nov 6, 2017 at 12:45 PM, Amir Goldstein <amir73il@gmail.com> wrote:
>>> On Mon, Nov 6, 2017 at 11:35 AM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>>
>>>> And I'm still hoping we can get some infrastructure for partitioning
>>>> the ino space (i.e. filesystem can report that it will only use N bits
>>>> from the available 64). This would allow properly solving the
>>>> non-samefs case without adding hacks.
>>>>
>>>
>>> Oh! there is a ridiculously simple way for some file systems to know
>>> that they are using 32 bit inodes.
>>> We already call ovl_can_decode_fh() for upper and all lower layers.
>>> All we need to do is actually encode the layer directory and check
>>> returned fh_type.
>>>
>>> If fh_type is FILEID_INO32_GEN, bingo!
>>> That turns out to be true to all file systems that use the default
>>> implementation of .encode_fh, including the ext* family, squashfs
>>> and more.
>>
>> That's good. However testing FILEID_INO32_GEN is not particularly
>> reliable since that constant is defined as "1" and AFAIR there are
>> other uses of "1" as type, just not with this name. And nothing
>> guarantees that all those uses are for 32bit inode numbers, although
>> that may be the case.
>>
>
> Right... although for most fs I mentioned, default .encode_fh *is* in fact
> a guaranty for 32bit inodes, so we can start with that and add explicit
> number of bits to super block later.
>
>> I'd be more happy with an explicit bit count in struct super_block
>> indicating the number of bits in use.
>>
>> Such an interface wouldn't limit filesystem implementors in any way.
>> They'd just be more flexibly declare the needs they have.
>>
>> Also there is possibly a usecase for a large fs (non 32-bit inum) as
>> overlayfs upper layer. I would guess it wouldn't be too difficult to
>> add an "inumbits=N" parameter to mkfs.xfs for that case.
>>
>
> Cannot set inumbits, because they are already determined by fs
> geometry (MSB bits are AG #).
> The good news is that you can always know the max inumbits of
> any existing xfs, so it would be possible for admin to mount overlay
> with mount option upperinumbits=.
Right. That's plenty enough.
> The bad news is that I think any xfs can potentially be grown to
> use all inode bits, so it is unlikely that xfs will be willing to make
> any inumbits commitment in super block besides the already
> supported case of inode32 mount option.
Sure, and I don't think there's a need for xfs to declare an upper
max. What we need is
- xfs reports maximum inum based on *current* size
- overlayfs reports maximum inum allowed for layers based on settings
- inum space mediator ensures that things remain consistent
It may be a bit more complicated than just a single count in super
block, but I don't see any theoretical problems with such an approach.
And we can start with just a count that is either 32 or 64, since that
is what we have now, and it may be enough for some time yet.
Thanks,
Miklos
prev parent reply other threads:[~2017-11-06 14:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 20:38 [PATCH v7 0/8] Overlayfs: constant st_ino/d_ino for non-samefs Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 1/8] ovl: move include of ovl_entry.h into overlayfs.h Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 2/8] ovl: re-structure overlay lower layers in-memory Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 3/8] ovl: allocate anonymous devs for lowerdirs Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 4/8] ovl: return anonymous st_dev for lower inodes Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 5/8] ovl: relax same fs constraint for constant st_ino Amir Goldstein
2017-11-06 20:43 ` Vivek Goyal
2017-11-06 21:06 ` Amir Goldstein
2017-11-06 21:10 ` Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 6/8] ovl: recalc d_ino for dir cache in non-samefs case Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 7/8] ovl: update cache version of impure parent on rename Amir Goldstein
2017-11-06 9:17 ` Miklos Szeredi
2017-11-06 10:06 ` Amir Goldstein
2017-11-06 10:39 ` Miklos Szeredi
2017-11-06 10:59 ` Amir Goldstein
2017-11-02 20:38 ` [PATCH v7 8/8] ovl: ovl_iterate_real() for all pure upper/lower in non-samefs case Amir Goldstein
2017-11-06 9:35 ` Miklos Szeredi
2017-11-06 10:08 ` Amir Goldstein
2017-11-06 10:54 ` Amir Goldstein
2017-11-06 11:45 ` Amir Goldstein
2017-11-06 13:57 ` Miklos Szeredi
2017-11-06 14:30 ` Amir Goldstein
2017-11-06 14:52 ` Miklos Szeredi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJfpegu7Rvhgq4NWmn_hJbFcOC_-DT7u006TD4pmwPz97L1xTg@mail.gmail.com \
--to=miklos@szeredi.hu \
--cc=amir73il@gmail.com \
--cc=chandan@linux.vnet.ibm.com \
--cc=linux-unionfs@vger.kernel.org \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).