* Re: [loop] 322c4293ec: xfstests.xfs.049.fail
[not found] <20211219150933.GJ14057@xsang-OptiPlex-9020>
@ 2021-12-19 15:45 ` Tetsuo Handa
2021-12-20 11:58 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Tetsuo Handa @ 2021-12-19 15:45 UTC (permalink / raw)
To: kernel test robot
Cc: Jens Axboe, syzbot, Christoph Hellwig, Jan Kara,
Christoph Hellwig, LKML, Linux Memory Management List, lkp, lkp
On 2021/12/20 0:09, kernel test robot wrote:
> @@ -13,3 +13,5 @@
> --- clean
> --- umount ext2 on xfs
> --- umount xfs
> +!!! umount xfs failed
> +(see /lkp/benchmarks/xfstests/results//xfs/049.full for details)
> ...
> (Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/049.out /lkp/benchmarks/xfstests/results//xfs/049.out.bad' to see the entire diff)
Yes, we know this race condition can happen.
https://lkml.kernel.org/r/16c7d304-60ef-103f-1b2c-8592b48f47c6@i-love.sakura.ne.jp
https://lkml.kernel.org/r/YaYfu0H2k0PSQL6W@infradead.org
Should we try to wait for autoclear operation to complete?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [loop] 322c4293ec: xfstests.xfs.049.fail
2021-12-19 15:45 ` [loop] 322c4293ec: xfstests.xfs.049.fail Tetsuo Handa
@ 2021-12-20 11:58 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2021-12-20 11:58 UTC (permalink / raw)
To: Tetsuo Handa
Cc: kernel test robot, Jens Axboe, syzbot, Christoph Hellwig,
Jan Kara, Christoph Hellwig, LKML, Linux Memory Management List,
lkp, lkp
On Mon 20-12-21 00:45:46, Tetsuo Handa wrote:
> On 2021/12/20 0:09, kernel test robot wrote:
> > @@ -13,3 +13,5 @@
> > --- clean
> > --- umount ext2 on xfs
> > --- umount xfs
> > +!!! umount xfs failed
> > +(see /lkp/benchmarks/xfstests/results//xfs/049.full for details)
> > ...
> > (Run 'diff -u /lkp/benchmarks/xfstests/tests/xfs/049.out /lkp/benchmarks/xfstests/results//xfs/049.out.bad' to see the entire diff)
>
> Yes, we know this race condition can happen.
>
> https://lkml.kernel.org/r/16c7d304-60ef-103f-1b2c-8592b48f47c6@i-love.sakura.ne.jp
> https://lkml.kernel.org/r/YaYfu0H2k0PSQL6W@infradead.org
>
> Should we try to wait for autoclear operation to complete?
So I think we should try to fix this because as Dave writes in the
changelog for a1ecac3b0656 ("loop: Make explicit loop device destruction
lazy") which started all this, having random EBUSY failures (either from
losetup or umount) is annoying and you need to work it around it lots of
unexpected places.
We cannot easily wait for work completion in the loop device code without
reintroducing the deadlock - whole lo_release() is called under
disk->open_mutex which you also need to grab in __loop_clr_fd(). So to
avoid holding backing file busy longer than expected, we could use
task_work instead of ordinary work as I suggested - but you were right that
we need to be somewhat careful and in case we are running in a kthread, we
would still need to offload to a normal work (but in that case we don't
care about delaying file release anyway).
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-20 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20211219150933.GJ14057@xsang-OptiPlex-9020>
2021-12-19 15:45 ` [loop] 322c4293ec: xfstests.xfs.049.fail Tetsuo Handa
2021-12-20 11:58 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox