From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: James Simmons <jsimmons@infradead.org>
Cc: devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>,
Alex Zhuravlev <alexey.zhuravlev@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>
Subject: Re: [PATCH 13/14] staging: lustre: llog: limit file size of plain logs
Date: Fri, 24 Feb 2017 17:59:10 +0100 [thread overview]
Message-ID: <20170224165910.GB9990@kroah.com> (raw)
In-Reply-To: <1487454435-4895-14-git-send-email-jsimmons@infradead.org>
On Sat, Feb 18, 2017 at 04:47:14PM -0500, James Simmons wrote:
> From: Alex Zhuravlev <alexey.zhuravlev@intel.com>
>
> on small filesystems plain log can grow dramatically. especially
> given large record sizes produced by DNE and extended chunksize.
> I saw >50% of space consumed by a single llog file which was still
> in use. this leads to test failures (sanityn, etc).
> the patch introduces additional limit on plain llog size, which
> is calculated as <free space>/64 (128MB at most) at llog creation
> time.
>
> Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6838
> Reviewed-on: https://review.whamcloud.com/18028
> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
> Reviewed-by: wangdi <di.wang@intel.com>
> Reviewed-by: Mike Pershin <mike.pershin@intel.com>
> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
> Signed-off-by: James Simmons <jsimmons@infradead.org>
> ---
> drivers/staging/lustre/lustre/obdclass/llog.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c
> index 83c5b62..320ff6b 100644
> --- a/drivers/staging/lustre/lustre/obdclass/llog.c
> +++ b/drivers/staging/lustre/lustre/obdclass/llog.c
> @@ -319,10 +319,26 @@ static int llog_process_thread(void *arg)
> * the case and re-read the current chunk
> * otherwise.
> */
> + int records;
> +
> if (index > loghandle->lgh_last_idx) {
> rc = 0;
> goto out;
> }
> + /* <2 records means no more records
> + * if the last record we processed was
> + * the final one, then the underlying
> + * object might have been destroyed yet.
> + * we better don't access that..
> + */
> + mutex_lock(&loghandle->lgh_hdr_mutex);
> + records = loghandle->lgh_hdr->llh_count;
> + mutex_unlock(&loghandle->lgh_hdr_mutex);
> + if (records <= 1) {
> + rc = 0;
> + goto out;
> + }
So you now use the lock, in only one place, when reading a single value?
That makes no sense, it's obviously wrong, or not needed.
Please fix up these two patches...
thanks,
greg k-h
next prev parent reply other threads:[~2017-02-24 16:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-18 21:47 [PATCH 00/14] staging: lustre: missing fixes from lustre 2.8 James Simmons
2017-02-18 21:47 ` [PATCH 01/14] staging: lustre: llite: lower message level for ll_setattr_raw() James Simmons
2017-02-18 21:47 ` [PATCH 02/14] staging: lustre: llite: omit to update wire data James Simmons
2017-02-18 21:47 ` [PATCH 03/14] staging: lustre: osc: remove obsolete asserts James Simmons
2017-02-18 21:47 ` [PATCH 04/14] staging: lustre: lov: cleanup when cl_io_iter_init() fails James Simmons
2017-02-18 21:47 ` [PATCH 05/14] staging: lustre: ldlm: handle ldlm lock cancel race when evicting client James Simmons
2017-02-18 21:47 ` [PATCH 06/14] staging: lustre: osc: further LRU OSC cleanup after eviction James Simmons
2017-02-18 21:47 ` [PATCH 07/14] staging: lustre: lov: trying smaller memory allocations James Simmons
2017-02-18 21:47 ` [PATCH 08/14] staging: lustre: llite: remove extraneous export parameter James Simmons
2017-02-18 21:47 ` [PATCH 09/14] staging: lustre: ldlm: reduce ldlm pool recalc window James Simmons
2017-02-18 21:47 ` [PATCH 10/14] staging: lustre: ldlm: disconnect speedup James Simmons
2017-02-18 21:47 ` [PATCH 11/14] staging: lustre: ldlm: fix race of starting bl threads James Simmons
2017-02-18 21:47 ` [PATCH 12/14] staging: lustre: llog: change lgh_hdr_lock to mutex James Simmons
2017-02-24 16:58 ` Greg Kroah-Hartman
2017-02-18 21:47 ` [PATCH 13/14] staging: lustre: llog: limit file size of plain logs James Simmons
2017-02-24 16:59 ` Greg Kroah-Hartman [this message]
2017-02-25 3:50 ` Oleg Drokin
2017-02-25 4:04 ` Oleg Drokin
2017-02-18 21:47 ` [PATCH 14/14] staging: lustre: lprocfs: move lprocfs_stats_[un]lock to a source file James Simmons
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=20170224165910.GB9990@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=alexey.zhuravlev@intel.com \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=jsimmons@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.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