History log of /drivers/scsi/sd_dif.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
77dfce076cbd76c04e90abff188d058cdbff78dd 25-Nov-2011 Cong Wang <amwang@redhat.com> scsi: remove the second argument of k[un]map_atomic()

Signed-off-by: Cong Wang <amwang@redhat.com>
/drivers/scsi/sd_dif.c
9354f1b8e6c55c335d1c4fb10d0ae7a041935240 05-Mar-2012 Muthu Kumar <muthu.lkml@gmail.com> floppy/scsi: fix setting of BIO flags

Fix setting bio flags in drivers (sd_dif/floppy).

Signed-off-by: Muthukumar R <muthur@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/scsi/sd_dif.c
495d2b3883682fcd1c3dee3a45e38fd00154ae25 15-Oct-2010 Martin K. Petersen <martin.petersen@oracle.com> block: Make the integrity mapped property a bio flag

Previously we tracked whether the integrity metadata had been remapped
using a request flag. This was fine for low-level retries. However, if
an I/O was redriven by upper layers we would end up remapping again,
causing the retry to fail.

Deprecate the REQ_INTEGRITY flag and introduce BIO_MAPPED_INTEGRITY
which enables filesystems to notify lower layers that the bio in
question has already been remapped.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/drivers/scsi/sd_dif.c
3bf3583b6a49c318f7ed350862d7a217b500e71c 10-Nov-2009 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Return correct error code for DIF

sd_dif.c was not updated to return -EILSEQ, leading to error handling
failures in applications which provide their own integrity metadata (as
opposed to being protected by the block layer functions).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/sd_dif.c
35e1a5d90b66487d754ef2f2dcbf1007f806d921 18-Sep-2009 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Detach DIF from block integrity infrastructure

So far we have only issued DIF commands if CONFIG_BLK_DEV_INTEGRITY is
enabled. However, communication between initiator and target should be
independent of protection information DMA. There are DIF-only host
adapters coming out that will be able to take advantage of this.

Move the relevant DIF bits to sd.c.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/sd_dif.c
c6af404215bab0d333accbb497f835d10cb0050c 18-Sep-2009 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] Deprecate SCSI_PROT_*_CONVERT operations

The checksum format is orthogonal to whether the protection information
is being passed on beyond the HBA or not. It is perfectly valid to use
a non-T10 CRC with WRITE_STRIP and READ_INSERT.

Consequently it no longer makes sense to explicitly refer to the
conversion in the protection operation. Update sd_dif and lpfc
accordingly.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Ihab Hamadi <Ihab.Hamadi@Emulex.Com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
/drivers/scsi/sd_dif.c
83096ebf1263b2c1ee5e653ba37d993d02e3eb7b 07-May-2009 Tejun Heo <tj@kernel.org> block: convert to pos and nr_sectors accessors

With recent cleanups, there is no place where low level driver
directly manipulates request fields. This means that the 'hard'
request fields always equal the !hard fields. Convert all
rq->sectors, nr_sectors and current_nr_sectors references to
accessors.

While at it, drop superflous blk_rq_pos() < 0 test in swim.c.

[ Impact: use pos and nr_sectors accessors ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tested-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Acked-by: Mike Miller <mike.miller@hp.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Clements <paul.clements@steeleye.com>
Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Dario Ballabio <ballabio_dario@emc.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: unsik Kim <donari75@gmail.com>
Cc: Laurent Vivier <Laurent@lvivier.info>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/drivers/scsi/sd_dif.c
5db524bd469290212781e1cb0293b57a7a1c000a 04-Jan-2009 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Correctly handle 6-byte commands with DIX

DIF does not work with 6-byte commands so we previously ignored those
commands when preparing a request. However, DIX does not need
RDPROTECT/WRPROTECT to be set and 6-byte commands are consequently
perfectly valid in host-only mode.

This patch fixes a problem where we would set the wrong DIX operation
when issuing commands to a legacy disk.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c
becce74b8231f8b5e51165e797f6c950d1dbcf67 04-Jan-2009 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: DIF: Fix tagging on platforms with signed char

Switch tag arrays to u8 to prevent problems on platforms with signed
char.

Reported-by: Tim LaBerge <tim.laberge@Quantum.Com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c
10da5181688886758ce162705aaad8131b963e99 04-Jan-2009 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: DIF: Show app tag on error

Add application tag to the output displayed on error.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c
cbdc14459bd7d99d20341ec057b8f4ffab2a7fb6 01-Oct-2008 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Switch kernel printing level for DIF messages

For some reason these messages ended up being printed with KERN_INFO
rendering them invisible to pretty much everyone. Switch to
KERN_NOTICE.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c
9e06688e7d60149cc9ef78ff29515c20186bb418 20-Sep-2008 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Correctly handle all combinations of DIF and DIX

The old detection code couldn't handle all possible combinations of
DIX and DIF. This version does, giving priority to DIX if the
controller is capable.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c
be922f478f430f8fab4db952ffc20c86f23de397 20-Sep-2008 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Always print actual protection_type

Now that we no longer use protection_type as trigger for preparing
protected CDBs we can remove the places that set it to zero. This
allows userland to see which protection type the device is formatted
with regardless of whether the HBA supports DIF or not.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c
af55ff675a8461da6a632320710b050af4366e0c 17-Jul-2008 Martin K. Petersen <martin.petersen@oracle.com> [SCSI] sd: Support for SCSI disk (SBC) Data Integrity Field

Support for controllers and disks that implement DIF protection
information:

- During command preparation the RDPROTECT/WRPROTECT must be set
correctly if the target has DIF enabled.

- READ(6) and WRITE(6) are not supported when DIF is on.

- The controller must be told how to handle the I/O via the
protection operation field in scsi_cmnd.

- Refactor the I/O completion code that extracts failed LBA from the
returned sense data and handle DIF failures correctly.

- sd_dif.c implements the functions required to prepare and complete
requests with protection information attached.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
/drivers/scsi/sd_dif.c