I was trying to use scsi_get_lba to get the lba associated with a particular scsi_cmnd. I am able to get proper values when I send I/O through dd or FS. But when I use the sg interface either sg_dd or sg_raw the value I am getting through scsi_get_lba is not matching with the one in the CDB. Do we need to have some change in sg module for handling this, or is there anything wrong in the way I access the scsi_get_lba or sending command through sg? Any suggestion or help is highly appreciated. For I/O through DD Jun 1 20:19:14 linux-eph1 kernel: sd 16:0:1:0: [sdc] CDB: Write(10): 2a 00 00 00 00 00 00 00 08 00 Jun 1 20:19:14 linux-eph1 kernel: LBA 0x0000000000000000 For a Non Zero LBA Jun 1 20:19:35 linux-eph1 kernel: sd 16:0:1:0: [sdc] CDB: Write(10): 2a 00 00 00 0f f8 00 00 08 00 Jun 1 20:19:35 linux-eph1 kernel: LBA 0x0000000000000ff8 For I/O through sg_dd Jun 1 20:19:45 linux-eph1 kernel: sd 16:0:1:0: [sg2] CDB: Write(10): 2a 00 00 00 0f ff 00 00 01 00 Jun 1 20:19:45 linux-eph1 kernel: LBA 0xffffffffffffffff Jun 1 20:20:26 linux-eph1 kernel: sd 16:0:1:0: [sg2] CDB: Write(10): 2a 00 00 00 0f f8 00 00 08 00 Jun 1 20:20:26 linux-eph1 kernel: LBA 0xffffffffffffffff Kernel Version Linux linux-eph1 2.6.34-rc3-00626-gcee693e-dirty #3 SMP Mon May 24 16:41:33 IST 2010 x86_64 x86_64 x86_64 GNU/Linux Thanks Sathya -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html