public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <eguan@redhat.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	overlayfs <linux-unionfs@vger.kernel.org>,
	fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH v2 7/7] overlay: test dropping nlink below zero
Date: Wed, 5 Jul 2017 19:29:10 +0800	[thread overview]
Message-ID: <20170705112910.GU23360@eguan.usersys.redhat.com> (raw)
In-Reply-To: <CAOQ4uxgG4x-ZJiewnAwJQiSg9kGYFKz+zfT4seSfy_eMf3RovA@mail.gmail.com>

On Wed, Jul 05, 2017 at 02:17:41PM +0300, Amir Goldstein wrote:
> On Wed, Jul 5, 2017 at 1:09 PM, Eryu Guan <eguan@redhat.com> wrote:
> > On Tue, Jul 04, 2017 at 02:40:34PM +0300, Amir Goldstein wrote:
> >> nlink of overlay inode could be dropped indefinety by adding
> >> un-accounted lower hardlinks underneath a mounted overlay and
> >> trying to remove them.
> >
> > Sorry, I didn't quite follow the hardlink patches, could you please
> > describe what is "accounted/un-accounted" hardlinks and the expected
> > behavior in commit log? And what does "indefinety" mean? I couldn't find
> > it in dictionary.
> >
> 
> Try the typos dictionary ;) I meant indefinitely
> 
> I will try to explain better in change log, but here is the full story:
> 
> The simplest way to understand this test is this:
> Imagine that you have a tool (e.g. xfs_db) with which
> you can add hardlinks, without changing the value of nlink
> stored on-disk for the inode. This is exactly what this test does when
> it adds lower hardlinks underneath a mounted overlay.
> 
> Overlayfs assumes that the lower layer files are not modified
> underneath it and if they do, the documentation says:
> "Changes to the underlying filesystems while part of a mounted overlay
> filesystem are not allowed.  If the underlying filesystem is changed,
> the behavior of the overlay is undefined, though it will not result in
> a crash or deadlock."
> 
> As far as I know, this test cannot crash the kernel, but it does trigger
> the WARN_ON in drop_link() when nlink drops below zero, so it's not
> nice behavior and could possibly results in worse outcomes.

I understand now, thanks! Yeah, it's good to have these in commit log or
comments :)

Thanks,
Eryu

      reply	other threads:[~2017-07-05 11:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 11:40 [PATCH v2 0/7] overlay hardlink tests Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 1/7] overlay/018: re-factor and add to hardlink group Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 2/7] overlay/018: print hardlink content to golden output Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 3/7] overlay/018: test broken hardlinks after mount cycle Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 4/7] overlay/018: test lower hardlinks re-unite on copy up Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 5/7] overlay: test concurrent copy up of lower hardlinks Amir Goldstein
2017-07-05  9:59   ` Eryu Guan
2017-07-05 10:46     ` Amir Goldstein
2017-07-05 11:32       ` Eryu Guan
2017-07-05 11:49         ` Amir Goldstein
2017-07-11 20:23       ` Amir Goldstein
2017-07-12  3:17         ` Eryu Guan
2017-07-12  6:11           ` Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 6/7] overlay: test nlink accounting of overlay hardlinks Amir Goldstein
2017-07-04 11:40 ` [PATCH v2 7/7] overlay: test dropping nlink below zero Amir Goldstein
2017-07-05 10:09   ` Eryu Guan
2017-07-05 11:17     ` Amir Goldstein
2017-07-05 11:29       ` Eryu Guan [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=20170705112910.GU23360@eguan.usersys.redhat.com \
    --to=eguan@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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