Lines Matching refs:cryptofd
60 int cryptofd; member
156 if (pwrite64(data->cryptofd, data->buffer, info.block_size * data->count, data->offset) <= 0) { in flush_outstanding_data()
277 while ((data.cryptofd = open(crypto_blkdev, O_WRONLY | O_CLOEXEC)) < 0) { in cryptfs_enable_inplace_ext4()
334 close(data.cryptofd); in cryptfs_enable_inplace_ext4()
376 if (pwrite64(priv_dat->cryptofd, priv_dat->buffer, CRYPT_INPLACE_BUFSIZE, offset) <= 0) { in encrypt_one_block_f2fs()
405 data.cryptofd = -1; in cryptfs_enable_inplace_f2fs()
410 if ((data.cryptofd = open64(crypto_blkdev, O_WRONLY | O_CLOEXEC)) < 0) { in cryptfs_enable_inplace_f2fs()
463 close(data.cryptofd); in cryptfs_enable_inplace_f2fs()
472 int realfd, cryptofd; in cryptfs_enable_inplace_full() local
484 if ((cryptofd = open(crypto_blkdev, O_WRONLY | O_CLOEXEC)) < 0) { in cryptfs_enable_inplace_full()
509 if (lseek64(cryptofd, i * CRYPT_SECTOR_SIZE, SEEK_SET) < 0) { in cryptfs_enable_inplace_full()
520 if (unix_write(cryptofd, buf, CRYPT_SECTOR_SIZE) <= 0) { in cryptfs_enable_inplace_full()
545 if (unix_write(cryptofd, buf, CRYPT_INPLACE_BUFSIZE) <= 0) { in cryptfs_enable_inplace_full()
561 if (unix_write(cryptofd, buf, CRYPT_SECTOR_SIZE) <= 0) { in cryptfs_enable_inplace_full()
575 close(cryptofd); in cryptfs_enable_inplace_full()