From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Cc: bfoster@redhat.com
Subject: [PATCH 1/6] xfs: fix number of records handling in xfs_iext_split_leaf
Date: Thu, 9 Nov 2017 14:26:51 +0100 [thread overview]
Message-ID: <20171109132656.1649-2-hch@lst.de> (raw)
In-Reply-To: <20171109132656.1649-1-hch@lst.de>
Fix to check the correct value, and remove a duplicate handling of the
uneven record number split algorith,
Reported-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/libxfs/xfs_iext_tree.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_iext_tree.c b/fs/xfs/libxfs/xfs_iext_tree.c
index 00d660dcb05e..85d7f708eafc 100644
--- a/fs/xfs/libxfs/xfs_iext_tree.c
+++ b/fs/xfs/libxfs/xfs_iext_tree.c
@@ -555,16 +555,13 @@ xfs_iext_split_leaf(
int i;
/* for sequential append operations just spill over into the new node */
- if (cur->pos == KEYS_PER_NODE) {
+ if (cur->pos == RECS_PER_LEAF) {
cur->leaf = new;
cur->pos = 0;
*nr_entries = 0;
goto done;
}
- if (nr_keep & 1)
- nr_keep++;
-
for (i = 0; i < nr_move; i++) {
new->recs[i] = leaf->recs[nr_keep + i];
xfs_iext_rec_clear(&leaf->recs[nr_keep + i]);
--
2.14.2
next prev parent reply other threads:[~2017-11-09 13:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 13:26 incore extent b+tree fixups Christoph Hellwig
2017-11-09 13:26 ` Christoph Hellwig [this message]
2017-11-09 13:26 ` [PATCH 2/6] xfs: add some comments to xfs_iext_insert/xfs_iext_insert_node Christoph Hellwig
2017-11-09 13:26 ` [PATCH 3/6] xfs: remove a superflous assignment in xfs_iext_remove_node Christoph Hellwig
2017-11-09 13:26 ` [PATCH 4/6] xfs: trivial indentation fixup for xfs_iext_remove_node Christoph Hellwig
2017-11-09 13:26 ` [PATCH 5/6] xfs: add comments documenting the rebalance algorithm Christoph Hellwig
2017-11-09 13:26 ` [PATCH 6/6] xfs: handle zero entries case in xfs_iext_rebalance_leaf Christoph Hellwig
2017-11-09 14:32 ` incore extent b+tree fixups Brian Foster
2017-11-10 1:11 ` Darrick J. Wong
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=20171109132656.1649-2-hch@lst.de \
--to=hch@lst.de \
--cc=bfoster@redhat.com \
--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).