Thread (13 messages) 13 messages, 3 authors, 2017-08-31

Re: [PATCH 3/4] xfs: test rmapbt updates are correct with insert/collapse range

From: Eryu Guan <hidden>
Date: 2017-08-31 10:28:40
Also in: fstests

On Tue, Aug 29, 2017 at 09:41:02PM -0700, Darrick J. Wong wrote:
quoted hunk ↗ jump to hunk
From: Darrick J. Wong <redacted>

Make sure that we update the rmapbt correctly when we collapse-range a
file and the extents on both sides of the hole can be merged.  We can
construct this pretty trivially with insert-range and write, so test
that too.

Signed-off-by: Darrick J. Wong <redacted>
---
 src/punch-alternating.c |   15 +++++-
 tests/xfs/706           |  127 +++++++++++++++++++++++++++++++++++++++++++++++
 tests/xfs/706.out       |    9 +++
 tests/xfs/group         |    1 
 4 files changed, 150 insertions(+), 2 deletions(-)
 create mode 100755 tests/xfs/706
 create mode 100644 tests/xfs/706.out

diff --git a/src/punch-alternating.c b/src/punch-alternating.c
index 25228cd..281e283 100644
--- a/src/punch-alternating.c
+++ b/src/punch-alternating.c
@@ -24,6 +24,7 @@ int main(int argc, char *argv[])
 	struct stat	s;
 	struct statfs	sf;
 	off_t		offset;
+	off_t		start_offset = 0;
 	int		fd;
 	blksize_t	blksz;
 	off_t		sz;
@@ -33,11 +34,19 @@ int main(int argc, char *argv[])
 	int		size = 1;	/* punch $SIZE blocks ... */
 	int		interval = 2;	/* every $INTERVAL blocks */
 
-	while ((c = getopt(argc, argv, "i:s:")) != EOF) {
+	while ((c = getopt(argc, argv, "i:o:s:")) != EOF) {
Update usage info too?

Otherwise looks fine to me.

Thanks,
Eryu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help