pfk_fscrypt.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef _PFK_FSCRYPT_H_
  13. #define _PFK_FSCRYPT_H_
  14. #include <linux/types.h>
  15. #include <linux/fs.h>
  16. #include <crypto/ice.h>
  17. #include "pfk_internal.h"
  18. bool pfk_is_fscrypt_type(const struct inode *inode);
  19. int pfk_fscrypt_parse_inode(const struct bio *bio,
  20. const struct inode *inode,
  21. struct pfk_key_info *key_info,
  22. enum ice_cryto_algo_mode *algo,
  23. bool *is_pfe,
  24. const char *storage_type);
  25. bool pfk_fscrypt_allow_merge_bio(const struct bio *bio1,
  26. const struct bio *bio2, const struct inode *inode1,
  27. const struct inode *inode2);
  28. int __init pfk_fscrypt_init(void);
  29. void pfk_fscrypt_deinit(void);
  30. #endif /* _PFK_FSCRYPT_H_ */