From: Christoph Hellwig <hch@infradead.org>
To: Anuj Gupta <anuj20.g@samsung.com>
Cc: vincent.fu@samsung.com, anuj1072538@gmail.com, axboe@kernel.dk,
hch@infradead.org, martin.petersen@oracle.com,
linux-block@vger.kernel.org, joshi.k@samsung.com
Subject: Re: [PATCH] block: fix lbmd_guard_tag_type assignment in FS_IOC_GETLBMD_CAP
Date: Tue, 22 Jul 2025 01:45:53 -0700 [thread overview]
Message-ID: <aH9PwbpvMhTMUNl4@infradead.org> (raw)
In-Reply-To: <20250722081911.78327-1-anuj20.g@samsung.com>
On Tue, Jul 22, 2025 at 01:49:11PM +0530, Anuj Gupta wrote:
> + switch (bi->csum_type) {
> + case BLK_INTEGRITY_CSUM_NONE:
> + meta_cap.lbmd_guard_tag_type = LBMD_PI_CSUM_NONE;
> + break;
> + case BLK_INTEGRITY_CSUM_IP:
> + meta_cap.lbmd_guard_tag_type = LBMD_PI_CSUM_IP;
> + break;
> + case BLK_INTEGRITY_CSUM_CRC:
> + meta_cap.lbmd_guard_tag_type = LBMD_PI_CSUM_CRC16_T10DIF;
> + break;
> + case BLK_INTEGRITY_CSUM_CRC64:
> + meta_cap.lbmd_guard_tag_type = LBMD_PI_CSUM_CRC64_NVME;
> + break;
> + default:
> + break;
This should catch and reject invalid values. Otherwise the patch looks
fine.
next prev parent reply other threads:[~2025-07-22 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250722081938epcas5p12a1ee45419754afa2f1c1c9040d519d6@epcas5p1.samsung.com>
2025-07-22 8:19 ` [PATCH] block: fix lbmd_guard_tag_type assignment in FS_IOC_GETLBMD_CAP Anuj Gupta
2025-07-22 8:45 ` Christoph Hellwig [this message]
2025-07-22 8:47 ` Christoph Hellwig
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=aH9PwbpvMhTMUNl4@infradead.org \
--to=hch@infradead.org \
--cc=anuj1072538@gmail.com \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=joshi.k@samsung.com \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=vincent.fu@samsung.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