mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Quentin Casasnovas <quentin.casasnovas@oracle.com>
To: Miklos Szeredi <mszeredi@redhat.com>
Cc: lkml <linux-kernel@vger.kernel.org>, Al Viro <viro@zeniv.linux.org.uk>
Subject: opening a file on a stacked overlayfs is broken.
Date: Fri, 25 Nov 2016 15:56:04 +0100	[thread overview]
Message-ID: <20161125145604.GG6842@chrystal.oracle.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 991 bytes --]

Hi,

Stacking an overlayfs on top of an overlayfs doens't work when it used to
(tested on v4.9-rc5):

  #!/bin/bash -xeu
  tmpdir=$(mktemp -d)
  pushd ${tmpdir}

  mkdir -p {upper,lower,work}
  echo 'foo' > lower/bar
  mount -t overlay level_zero upper -o lowerdir=lower,upperdir=upper,workdir=work
  cat upper/bar

  tmpdir2=$(mktemp -d)
  pushd ${tmpdir2}

  mkdir -p {upper,work}
  mount -t overlay level_one upper -o lowerdir=${tmpdir}/upper,upperdir=upper,workdir=work
  stat upper/bar  # Works fine
  cat upper/bar   # open() returns ENXIO

I _think_ (I haven't bisected it) the guilty commit is 2d902671ce1c ("vfs:
merge .d_select_inode() into .d_real()"), where vfs_open() -> uses d_real()
with a a NULL inode, which prevents any recursion from happening, when
before d_select_inode() would do the right thing and recurse.

It should be noted this has already been broken and fixed in the past year
in 1c8a47df36d7 ("ovl: fix open in stacked overlay").

Let me know if I can help,
Q

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

             reply	other threads:[~2016-11-25 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 14:56 Quentin Casasnovas [this message]
2016-11-25 17:09 ` [PATCH] ovl: tentative fix for broken vfs_open() on stacked overlayfs Quentin Casasnovas
2016-11-25 19:28   ` Quentin Casasnovas
2016-11-28  9:45     ` Miklos Szeredi
2016-11-28 11:06       ` Quentin Casasnovas

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=20161125145604.GG6842@chrystal.oracle.com \
    --to=quentin.casasnovas@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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

Powered by JetHome