pfk_ecryptfs.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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_ECRYPTFS_H_
  13. #define _PFK_ECRYPTFS_H_
  14. #include <linux/types.h>
  15. #include <linux/fs.h>
  16. #include <linux/init.h>
  17. #include <crypto/ice.h>
  18. #include "pfk_internal.h"
  19. bool pfk_is_ecryptfs_type(const struct inode *inode);
  20. int pfk_ecryptfs_parse_inode(const struct bio *bio,
  21. const struct inode *inode,
  22. struct pfk_key_info *key_info,
  23. enum ice_cryto_algo_mode *algo,
  24. bool *is_pfe,
  25. const char *storage_type);
  26. bool pfk_ecryptfs_allow_merge_bio(const struct bio *bio1,
  27. const struct bio *bio2, const struct inode *inode1,
  28. const struct inode *inode2);
  29. int __init pfk_ecryptfs_init(void);
  30. void pfk_ecryptfs_deinit(void);
  31. #endif /* _PFK_ECRYPTFS_H_ */