Skip to contentSkip to conversation

generic: mmap write readonly DAX file

PATCH New Xiong Zhou 1 participant 1 message Sep 29, 2017

lore
Share & tools
lore

Xiong Zhou

author
#0 lore raw

PATCH 1/1 generic: mmap write readonly DAX file

Regression case that one can write to read-only file in a DAX mountpoint.

---

This depends on the new dax group patch.

 .gitignore            |  1 +
 src/Makefile          |  2 +-
 src/t_mmap_write_ro.c | 81 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/461     | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/generic/461.out |  2 ++
 tests/generic/group   |  1 +
 6 files changed, 181 insertions(+), 1 deletion(-)
 create mode 100644 src/t_mmap_write_ro.c
 create mode 100755 tests/generic/461
 create mode 100644 tests/generic/461.out
.gitignore +1 -0
index cfabcb3..ae7ef87 100644
@@ -123,6 +123,7 @@
 /src/t_mmap_dio
 /src/t_mmap_fallocate
 /src/t_mmap_stale_pmd
+/src/t_mmap_write_ro
 /src/t_mmap_writev
 /src/t_mtab
 /src/t_readdir_1
src/Makefile +1 -1
index 7d1306b..3eb25b1 100644
@@ -13,7 +13,7 @@ TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
 	multi_open_unlink dmiperf unwritten_sync genhashnames t_holes \
 	t_mmap_writev t_truncate_cmtime dirhash_collide t_rename_overwrite \
 	holetest t_truncate_self t_mmap_dio af_unix t_mmap_stale_pmd \
-	t_mmap_cow_race t_mmap_fallocate fsync-err
+	t_mmap_cow_race t_mmap_fallocate fsync-err t_mmap_write_ro
 
 LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
 	preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
src/t_mmap_write_ro.c new file +81 -0

81 lines not on this page · raw message

tests/generic/461 new file +95 -0

95 lines not on this page · raw message

tests/generic/461.out new file +2 -0
new file mode 100644
index 0000000..8b1e29c
@@ -0,0 +1,2 @@
+QA output created by 461
+read: Bad address
tests/generic/group +1 -0
index 0d42d54..28df131 100644
@@ -463,3 +463,4 @@
 458 auto quick clone
 459 auto dangerous
 460 auto quick rw
+461 auto quick dax
Signature · 1 line
1.8.3.1