From: Mike Christie <michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
To: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
oren-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH 1/2] libiscsi, iser: Adjust data_length to include protection information
Date: Tue, 03 Jun 2014 11:06:23 -0500 [thread overview]
Message-ID: <538DF27F.50903@cs.wisc.edu> (raw)
In-Reply-To: <1401639581-20111-2-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
On 06/01/2014 11:19 AM, Sagi Grimberg wrote:
>
> +/*
> + * data integrity helpers
> + */
> +static inline unsigned
> +iscsi_prot_len(unsigned data_len, unsigned sector_size)
> +{
> + switch (sector_size) {
> + case 512:
> + return (data_len >> 9) * 8;
> + case 1024:
> + return (data_len >> 10) * 8;
> + case 2048:
> + return (data_len >> 11) * 8;
> + case 4096:
> + return (data_len >> 12) * 8;
> + default:
> + return (data_len >> ilog2(sector_size)) * 8;
> + }
> +}
> #endif
I do not think this should not be in the iscsi code.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-06-03 16:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-01 16:19 [PATCH 0/2] Include protection information in iscsi header Sagi Grimberg
2014-06-01 16:19 ` [PATCH 1/2] libiscsi, iser: Adjust data_length to include protection information Sagi Grimberg
[not found] ` <1401639581-20111-2-git-send-email-sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-06-03 16:06 ` Mike Christie [this message]
[not found] ` <538DF27F.50903-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2014-06-03 22:18 ` Martin K. Petersen
[not found] ` <yq1wqcx3act.fsf-+q57XtR/GgMb6DWv4sQWN6xOck334EZe@public.gmane.org>
2014-06-05 17:29 ` Sagi Grimberg
2014-06-03 16:11 ` Mike Christie
2014-06-05 17:26 ` Sagi Grimberg
2014-06-01 16:19 ` [PATCH 2/2] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire Sagi Grimberg
2014-06-02 16:54 ` Martin K. Petersen
2014-06-05 17:22 ` Sagi Grimberg
2014-06-03 6:16 ` [PATCH 0/2] Include protection information in iscsi header Roland Dreier
2014-06-03 7:56 ` Or Gerlitz
2014-06-05 17:25 ` Sagi Grimberg
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=538DF27F.50903@cs.wisc.edu \
--to=michaelc-hcno3ddehluvc3sceru5cw@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org \
--cc=oren-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).