From: Cyril Hrubis <chrubis@suse.cz>
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] acl_test01: sync after removal of the loop device
Date: Thu, 30 Oct 2014 14:47:25 +0100 [thread overview]
Message-ID: <20141030134723.GD14847@rei.suse.de> (raw)
In-Reply-To: <1413965532-19371-1-git-send-email-stanislav.kholmanskikh@oracle.com>
> If the test is executed on NFS, it may fail with:
>
> /dev/loop0 on /tmpdir/tacl/mount-ext3 type ext3 (rw,acl,user_xattr)
> loop: can't delete device /dev/loop0: No such device or address
> rm: cannot remove `/tmpdir/tacl': Directory not empty
> loop: can't delete device /dev/loop0: No such device or address
> rm: cannot remove `/tmpdir/tacl/.nfs00000000000262fd00000115': Device or resource busy
>
> I suppose that this happens because of kernel commit:
>
> commit a1ecac3b0656a68259927c234e505804d33a7b83
> Author: Dave Chinner <dchinner@redhat.com>
> Date: Fri Sep 28 10:42:23 2012 +0200
>
> loop: Make explicit loop device destruction lazy
>
> To cope with this test case failure I introduced a 'sync'.
> And 'losetup -d' seems to be unnecessary, because of 'umount -d' before it
Hmm, so we umount and detach a filesystem but fail to delete it on NFS
because somebody else (presumbly udev) keeps the refcount there?
If that was the the problem the detach would have failed with EBUSSY
previously and the test would fail to delete the file anyway.
I do not fully understand why we need to do the sync there. The kernel
has changed not to report error on detach when somebody else keeps
working with the loop device and sets AUTOCLEAR flag that detaches the
loop device on last closed filedescriptor that references it. Does NFS
keep special file descriptor that prevents the loop device from being
detached?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2014-10-30 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 8:12 [LTP] [PATCH] acl_test01: sync after removal of the loop device Stanislav Kholmanskikh
2014-10-30 13:47 ` Cyril Hrubis [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=20141030134723.GD14847@rei.suse.de \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox