From: Bob Peterson Date: Tue, 13 Feb 2018 15:56:03 -0500 (EST) Subject: [Cluster-devel] [PATCH] gfs2: Fixes to "Implement iomap for block_map" In-Reply-To: <20180205224625.12500-1-agruenba@redhat.com> References: <20180205224625.12500-1-agruenba@redhat.com> Message-ID: <1919798760.3108350.1518555363285.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- | It turns out that commit 3974320ca6 "Implement iomap for block_map" | introduced a few bugs that trigger occasional failures with xfstest | generic/476: | | In gfs2_iomap_begin, we jump to do_alloc when we determine that we are | beyond the end of the allocated metadata (height > ip->i_height). | There, we can end up calling hole_size with a metapath that doesn't | match the current metadata tree, which deosn't make sense. After | untangling the code at do_alloc, fix this by checking if the block we | are looking for is within the range of allocated metadata. | | In addition, add a BUG() in case gfs2_iomap_begin is accidentally called | for reading stuffed files: this is handled separately. Make sure we | don't truncate iomap->length for reads beyond the end of the file; in | that case, the entire range counts as a hole. | | Finally, revert to taking a bitmap write lock when doing allocations. | It's unclear why that change didn't lead to any failures during testing. | | Signed-off-by: Andreas Gruenbacher | --- Hi, Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=49edd5bf429c405b3a7f75503845d9f66a47dd4b Regards, Bob Peterson Red Hat File Systems