Re: [PATCH] overlay: add test for copy up of lower file attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 03, 2021 at 10:21:02AM +0300, Amir Goldstein wrote:
> On Tue, Aug 3, 2021 at 2:07 AM Darrick J. Wong <djwong@xxxxxxxxxx> wrote:
> >
> > On Thu, Jul 22, 2021 at 07:46:34PM +0300, Amir Goldstein wrote:
> > > Overlayfs copies up a subset of lower file attributes since kernel
> > > commits:
> > > 173ff5c9ec37 ("ovl: consistent behavior for immutable/append-only inodes")
> > > 2e3f6e87c2b0 ("ovl: copy up sync/noatime fileattr flags")
> > >
> > > This test verifies this functionality works correctly and that it
> > > survives power failure and/or mount cycle.
> >
> > Just out of curiosity -- is this supposed to succeed with a 5.14-rc4
> > kernel?
> 
> No. The documented fix commits are in linux-next.
> Looks like they are heading for 5.15-rc1.
> 
> > I noticed a massive regression with this week's fstests,
> > probably because something didn't get cleaned up properly:
> >
> > --- overlay/078.out
> > +++ overlay/078.out.bad
> > @@ -1,2 +1,17 @@
> >  QA output created by 078
> >  Silence is golden
> > +Before copy up: -------A-------------- /opt/ovl-mnt/testfile
> > +After  copy up: ---------------------- /opt/ovl-mnt/testfile
> > +Before copy up: -------A-------------- /opt/ovl-mnt/testfile
> > +After  copy up: ---------------------- /opt/ovl-mnt/testfile
> > +Before copy up: --S----A-------------- /opt/ovl-mnt/testfile
> > +After  copy up: ---------------------- /opt/ovl-mnt/testfile
> > +Before copy up: --S----A-------------- /opt/ovl-mnt/testfile
> > +After  copy up: ---------------------- /opt/ovl-mnt/testfile
> > +Before copy up: --S--a-A-------------- /opt/ovl-mnt/testfile
> > +After  copy up: ---------------------- /opt/ovl-mnt/testfile
> > +Before copy up: --S--a-A-------------- /opt/ovl-mnt/testfile
> > +After  copy up: ---------------------- /opt/ovl-mnt/testfile
> > +rm: cannot remove '/opt/ovl-upper/testfile': Operation not permitted
> > +rm: cannot remove
> > '/opt/ovl-work/index/00fb2100812f1a30dc474847dbad5281308293ece9030e00020000000054816fd1':
> 
> I'm curious, are you running with non-default mount/config options
> on purpose? i.e. index=on or nfs_export=on?
> 
> > Operation not permitted
> > +Write unexpectedly returned 0 for file with attribute 'i'
> 
> Oops, sorry. The problem is even sooner than _cleanup().
> I hadn't noticed it because the head snippet of 078.out.bad was expected
> and I did not look past it.

./check -r ;)

> 
> >
> > and then the tests after it (e.g. generic/030) fail with:
> >
> > +mount: /opt/ovl-mnt: mount(2) system call failed: Stale file handle.
> > +mount failed
> > +(see /var/tmp/fstests/generic/030.full for details)
> >
> 
> And I hadn't noticed that because overlay/078 is the last test to reuse
> /opt/ovl-upper/ and kvm-xfstests zaps the base fs before every run.
> 
> Posted a fix.
> Sorry for the trouble.

I'll give it a spin overnight.

--D

> Thanks,
> Amir.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux