linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Satya Tangirala <satyat@google.com>
Cc: linux-scsi@vger.kernel.org, Kim Boojin <boojin.kim@samsung.com>,
	Kuohong Wang <kuohong.wang@mediatek.com>,
	Barani Muthukumaran <bmuthuku@qti.qualcomm.com>,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-block@vger.kernel.org, linux-fscrypt@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH v8 09/11] fscrypt: add inline encryption support
Date: Sun, 15 Mar 2020 10:20:06 -0700	[thread overview]
Message-ID: <20200315172006.GB1055@sol.localdomain> (raw)
In-Reply-To: <20200312080253.3667-10-satyat@google.com>

On Thu, Mar 12, 2020 at 01:02:51AM -0700, Satya Tangirala wrote:
> +int fscrypt_prepare_inline_crypt_key(struct fscrypt_prepared_key *prep_key,
> +				     const u8 *raw_key,
> +				     const struct fscrypt_info *ci)
> +{
> +	const struct inode *inode = ci->ci_inode;
> +	struct super_block *sb = inode->i_sb;
> +	enum blk_crypto_mode_num crypto_mode = ci->ci_mode->blk_crypto_mode;
> +	unsigned int blk_crypto_dun_bytes;

'blk_crypto_dun_bytes' is overly verbose.  'dun_bytes' would still be just as
clear.

This comment also applies to the parameter to blk_crypto_init_key().

> +/**
> + * fscrypt_set_bio_crypt_ctx_bh - prepare a file contents bio for inline
> + *				  encryption
> + * @bio: a bio which will eventually be submitted to the file
> + * @first_bh: the first buffer_head for which I/O will be submitted
> + * @gfp_mask: memory allocation flags
> + *
> + * Same as fscrypt_set_bio_crypt_ctx(), except this takes a buffer_head instead
> + * of an inode and block number directly.
> + */
> +void fscrypt_set_bio_crypt_ctx_bh(struct bio *bio,
> +				 const struct buffer_head *first_bh,
> +				 gfp_t gfp_mask)
> +{
> +	const struct inode *inode;
> +	u64 first_lblk;
> +
> +	if (bh_get_inode_and_lblk_num(first_bh, &inode, &first_lblk))
> +		fscrypt_set_bio_crypt_ctx(bio, inode, first_lblk, gfp_mask);
> +}
> +EXPORT_SYMBOL_GPL(fscrypt_set_bio_crypt_ctx_bh);

Nit: the continuation lines for the function arguments aren't aligned.

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2020-03-15 17:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12  8:02 [f2fs-dev] [PATCH v8 00/11] Inline Encryption Support Satya Tangirala via Linux-f2fs-devel
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 01/11] block: Keyslot Manager for Inline Encryption Satya Tangirala via Linux-f2fs-devel
2020-03-15 20:08   ` Eric Biggers
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 02/11] block: Inline encryption support for blk-mq Satya Tangirala via Linux-f2fs-devel
2020-03-19 11:01   ` Christoph Hellwig
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 03/11] block: Make blk-integrity preclude hardware inline encryption Satya Tangirala via Linux-f2fs-devel
2020-03-15 20:16   ` Eric Biggers
2020-03-19 11:04   ` Christoph Hellwig
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 04/11] block: blk-crypto-fallback for Inline Encryption Satya Tangirala via Linux-f2fs-devel
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 05/11] scsi: ufs: UFS driver v2.1 spec crypto additions Satya Tangirala via Linux-f2fs-devel
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 06/11] scsi: ufs: UFS crypto API Satya Tangirala via Linux-f2fs-devel
2020-03-15 18:24   ` Eric Biggers
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 07/11] scsi: ufs: Add inline encryption support to UFS Satya Tangirala via Linux-f2fs-devel
2020-03-15 18:38   ` Eric Biggers
2020-03-15 18:48   ` Eric Biggers
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 08/11] fs: introduce SB_INLINECRYPT Satya Tangirala via Linux-f2fs-devel
2020-03-15 19:05   ` Eric Biggers
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 09/11] fscrypt: add inline encryption support Satya Tangirala via Linux-f2fs-devel
2020-03-15 17:20   ` Eric Biggers [this message]
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 10/11] f2fs: " Satya Tangirala via Linux-f2fs-devel
2020-03-15 17:16   ` Eric Biggers
2020-03-12  8:02 ` [f2fs-dev] [PATCH v8 11/11] ext4: " Satya Tangirala via Linux-f2fs-devel
2020-03-12 15:43 ` [f2fs-dev] [PATCH v8 00/11] Inline Encryption Support Eric Biggers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200315172006.GB1055@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=bmuthuku@qti.qualcomm.com \
    --cc=boojin.kim@samsung.com \
    --cc=kuohong.wang@mediatek.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=satyat@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).