Go to file
Adam Rutkowski c5a80cc488 Use env_secure_(alloc/free) macro for metadata allocations
Adapter can opt to take additional steps to securely allocate
memory used by OCF to store cache metadata. Typically this would
involve mlocking pages and zeroing memory before deallocation.

Memory allocated using secure_alloc is not expected to be zeroed
or physically continous.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-04-18 17:54:05 -04:00
doc Fix incorrect image paths in HOME.md 2019-03-07 12:39:41 +08:00
env/posix Add secure alloc/free to posix env 2019-04-18 17:53:59 -04:00
example/simple Rename 'printf' field name in logger ops to 'print'. 2019-04-17 11:37:47 -04:00
inc Merge pull request #122 from KamilLepek/security_tests 2019-04-18 07:33:11 +02:00
src Use env_secure_(alloc/free) macro for metadata allocations 2019-04-18 17:54:05 -04:00
tests Merge pull request #127 from arutk/pytest_wait_io 2019-04-18 09:21:50 +02:00
LICENSE Create LICENSE file 2019-01-16 14:54:10 +01:00
Makefile Introduce default POSIX environment 2019-01-10 13:53:44 +01:00
README.md Add examples and build test info to Readme 2019-02-04 11:59:46 +01:00

Open CAS Framework

Open CAS Framework (OCF) is high performance block storage caching meta-library written in C. It's entirely platform and system independent, accessing system API through user provided environment wrappers layer. OCF tightly integrates with the rest of software stack, providing flawless, high performance, low latency caching utility.

In this readme:

Documentation

Doxygen API documentation is available here.
More documentation, tutorial and examples will be available soon.

Source Code

Source code is available in the official OCF GitHub repository:

git clone https://github.com/open-cas/ocf
cd ocf

Deployment

OCF doesn't compile as separate library. It's designed to be included into another software stack. For this purpose OCF provides Makefile with two useful targets for deploying its source into target directories. Assuming OCFDIR is OCF directory, and SRCDIR and INCDIR are respectively your source and include directories, use following commands to deploy OCF into your project:

make -C $OCFDIF src O=$SRCDIR
make -C $OCFDIF inc O=$INCDIR

By default this will not copy OCF source files but create symbolic links to them, to avoid source duplication and allow for easy OCF code modification. If you prefer to copy OCF source files (e.g. you don't want to distribute whole OCF repository as your submodule) you can use following commands:

make -C $OCFDIF src O=$SRCDIR CMD=cp
make -C $OCFDIF inc O=$INCDIR CMD=cp

Examples

OCF is shipped with examples, which are complete, compillable and working programs, containing lot of comments that explain basics of caching. They are great starting point for everyone who wants to start working with OCF.

Examples can be found in directory example/.

Each example contains Makefile which can be used to compile it.

Unit Tests

OCF is shipped with dedicated unit test framework based on Cmocka.
To run unit test you need to install following packages:

  • Cmake (>= 3.8.1)
  • Cmocka (>= 1.1.1)
  • ctags (>= 5.8)

To run unit tests use following command:

./tests/unit/framework/run_unit_tests.py

Build Test

OCF repository contains basic build test. It uses default POSIX environment. To run this test, use following commands:

cd tests/build/
make

Contributing

Feel like making OCF better? Don't hesitate to submit a pull request!
In case of any questions feel free to contact maintainer.