From: Christoph Hellwig <hch@lst.de>
To: stable@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, Zorro Lang <zlang@redhat.com>,
"Darrick J . Wong" <darrick.wong@oracle.com>
Subject: [PATCH 16/23] xfs: bad assertion for delalloc an extent that start at i_size
Date: Sat, 3 Jun 2017 15:15:04 +0200 [thread overview]
Message-ID: <20170603131511.25032-17-hch@lst.de> (raw)
In-Reply-To: <20170603131511.25032-1-hch@lst.de>
From: Zorro Lang <zlang@redhat.com>
commit 892d2a5f705723b2cb488bfb38bcbdcf83273184 upstream.
By run fsstress long enough time enough in RHEL-7, I find an
assertion failure (harder to reproduce on linux-4.11, but problem
is still there):
XFS: Assertion failed: (iflags & BMV_IF_DELALLOC) != 0, file: fs/xfs/xfs_bmap_util.c
The assertion is in xfs_getbmap() funciton:
if (map[i].br_startblock == DELAYSTARTBLOCK &&
--> map[i].br_startoff <= XFS_B_TO_FSB(mp, XFS_ISIZE(ip)))
ASSERT((iflags & BMV_IF_DELALLOC) != 0);
When map[i].br_startoff == XFS_B_TO_FSB(mp, XFS_ISIZE(ip)), the
startoff is just at EOF. But we only need to make sure delalloc
extents that are within EOF, not include EOF.
Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_bmap_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
index 9581e90fd559..70fbecbb2845 100644
--- a/fs/xfs/xfs_bmap_util.c
+++ b/fs/xfs/xfs_bmap_util.c
@@ -717,7 +717,7 @@ xfs_getbmap(
* extents.
*/
if (map[i].br_startblock == DELAYSTARTBLOCK &&
- map[i].br_startoff <= XFS_B_TO_FSB(mp, XFS_ISIZE(ip)))
+ map[i].br_startoff < XFS_B_TO_FSB(mp, XFS_ISIZE(ip)))
ASSERT((iflags & BMV_IF_DELALLOC) != 0);
if (map[i].br_startblock == HOLESTARTBLOCK &&
--
2.11.0
next prev parent reply other threads:[~2017-06-03 13:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-03 13:14 4.11-stable updates for XFS Christoph Hellwig
2017-06-03 13:14 ` [PATCH 01/23] xfs: use dedicated log worker wq to avoid deadlock with cil wq Christoph Hellwig
2017-06-03 13:14 ` [PATCH 02/23] xfs: fix over-copying of getbmap parameters from userspace Christoph Hellwig
2017-06-03 13:14 ` [PATCH 03/23] xfs: actually report xattr extents via iomap Christoph Hellwig
2017-06-03 13:14 ` [PATCH 04/23] xfs: drop iolock from reclaim context to appease lockdep Christoph Hellwig
2017-06-03 13:14 ` [PATCH 05/23] xfs: fix integer truncation in xfs_bmap_remap_alloc Christoph Hellwig
2017-06-03 13:14 ` [PATCH 06/23] xfs: handle array index overrun in xfs_dir2_leaf_readbuf() Christoph Hellwig
2017-06-03 13:14 ` [PATCH 07/23] xfs: prevent multi-fsb dir readahead from reading random blocks Christoph Hellwig
2017-06-03 13:14 ` [PATCH 08/23] xfs: fix up quotacheck buffer list error handling Christoph Hellwig
2017-06-03 13:14 ` [PATCH 09/23] xfs: support ability to wait on new inodes Christoph Hellwig
2017-06-03 13:14 ` [PATCH 10/23] xfs: update ag iterator to support " Christoph Hellwig
2017-06-03 13:14 ` [PATCH 11/23] xfs: wait on new inodes during quotaoff dquot release Christoph Hellwig
2017-06-03 13:15 ` [PATCH 12/23] xfs: reserve enough blocks to handle btree splits when remapping Christoph Hellwig
2017-06-03 13:15 ` [PATCH 13/23] xfs: fix use-after-free in xfs_finish_page_writeback Christoph Hellwig
2017-06-03 13:15 ` [PATCH 14/23] xfs: fix indlen accounting error on partial delalloc conversion Christoph Hellwig
2017-06-03 13:15 ` [PATCH 15/23] xfs: BMAPX shouldn't barf on inline-format directories Christoph Hellwig
2017-06-03 13:15 ` Christoph Hellwig [this message]
2017-06-03 13:15 ` [PATCH 17/23] xfs: xfs_trans_alloc_empty Christoph Hellwig
2017-06-03 13:15 ` [PATCH 18/23] xfs: avoid mount-time deadlock in CoW extent recovery Christoph Hellwig
2017-06-03 13:15 ` [PATCH 19/23] xfs: fix unaligned access in xfs_btree_visit_blocks Christoph Hellwig
2017-06-03 13:15 ` [PATCH 20/23] xfs: fix off-by-one on max nr_pages in xfs_find_get_desired_pgoff() Christoph Hellwig
2017-06-03 13:15 ` [PATCH 21/23] xfs: Fix missed holes in SEEK_HOLE implementation Christoph Hellwig
2017-06-03 13:15 ` [PATCH 22/23] xfs: Fix off-by-in in loop termination in xfs_find_get_desired_pgoff() Christoph Hellwig
2017-06-03 13:15 ` [PATCH 23/23] iomap_dio_rw: Prevent reading file data beyond iomap_dio->i_size Christoph Hellwig
2017-06-05 15:08 ` 4.11-stable updates for XFS Greg KH
-- strict thread matches above, loose matches on Subject: below --
2017-06-03 13:10 Christoph Hellwig
2017-06-03 13:10 ` [PATCH 16/23] xfs: bad assertion for delalloc an extent that start at i_size Christoph Hellwig
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=20170603131511.25032-17-hch@lst.de \
--to=hch@lst.de \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=zlang@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).