From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 10/12] gfs2: Generalize truncate code
Date: Tue, 9 Jan 2018 10:45:59 -0500 (EST) [thread overview]
Message-ID: <423563012.4436271.1515512759210.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171222143507.26680-11-agruenba@redhat.com>
Hi,
----- Original Message -----
| Pull the code for computing the range of metapointers to iterate out of
| gfs2_metapath_ra (for readahead), sweep_bh_for_rgrps (for deallocating
| metapointers within a block), and trunc_dealloc (for walking the
| metadata tree).
|
| In sweep_bh_for_rgrps, move the code for looking up the resource group
| descriptor of the current resource group out of the inner loop. The
| metatype check moves to trunc_dealloc.
|
| Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
| ---
(snip)
| @@ -1229,7 +1216,11 @@ static int sweep_bh_for_rgrps(struct gfs2_inode *ip,
| struct gfs2_holder *rd_gh,
| outside the rgrp we just processed,
| do it all over again. */
| if (current->journal_info) {
| - struct buffer_head *dibh = mp->mp_bh[0];
| + struct buffer_head *dibh;
| +
| + ret = gfs2_meta_inode_buffer(ip, &dibh);
| + if (ret)
| + goto out;
(snip)...
| + brelse(dibh);
I don't understand why you prefer to use gfs2_meta_inode_buffer here
instead of just using the copy we already have in the metapath.
It seems to me this method would be a lot less efficient.
Can you explain?
Regards,
Bob Peterson
Red Hat File Systems
next prev parent reply other threads:[~2018-01-09 15:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 14:34 [Cluster-devel] [PATCH 00/12] gfs2: punch hole Andreas Gruenbacher
2017-12-22 14:34 ` [Cluster-devel] [PATCH 01/12] gfs2: Add gfs2_blk2rgrpd comment and fix incorrect use Andreas Gruenbacher
2017-12-22 14:34 ` [Cluster-devel] [PATCH 02/12] gfs2: Remove pointless BUG_ON Andreas Gruenbacher
2017-12-22 14:34 ` [Cluster-devel] [PATCH 03/12] gfs2: Clean up trunc_start error path Andreas Gruenbacher
2018-01-08 20:12 ` Bob Peterson
2018-01-08 20:50 ` Bob Peterson
2017-12-22 14:34 ` [Cluster-devel] [PATCH 04/12] gfs2: truncate: Remove unnecessary oldsize parameters Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 05/12] gfs2: Remove minor gfs2_journaled_truncate inefficiencies Andreas Gruenbacher
2018-01-09 13:53 ` Bob Peterson
2018-01-09 14:21 ` Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 06/12] gfs2: Clean up {lookup, fillup}_metapath Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 07/12] gfs2: Fix metadata read-ahead during truncate Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 08/12] gfs2: Improve non-recursive delete algorithm Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 09/12] Turn gfs2_block_truncate_page into gfs2_block_zero_range Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 10/12] gfs2: Generalize truncate code Andreas Gruenbacher
2018-01-09 15:45 ` Bob Peterson [this message]
2018-01-09 17:14 ` Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 11/12] gfs2: Turn trunc_dealloc into punch_hole Andreas Gruenbacher
2018-01-12 17:38 ` Andreas Gruenbacher
2017-12-22 14:35 ` [Cluster-devel] [PATCH 12/12] gfs2: Implement fallocate(FALLOC_FL_PUNCH_HOLE) Andreas Gruenbacher
2018-01-16 17:51 ` [Cluster-devel] [PATCH 00/12] gfs2: punch hole Bob Peterson
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=423563012.4436271.1515512759210.JavaMail.zimbra@redhat.com \
--to=rpeterso@redhat.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.