mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 4 of 7] block: bio data integrity support
Date: Wed, 11 Jun 2008 00:05:29 -0400	[thread overview]
Message-ID: <yq1r6b4mx9y.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <x491w359fne.fsf@segfault.boston.devel.redhat.com> (Jeff Moyer's message of "Tue\, 10 Jun 2008 16\:52\:20 -0400")

>>>>> "Jeff" == Jeff Moyer <jmoyer@redhat.com> writes:

>> + memset(bip, 0, sizeof(*bip)); 
>> + idx = 0;

Jeff> That assignment isn't necessary.

Zap!


Jeff>         nr_sectors = (len + bi->tag_size - 1) / bi->tag_size;

Jeff> why not simply use DIV_ROUND_UP?

Fixed.


Jeff> set_tag and get_tag are almost identical.  Any chance you want
Jeff> to factor out that code?

Done.


Jeff> Hmm, up until this point you use bi to mean bio_integrity, but
Jeff> now it means blk_integrity.  Confusion will ensue.  ;)

Err, uhm.  There is no bio_integrity.  There's the bio integrity
payload which I always refer to as struct bip *bip.  And struct
blk_integrity which is always bi.  I'm also anal about using bv for
the data bio_vec and iv for the integrity bio_vec.  I can't see any
place where I'm inconsistent.


Jeff> struct blk_integrity_exchg is not yet defined in your patch set,
Jeff> so this will likely break git bisect.

bio-integrity.patch and blk-integrity.patch are artificially split up
to ease the review process.  They are not meant to be separate
changesets.


>> + buf = kzalloc(len, GFP_NOIO | q->bounce_gfp);

Jeff> Does this actually need to be zeroed?

Nope.


>> +void bio_integrity_advance(struct bio *bio, unsigned int
> +void bio_integrity_trim(struct bio *bio, unsigned int offset, unsigned int sectors)

Jeff> The above two loops look pretty much the same to me.  Can you
Jeff> factor that out to a helper?

I've created helpers for marking head and tail of the ivec.

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2008-06-11  4:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07  4:55 [PATCH 0 of 7] Block/SCSI Data Integrity Support Martin K. Petersen
2008-06-07  4:55 ` [PATCH 1 of 7] lib: Add support for the T10 Data Integrity Field CRC Martin K. Petersen
2008-06-07  4:55 ` [PATCH 2 of 7] block: Globalize bio_set and bio_vec_slab Martin K. Petersen
2008-06-10 18:55   ` Jeff Moyer
2008-06-07  4:55 ` [PATCH 3 of 7] block: Find bio sector offset given idx and offset Martin K. Petersen
2008-06-09 16:07   ` Jeff Moyer
2008-06-09 16:15     ` Martin K. Petersen
2008-06-10 19:02   ` Jeff Moyer
2008-06-07  4:55 ` [PATCH 4 of 7] block: bio data integrity support Martin K. Petersen
2008-06-07 14:45   ` Monakhov Dmitri
2008-06-09 15:05     ` Martin K. Petersen
2008-06-10 20:52   ` Jeff Moyer
2008-06-11  4:05     ` Martin K. Petersen [this message]
2008-06-11 17:41       ` Jeff Moyer
2008-06-07  4:55 ` [PATCH 5 of 7] block: Block/request layer " Martin K. Petersen
2008-06-08  4:27   ` Greg KH
2008-06-09 15:06     ` Martin K. Petersen
2008-06-07  4:55 ` [PATCH 6 of 7] scsi: Support devices with protection information (DIF) Martin K. Petersen
2008-06-07  4:55 ` [PATCH 7 of 7] Support for SCSI disk (SBC) Data Integrity Field Martin K. Petersen
2008-06-10 14:41 ` [PATCH 0 of 7] Block/SCSI Data Integrity Support Jeff Moyer
2008-06-10 15:28   ` Martin K. Petersen
2008-06-10 18:49     ` Jeff Moyer
2008-06-10 20:47       ` Martin K. Petersen
2008-06-10 20:53         ` Jeff Moyer
2008-07-17 13:55     ` Mike Snitzer
2008-07-17 15:35       ` Martin K. Petersen

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=yq1r6b4mx9y.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.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

Powered by JetHome