From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] gfs2: use reservation rgd, not inode rgd for allocating blocks
Date: Mon, 18 Jun 2018 14:17:45 -0400 (EDT) [thread overview]
Message-ID: <849251789.43602062.1529345865779.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1186035137.43601549.1529345828415.JavaMail.zimbra@redhat.com>
Hi,
Before this patch, function gfs2_alloc_blocks used ip->i_rgd as its
starting rgrp for block allocations. In most cases that's correct.
However, whenever an rlist is used, it can change the i_rgd value
for better performance. Therefore, we should always use the
reservation rgd instead. If we don't, the gfs2_rbm_eq function may
not determine that the rgd for allocations is the same as the
reservation, and therefore, the reservation won't be properly
adjusted.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/rgrp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 9958a926cf72..5f695b8de30c 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -2361,7 +2361,7 @@ int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *nblocks,
{
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
struct buffer_head *dibh;
- struct gfs2_rbm rbm = { .rgd = ip->i_rgd, };
+ struct gfs2_rbm rbm = { .rgd = ip->i_res.rs_rbm.rgd, };
unsigned int ndata;
u64 block; /* block, within the file system scope */
int error;
next parent reply other threads:[~2018-06-18 18:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1186035137.43601549.1529345828415.JavaMail.zimbra@redhat.com>
2018-06-18 18:17 ` Bob Peterson [this message]
2018-06-20 19:22 ` [Cluster-devel] [GFS2 PATCH] gfs2: use reservation rgd, not inode rgd for allocating blocks Andreas Gruenbacher
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=849251789.43602062.1529345865779.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 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).