mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@linux-foundation.org
Cc: David Howells <dhowells@redhat.com>,
	Hou Tao <houtao@huaweicloud.com>,
	Jeff Layton <jlayton@kernel.org>,
	Jingbo Xu <jefflexu@linux.alibaba.com>,
	houtao1@huawei.com, linux-cachefs@redhat.com,
	linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [GIT PULL] fscache: Fix incorrect mixing of wake/wait and missing barriers
Date: Mon, 30 Jan 2023 13:04:43 +0000	[thread overview]
Message-ID: <3425804.1675083883@warthog.procyon.org.uk> (raw)

Hi Linus,

Could you pull these fixes from Hou Tao please?  There are two problems
fixed in fscache volume handling:

 (1) wake_up_bit() is incorrectly paired with wait_var_event().  The latter
     selects the waitqueue to use differently.

 (2) Missing barriers ordering between state bit and task state.

Thanks,
David

To quote Hou Tao:

    The patchset includes two fixes for fscache volume operations: patch 1
    fixes the hang problem during volume acquisition when the volume
    acquisition process waits for the freeing of relinquished volume, patch
    2 adds the missing memory barrier in fscache_create_volume_work() and it
    is spotted through code review when checking whether or not these is
    missing smp_mb() before invoking wake_up_bit().

    Change Log:
    v3:
     * Use clear_and_wake_up_bit() helper (Suggested by Jingbo Xu)
     * Tidy up commit message and add Reviewed-by tag

    v2: https://listman.redhat.com/archives/linux-cachefs/2022-December/007402.html
     * rebased on v6.1-rc1
     * Patch 1: use wait_on_bit() instead (Suggested by David)
     * Patch 2: add the missing smp_mb() in fscache_create_volume_work()

    v1: https://listman.redhat.com/archives/linux-cachefs/2022-December/007384.html

Link: https://lore.kernel.org/r/20230113115211.2895845-1-houtao@huaweicloud.com
---
The following changes since commit 6d796c50f84ca79f1722bb131799e5a5710c4700:

  Linux 6.2-rc6 (2023-01-29 13:59:43 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/fscache-fixes-20230130

for you to fetch changes up to 3288666c72568fe1cc7f5c5ae33dfd3ab18004c8:

  fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work() (2023-01-30 12:51:54 +0000)

----------------------------------------------------------------
fscache fixes

----------------------------------------------------------------
Hou Tao (2):
      fscache: Use wait_on_bit() to wait for the freeing of relinquished volume
      fscache: Use clear_and_wake_up_bit() in fscache_create_volume_work()

 fs/fscache/volume.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)


             reply	other threads:[~2023-01-30 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 13:04 David Howells [this message]
2023-01-31  1:38 ` pr-tracker-bot

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=3425804.1675083883@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=houtao1@huawei.com \
    --cc=houtao@huaweicloud.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=jlayton@kernel.org \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®