Skip to content

Instantly share code, notes, and snippets.

@bebosudo
Last active April 11, 2019 13:22
Show Gist options
  • Save bebosudo/08db300d539535e298e938785c483502 to your computer and use it in GitHub Desktop.
Save bebosudo/08db300d539535e298e938785c483502 to your computer and use it in GitHub Desktop.
dirty patch for ior
diff -Naur -x '*.o' -x '*.mod' -x '*.a' -x 'config.*' -x configure -x 'aclocal*' -x depcomp -x external -x .deps -x myabort__genmod.f90 -x missing -x '*Proc' -x libtool -x '*sh' -x 'stamp*' -x 'Makefile*' -x 'autom4te*' -x test-driver ior-3.2.0/src/aiori-POSIX.c ior-3.2.0-lazy/src/aiori-POSIX.c
--- ior-3.2.0/src/aiori-POSIX.c 2018-12-23 05:28:03.000000000 +0100
+++ ior-3.2.0-lazy/src/aiori-POSIX.c 2019-04-11 13:24:57.500951794 +0200
@@ -369,6 +369,11 @@
gpfs_free_all_locks(*fd);
}
#endif
+
+#define CEPH_IOCTL_MAGIC 0x97
+#define CEPH_IOC_LAZYIO _IO(CEPH_IOCTL_MAGIC, 4)
+
+ ioctl(*fd, CEPH_IOC_LAZYIO, 0);
return ((void *)fd);
}
@bebosudo
Copy link
Author

bebosudo commented Apr 11, 2019

To include it in spack, add the following:

    variants('ceph-lazy', default=False, description='open files with CEPH LAZYIO mode')

    patch('https://gist.githubusercontent.com/bebosudo/08db300d539535e298e938785c483502/raw/d1984ac68575a67a41bb64c67850c160bdc5ec78/ior-ceph-lazy-dirty.patch',
          sha256='4fc5d2575406b27ba058d0cd104ae9a992e97a102c2e9d14a632005b7d26d068',
          when='@3.2.0 +ceph-lazy')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment