All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Eddie Horng <eddiehorng.tw@gmail.com>
Cc: Trond Myklebust <trondmy@primarydata.com>,
	"bfields@fieldses.org" <bfields@fieldses.org>,
	"miklos@szeredi.hu" <miklos@szeredi.hu>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	"jlayton@kernel.org" <jlayton@kernel.org>
Subject: Re: readdir returns d_type=DT_UNKNOWN to overlay exported dir (NFSv3)
Date: Fri, 16 Mar 2018 11:50:40 +0200	[thread overview]
Message-ID: <CAOQ4uxjHnO+zw4TVXD78WM6nw3VXfUjN0ReKo7PGS98zT9FuaQ@mail.gmail.com> (raw)
In-Reply-To: <CALLuPvoQv5SpqXZ8RG4aagce7qZ4uscLiHT2LCYfwrR4_qySzQ@mail.gmail.com>

On Fri, Mar 16, 2018 at 10:06 AM, Eddie Horng <eddiehorng.tw@gmail.com> wrote:
> 2018-03-16 15:23 GMT+08:00 Amir Goldstein <amir73il@gmail.com>:
[...]
>>> Hi Amir,
>>> The patch works like a charm in my first test, but when I switch lower
>>> layer to different fs then upper and merged, problem comes again. The
>>
>> Yes, that is expected. As I explained, overlayfs does NOT guaranty consistency
>> of d_ino to st_ino with non-samefs and this patch doesn't change that.
>> Apparently, the consequence is that with NFSv3 you will get DT_UNKNOWN.
>>
>> If this is really a problem for your use case, I have already posted a solution
>> for non-samefs while back https://github.com/amir73il/linux/commits/ovl-xino
>> I can rebase and re-post if you are interested in testing.
>> Can I assume from your test example that you are interested in the setup of
>> ext4 as upper/lower (but non samefs)? Because solving the problem for ext4
>> (32bit ino) is a bit simpler than the general case (64bit ino).
>>
>> Thanks,
>> Amir.
>
> My setup for upper is ext4, lower however is a proprietary fs, whose
> ino is 32bit.
> So far it has identical behavior as ext4 to work with overlay. I'm
> glad to test if the solution works
> for ext4 or the proprietary fs.
> In the other hand, I also try to submit a request to Google to see if
> the build tool can handle
> DT_UNKNOWN properly, after all the application use d_type should do that.
>

Eddie,

I rebased and push branch ovl-xino [1] to my github, it includes the
fix you already
tested.

If your proprietary filesystem does not implement the operation encode_fh()
and uses the default 32INO encoding then you don't have to specify any new
mount option. If it implements its own file handle encoding, you need to specify
overlay mount option -o xino to declare that all inode numbers are
limited to 32bit
(or at least not using 64bit).

Cheers,
Amir.

[1] https://github.com/amir73il/linux/commits/ovl-xino

  reply	other threads:[~2018-03-16  9:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  8:42 readdir returns d_type=DT_UNKNOWN to overlay exported dir (NFSv3) Eddie Horng
2018-03-14  9:56 ` Amir Goldstein
2018-03-14 11:02 ` Jeff Layton
2018-03-14 14:16   ` Trond Myklebust
2018-03-14 14:30     ` Jeff Layton
2018-03-14 15:03       ` Amir Goldstein
2018-03-14 15:06         ` Trond Myklebust
2018-03-14 15:14           ` Amir Goldstein
2018-03-14 15:40             ` Eddie Horng
2018-03-15  9:23               ` Eddie Horng
2018-03-15  9:47 ` Eddie Horng
2018-03-15 13:13   ` Amir Goldstein
2018-03-15 13:22     ` Trond Myklebust
2018-03-15 14:30       ` Eddie Horng
2018-03-15 18:40         ` Amir Goldstein
2018-03-15 21:48           ` Amir Goldstein
2018-03-16  6:25             ` Eddie Horng
2018-03-16  7:23               ` Amir Goldstein
2018-03-16  8:06                 ` Eddie Horng
2018-03-16  9:50                   ` Amir Goldstein [this message]
2018-03-16 15:06                     ` Eddie Horng
2018-03-16 15:28                       ` Amir Goldstein

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=CAOQ4uxjHnO+zw4TVXD78WM6nw3VXfUjN0ReKo7PGS98zT9FuaQ@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=bfields@fieldses.org \
    --cc=eddiehorng.tw@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=trondmy@primarydata.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.