All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH] overlay/071: Fix undefined OVL_BASE_SCRATCH_DIR
Date: Wed, 30 Sep 2020 22:05:18 +0800	[thread overview]
Message-ID: <5F74909E.6040400@cn.fujitsu.com> (raw)
In-Reply-To: <CAOQ4uxhXBbmAiGpiAx8=3TiFi-Or+dfEgET5rHwBTYFd+df1Zg@mail.gmail.com>

On 2020/9/30 15:54, Amir Goldstein wrote:
> On Wed, Sep 30, 2020 at 8:33 AM Xiao Yang<yangx.jy@cn.fujitsu.com>  wrote:
>> Hi Amir,
>>
>> I always got diffenent inode number if underlying fileystem is ext4.
>> ------------------------------------------------
>> # diff -u /var/lib/xfstests/tests/overlay/071.out
>> /var/lib/xfstests/results//overlay/071.out.bad
>> --- /var/lib/xfstests/tests/overlay/071.out 2020-09-30
>> 12:59:30.478968816 +0800
>> +++ /var/lib/xfstests/results//overlay/071.out.bad 2020-09-30
>> 13:13:02.342920819 +0800
>> @@ -1,2 +1,26 @@
>> QA output created by 071
>> +--- /tmp/25096.lower.lo 2020-09-30 13:12:59.594920981 +0800
>> ++++ /tmp/25096.before.lo 2020-09-30 13:12:59.706920975 +0800
>> +@@ -1,7 +1,7 @@
>> +-8590721028 file
>> +-8590721029 symlink
>> +-8590721030 link
>> +-8590721031 chrdev
>> +-8590721032 blkdev
>> +-8590721033 fifo
>> +-8590721034 socket
>> ++9223372045445496836 file
>> ++9223372045445496837 symlink
>> ++9223372045445496838 link
>> ++9223372045445496839 chrdev
>> ++9223372045445496840 blkdev
>> ++9223372045445496841 fifo
>> ++9223372045445496842 socket
>> +file not found by ino 8590721028 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> +symlink not found by ino 8590721029 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> +link not found by ino 8590721030 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> +chrdev not found by ino 8590721031 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> +blkdev not found by ino 8590721032 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> +fifo not found by ino 8590721033 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> +socket not found by ino 8590721034 (from /tmp/25096.lower.lo) - see
>> /var/lib/xfstests/results//overlay/071.full
>> Silence is golde
>> ------------------------------------------------
>> Is this expected behavior? :-)
> Yes and No :-)
>
> The result is expected. It is not expected for the test to fail.
> This is a test bug.
>
> The bug is in this line and in the comment above it:
> # Compare inode numbers in lower overlay vs. nested overlay
> # With nested xino lower/lower, all inode numbers overflow xino bits and
> # d_ino/i_ino in nested overlay are the same as in lower overlay.
> check_inode_numbers $lowertestdir $tmp.lower.lo $tmp.before.lo
>
> This test is meant to cover the case of "xino=on/auto, ino overflow" from:
> https://github.com/torvalds/linux/blob/master/Documentation/filesystems/overlayfs.rst#inode-properties
>
> The correct part of the comment is:
> # With nested xino lower, all inode numbers overflow xino bits
> Meaning that all inode numbers at $lowertestdir have the MSB set
> (e.g. file ino 9223372045445496836  = 0x80000002000C0004)
>
> With lower fs xfs, the other part of the comment is also correct:
> # ...and d_ino/i_ino in nested overlay are the same as in lower overlay
>
> Because in the lower overlay ($SCRATCH_MNT/lowertestdir)
> lower files also have the MSB set.
>
> However, because ext4 has a known inode number limit of 32bit
> (see ovl_can_decode_fh) the lower overlay inodes do not have the
> MSB set (e.g. file ino 8590721028 = 0x2000C0004).
>
> Long story short, I think we need to remove this line and comment
> from the test and leave it the same as overlay/070:
>
> # Record inode numbers before copy up
> record_inode_numbers $lowertestdir $tmp.before.lo
> record_inode_numbers $uppertestdir $tmp.before.up
>
> This recording is just for the sake of logging info in 070.full.
Hi Amir,

Thanks a lot for your detailed explanation. :-)
I will spend time to read the related code in kernel.

>> Best Regards,
>> Xiao Yang
>> On 2020/9/30 13:04, Xiao Yang wrote:
>>> Replace undefined OVL_BASE_SCRATCH_DIR with OVL_BASE_SCRATCH_MNT
>>>
>>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
> Reviewed-by: Amir Goldstein<amir73il@gmail.com>
>
> Will you also fix the test bug please.

Sure, I will fix the test bug on a separate patch tomorrow.

Best Regards,
Xiao Yang
> Thanks!
> Amir.
>
>
> .
>




      reply	other threads:[~2020-09-30 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30  5:04 [PATCH] overlay/071: Fix undefined OVL_BASE_SCRATCH_DIR Xiao Yang
2020-09-30  5:32 ` Xiao Yang
2020-09-30  7:54   ` Amir Goldstein
2020-09-30 14:05     ` Xiao Yang [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=5F74909E.6040400@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.org \
    /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.