Skip to content

Commit

Permalink
zil replay while opening dataset (#32)
Browse files Browse the repository at this point in the history
* [GIT#31] zil_replay during open_dataset, flush API, fix for issue in uzfs_close_dataset
  • Loading branch information
vishnuitta authored Feb 7, 2018
1 parent 7d36dee commit f549382
Show file tree
Hide file tree
Showing 13 changed files with 493 additions and 15 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ install:
fi
- cd ../ZoL
- sh autogen.sh
- ./configure --enable-code-coverage=yes
- make cstyle
- if [ $ZFS_BUILD_TAGS = 0 ]; then
./configure --enable-code-coverage=yes --enable-debug --enable-uzfs=yes --with-jemalloc;
make;
Expand All @@ -53,9 +51,7 @@ before_script:
script:
# run ztest and test supported zio backends
- if [ $ZFS_BUILD_TAGS = 0 ]; then
truncate -s 2G /tmp/ztest.1a;
truncate -s 2G /tmp/ztest.2a;
truncate -s 256M /tmp/ztest.log;
sudo mkdir /etc/zfs
travis_wait 60 ./tests/cbtest/gtest/test_uzfs && ./tests/cbtest/script/uzfs_cli.sh && ./cmd/uzfs_test/uzfs_test;
travis_wait 10 ./cmd/ztest/ztest;
truncate -s 100MB /tmp/disk;
Expand All @@ -67,6 +63,7 @@ script:
sudo losetup -d /dev/fake-dev;
sudo rm /dev/fake-dev;
rm /tmp/disk;
travis_wait 10 bash cmd/uzfs_test/uzfs_test_sync.sh cmd/uzfs_test/;
else
if [ $TRAVIS_BRANCH = "zfs-0.7-release" ]; then
travis_wait 100 /usr/share/zfs/zfs-tests.sh -r linux_cstor.run -v;
Expand Down
2 changes: 2 additions & 0 deletions cmd/uzfs_test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/uzfs_test
/uzfs_test_sync
15 changes: 15 additions & 0 deletions cmd/uzfs_test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,18 @@ uzfs_test_LDADD = \
$(top_builddir)/lib/libzfs_core/libzfs_core.la

uzfs_test_LDADD += -lm

sbin_PROGRAMS += uzfs_test_sync

uzfs_test_sync_SOURCES = \
uzfs_test_sync.c

uzfs_test_sync_LDADD = \
$(top_builddir)/lib/libnvpair/libnvpair.la \
$(top_builddir)/lib/libuutil/libuutil.la \
$(top_builddir)/lib/libzpool/libzpool.la \
$(top_builddir)/lib/libzfs/libzfs.la \
$(top_builddir)/lib/libzfs_core/libzfs_core.la

uzfs_test_sync_LDADD += -lm

6 changes: 4 additions & 2 deletions cmd/uzfs_test/uzfs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ unit_test_create_pool_ds(void)
exit(1);
}

uzfs_close_pool(spa, zv);
uzfs_close_dataset(zv);
uzfs_close_pool(spa);
}

static void usage(int num)
Expand Down Expand Up @@ -487,6 +488,7 @@ main(int argc, char **argv)
cv_destroy(&cv);
mutex_destroy(&mtx);

uzfs_close_pool(spa, zv);
uzfs_close_dataset(zv);
uzfs_close_pool(spa);
uzfs_fini();
}
Loading

0 comments on commit f549382

Please sign in to comment.