All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: linux-block@vger.kernel.org
Cc: Martijn Coenen <maco@android.com>, Christoph Hellwig <hch@lst.de>,
	Jens Axboe <axboe@kernel.dk>,
	ltp@lists.linux.it, Cyril Hrubis <chrubis@suse.cz>
Subject: Ocassional dropping of uevent of loop device (possible race)
Date: Tue, 27 Oct 2020 19:49:26 +0100	[thread overview]
Message-ID: <20201027184926.GA24024@dell5510> (raw)

Hi

commit 716ad0986cbd ("loop: Switch to set_capacity_revalidate_and_notify()")
from v5.8-rc1 caused occasional dropping of uevent of attached or detached loop
device (not sure which one). The only difference is that
set_capacity_revalidate_and_notify() has condition:
if (capacity != size && capacity != 0 && size != 0)
thus notification is not triggered here but in a different part of code.

It was found with LTP test uevent01 [1]:

# i=0; while true; do i=$((i+1)); echo "== $i =="; rmmod -f loop; ./uevent01 || break; done

It looks to be a race. Usually ~ 10 loops is enough.

Kind regards,
Petr

WARNING: multiple messages have this Message-ID (diff)
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] Ocassional dropping of uevent of loop device (possible race)
Date: Tue, 27 Oct 2020 19:49:26 +0100	[thread overview]
Message-ID: <20201027184926.GA24024@dell5510> (raw)

Hi

commit 716ad0986cbd ("loop: Switch to set_capacity_revalidate_and_notify()")
from v5.8-rc1 caused occasional dropping of uevent of attached or detached loop
device (not sure which one). The only difference is that
set_capacity_revalidate_and_notify() has condition:
if (capacity != size && capacity != 0 && size != 0)
thus notification is not triggered here but in a different part of code.

It was found with LTP test uevent01 [1]:

# i=0; while true; do i=$((i+1)); echo "== $i =="; rmmod -f loop; ./uevent01 || break; done

It looks to be a race. Usually ~ 10 loops is enough.

Kind regards,
Petr

             reply	other threads:[~2020-10-27 18:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 18:49 Petr Vorel [this message]
2020-10-27 18:49 ` [LTP] Ocassional dropping of uevent of loop device (possible race) Petr Vorel
2020-10-27 19:25 ` Cyril Hrubis
2020-10-27 19:25   ` [LTP] " Cyril Hrubis

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=20201027184926.GA24024@dell5510 \
    --to=pvorel@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=chrubis@suse.cz \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=ltp@lists.linux.it \
    --cc=maco@android.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 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.