From f0e3a8b7c74ec4f4b78d1a5e7afe01195f8566f9 Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Fri, 19 Feb 2016 10:21:08 -0800 Subject: [PATCH 1/3] fs: check for features in setattr Signed-off-by: Noah Watkins --- gassy_fs.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gassy_fs.cc b/gassy_fs.cc index 1171cef..062cc25 100644 --- a/gassy_fs.cc +++ b/gassy_fs.cc @@ -571,13 +571,31 @@ int GassyFs::SetAttr(fuse_ino_t ino, FileHandle *fh, struct stat *attr, if (uid && in->i_st.st_uid != uid) return -EPERM; +#ifdef FUSE_SET_ATTR_MTIME_NOW + if (to_set & FUSE_SET_ATTR_MTIME_NOW) + in->i_st.st_mtime = time_now(); + else +#endif if (to_set & FUSE_SET_ATTR_MTIME) in->i_st.st_mtime = attr->st_mtime; +#ifdef FUSE_SET_ATTR_ATIME_NOW + if (to_set & FUSE_SET_ATTR_ATIME_NOW) + in->i_st.st_atime = time_now(); + else +#endif if (to_set & FUSE_SET_ATTR_ATIME) in->i_st.st_atime = attr->st_atime; } +#ifdef FUSE_SET_ATTR_CTIME + if (to_set & FUSE_SET_ATTR_CTIME) { + if (uid && in->i_st.st_uid != uid) + return -EPERM; + in->i_st.st_ctime = attr->st_ctime; + } +#endif + if (to_set & FUSE_SET_ATTR_SIZE) { if (uid) { // not root From 7750a43174519ef212a48f9e38cdad154597b5eb Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Fri, 19 Feb 2016 10:45:51 -0800 Subject: [PATCH 2/3] ci: run bamsort test Signed-off-by: Noah Watkins --- ci/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ci/test.sh b/ci/test.sh index 27adfdf..230132b 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -44,3 +44,7 @@ sudo prove -r ../test/pjd-fstest-20090130-RC/tests/ sudo rm -rf * sudo ../test/git.sh +sudo rm -rf * + +sudo ../test/bamsort.sh +sudo rm -rf * From 274ad7d8e4049501d0c2a826c5edc9f515fa48af Mon Sep 17 00:00:00 2001 From: Noah Watkins Date: Fri, 19 Feb 2016 12:16:42 -0800 Subject: [PATCH 3/3] ci: add samtools dependency Signed-off-by: Noah Watkins --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8daea59..03e4b4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ sudo: required dist: trusty before_install: - sudo apt-get update -qq - - sudo apt-get install -qq libfuse-dev build-essential curl libacl1-dev + - sudo apt-get install -qq libfuse-dev build-essential curl libacl1-dev samtools - sudo usermod -a -G fuse $USER env: - USE_GASNET_EVERYTHING=1