From: Dave Chinner <david@fromorbit.com>
To: bugzilla-daemon@bugzilla.kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: Re: [Bug 207711] New: xfs: data race on ctx->space_used in xlog_cil_insert_items()
Date: Wed, 13 May 2020 14:07:33 +1000 [thread overview]
Message-ID: <20200513040733.GD2040@dread.disaster.area> (raw)
In-Reply-To: <bug-207711-201763@https.bugzilla.kernel.org/>
On Wed, May 13, 2020 at 02:45:54AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=207711
>
> Bug ID: 207711
> Summary: xfs: data race on ctx->space_used in
> xlog_cil_insert_items()
> Product: File System
> Version: 2.5
> Kernel Version: 5.4
> Hardware: All
> OS: Linux
> Tree: Mainline
> Status: NEW
> Severity: normal
> Priority: P1
> Component: XFS
> Assignee: filesystem_xfs@kernel-bugs.kernel.org
> Reporter: baijiaju1990@gmail.com
> Regression: No
>
> The functions xlog_cil_insert_items() and xlog_cil_push_background() are
> concurrently executed at runtime at the following call contexts:
>
> Thread 1:
> xfs_file_write_iter()
> xfs_file_buffered_aio_write()
> xfs_file_aio_write_checks()
> xfs_vn_update_time()
> xfs_trans_commit()
> __xfs_trans_commit()
> xfs_log_commit_cil()
> xlog_cil_insert_items()
>
> Thread 2:
> xfs_file_write_iter()
> xfs_file_buffered_aio_write()
> xfs_file_aio_write_checks()
> xfs_vn_update_time()
> xfs_trans_commit()
> __xfs_trans_commit()
> xfs_log_commit_cil()
> xlog_cil_push_background()
>
> In xlog_cil_insert_items():
> ctx->space_used += len;
>
> In xlog_cil_push_background():
> if (cil->xc_ctx->space_used < XLOG_CIL_SPACE_LIMIT(log))
Intentionally racy accounting check as it's not critical to be
perfectly accurate here.
Not a bug, please close.
-Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2020-05-13 4:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 2:45 [Bug 207711] New: xfs: data race on ctx->space_used in xlog_cil_insert_items() bugzilla-daemon
2020-05-13 4:07 ` Dave Chinner [this message]
2020-05-13 4:07 ` [Bug 207711] " bugzilla-daemon
2020-05-13 8:00 ` bugzilla-daemon
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=20200513040733.GD2040@dread.disaster.area \
--to=david@fromorbit.com \
--cc=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-xfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).